[IMP] company: better rml_footer default value

also rename method on_change_header in on_change_footer

bzr revid: abo@openerp.com-20120830112427-i3x4dzltlax03p7h
This commit is contained in:
Antonin Bourguignon 2012-08-30 13:24:27 +02:00
parent 6f8dc9815a
commit 7d8e6e7e8f
3 changed files with 9 additions and 10 deletions

View File

@ -1088,8 +1088,7 @@
<field name="name">Your Company</field>
<field name="partner_id" ref="main_partner"/>
<field name="rml_header1">Your Company Slogan</field>
<field name="rml_footer">Website: www.yourcompany.com | Phone: +33 1 49 51 23 94
Bank Accounts... to be configured in menu Settings / Accounting/Invoicing.</field>
<field name="rml_footer">Website: www.yourcompany.com | Phone: +33 1 49 51 23 94 | Bank Accounts: to be configured in menu Settings / Accounting/Invoicing</field>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -141,7 +141,7 @@ class res_company(osv.osv):
def _set_rml_footer(self, cr, uid, ids, footer=False, context=None):
return self.write(cr, uid, ids, {'rml_footer': footer}, context=context)
def on_change_header(self, cr, uid, ids, customize_footer, phone, email, fax, website, vat, company_registry=False, bank_ids=False, context=None):
def on_change_footer(self, cr, uid, ids, customize_footer, phone, email, fax, website, vat, company_registry=False, bank_ids=False, context=None):
val = []
if customize_footer:
return {}

View File

@ -55,18 +55,18 @@
<div>
<field name="rml_header1" placeholder="e.g. Global Business Solutions"/>
</div>
<field name="website" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)" widget="url" placeholder="e.g. www.openerp.com"/>
<field name="website" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)" widget="url" placeholder="e.g. www.openerp.com"/>
</group>
<group>
<field name="phone" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="fax" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="email" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="vat" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="company_registry" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="phone" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="fax" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="email" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="vat" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="company_registry" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
</group>
</group>
<group string="Bank Accounts">
<field name="bank_ids" colspan="4" nolabel="1" on_change="on_change_header(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
<field name="bank_ids" colspan="4" nolabel="1" on_change="on_change_footer(customize_footer, phone, email, fax, website, vat, company_registry, bank_ids)"/>
</group>
<group string="Footer Configuration">
<field name="customize_footer"/>