[IMP] improved code
bzr revid: tpa@tinyerp.com-20120307085632-h0vowj2353pc20eo
This commit is contained in:
parent
6da32d8cc8
commit
66fe179546
|
@ -53,7 +53,7 @@
|
|||
<field name="name">Sales Application</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="mail.view_sale_config_settings"/>
|
||||
<field name="inherit_id" ref="mail.view_sales_config_plugin"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="module_plugin_outlook" position="after">
|
||||
<button name="%(action_outlook_installer)d" type="action" string="Configure Outlook" icon="gtk-execute"/>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<field name="name">Sales Application</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="mail.view_sale_config_settings"/>
|
||||
<field name="inherit_id" ref="mail.view_sales_config_plugin"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="module_plugin_thunderbird" position="after">
|
||||
<button name="%(action_thunderbird_installer)d" type="action" string="Configure Thunderbird" icon="gtk-execute"/>
|
||||
|
|
|
@ -89,6 +89,9 @@ class sale_configuration(osv.osv_memory):
|
|||
"""),
|
||||
'group_sale_taxes_global_on_order':fields.boolean("Global on order", group='base.group_user', implied_group='base.group_sale_taxes_global_on_order'),
|
||||
'group_sale_taxes_on_order_line':fields.boolean("On order line", group='base.group_user', implied_group='base.group_sale_taxes_on_order_line'),
|
||||
'module_project_timesheet': fields.boolean("Project Timesheet"),
|
||||
'module_project_mrp': fields.boolean("Project mrp"),
|
||||
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
|
@ -174,6 +177,17 @@ class sale_configuration(osv.osv_memory):
|
|||
|
||||
return res
|
||||
|
||||
def onchange_task_work(self, cr, uid, ids, task_work, context=None):
|
||||
res = {'value': {}}
|
||||
if task_work:
|
||||
res['value'].update({'module_project_timesheet': True})
|
||||
res['value'].update({'module_project_mrp': True})
|
||||
else:
|
||||
res['value'].update({'module_project_timesheet': False})
|
||||
res['value'].update({'module_project_mrp': False})
|
||||
|
||||
return res
|
||||
|
||||
def onchange_tax_policy(self, cr, uid, ids, tax_policy, context=None):
|
||||
res = {'value': {}}
|
||||
if ids:
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
<newline/>
|
||||
<field name="deli_orders"/>
|
||||
<newline/>
|
||||
<field name="task_work"/>
|
||||
<field name="task_work" on_change="onchange_task_work(task_work)"/>
|
||||
<field name="module_project_timesheet" invisible="1"/>
|
||||
<field name="module_project_mrp" invisible="1"/>
|
||||
<newline/>
|
||||
<field name="module_account_analytic_analysis"/>
|
||||
<newline/>
|
||||
|
@ -65,7 +67,7 @@
|
|||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem id="base.menu_sale_config" name="Sales" parent="base.menu_config" sequence="1" action="base.action_sale_config"/>
|
||||
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue