_inherit = 'res.config'
_columns = {
- 'group_sale_pricelist_per_customer':fields.boolean("Pricelist per customer ",
- help="""
- Allows to manage different prices based on rules per category of customers. Example: 10% for retailers, promotion of 5 EUR on this product,
- It assigns the "pricelist" group to all employees
- """),
+ 'group_sale_pricelist_per_customer':fields.boolean("Pricelist per customer",
+ help="""Allows to manage different prices based on rules per category of customers.
+ Example: 10% for retailers, promotion of 5 EUR on this product, etc.
+ It assigns the "Pricelist" group to all employees."""),
'group_sale_uom_per_product':fields.boolean("UOM per product",
help="""
- This allow different unit of measure per product,
- It assigns the "UOM per product" group to all employees
+ Allows you to select and maintain different unit of measures per product.
+ It assigns the "UOM per product" group to all employees.
"""),
}
-
+
product_groups_configuration()
'module_analytic_journal_billing_rate' : fields.boolean("Billing rates by contracts",
help=""" This allows you to define what is the default invoicing rate for a specific journal on a given account.
It installs analytic_journal_billing_rate module.
-- """),
- 'module_account_analytic_analysis': fields.boolean('Contracts',
- help = """
- For modifying account analytic view to show important data to project manager of services companies,
- You can also view the report of account analytic summary user-wise as well as month wise.
- It installs the account_analytic_analysis module."""),
++ """)
}
-
- def get_default_applied_groups(self, cr, uid, ids, context=None):
- applied_groups = {}
- user_obj = self.pool.get('res.users')
- dataobj = self.pool.get('ir.model.data')
-
- groups = []
- user_group_ids = user_obj.browse(cr, uid, uid, context=context).groups_id
-
- for group_id in user_group_ids:
- groups.append(group_id.id)
-
- for id in groups:
- key_id = dataobj.search(cr, uid,[('res_id','=',id),('model','=','res.groups')],context=context)
- key = dataobj.browse(cr, uid, key_id[0], context=context).name
- applied_groups[key] = True
-
- return applied_groups
-
+
def get_default_installed_modules(self, cr, uid, ids, context=None):
- module_obj = self.pool.get('ir.module.module')
- data_obj = self.pool.get('ir.model.data')
- module_ids = module_obj.search(cr, uid,
- [('name','in',MODULE_LIST),
- ('state','in',['to install', 'installed', 'to upgrade'])],
- context=context)
- installed_modules = dict([(mod.name,True) for mod in module_obj.browse(cr, uid, module_ids, context=context)])
- if installed_modules.get('project_mrp') and installed_modules.get('project_timesheet'):
+ installed_modules = super(sale_configuration, self).get_default_installed_modules(cr, uid, ids, context=context)
+ if installed_modules.get('module_project_mrp') and installed_modules.get('module_project_timesheet'):
installed_modules['task_work'] = True
+ prod_id = data_obj.get_object(cr, uid, 'product', 'product_consultant').id
+ uom_id = self.pool.get('product.product').browse(cr, uid, prod_id).uom_id.id
+ defaults.update({'time_unit': uom_id})
- if installed_modules.get('account_analytic_analysis'):
- installed_modules['timesheet'] = True
- prod_id = data_obj.get_object(cr, uid, 'product', 'product_consultant').id
- uom_id = self.pool.get('product.product').browse(cr, uid, prod_id).uom_id.id
- defaults.update({'time_unit': uom_id})
return installed_modules
-
+
def get_default_sale_configs(self, cr, uid, ids, context=None):
ir_values_obj = self.pool.get('ir.values')
data_obj = self.pool.get('ir.model.data')