[IMP] account, account_voucher: moved some fields from res.company to accounting settings + removed duplicated fields (in company form view AND accounting settings)
bzr revid: qdp-launchpad@openerp.com-20121015135027-fbapd9h06gtixpep
This commit is contained in:
parent
d56be2c622
commit
eea4d6ee73
|
@ -15,17 +15,5 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_company_inherit_1_form">
|
||||
<field name="name">res.company.form.inherit</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="model">res.company</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='account_grp']" position="inside">
|
||||
<field name="tax_calculation_rounding_method"/>
|
||||
<field name="paypal_account" placeholder="e.g. sales@openerp.com"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
</div>
|
||||
<label for="id" string="Features"/>
|
||||
<div>
|
||||
<div>
|
||||
<div name="group_multi_currency">
|
||||
<field name="group_multi_currency" class="oe_inline"/>
|
||||
<label for="group_multi_currency"/>
|
||||
</div>
|
||||
|
|
|
@ -42,6 +42,21 @@ class res_company(osv.osv):
|
|||
|
||||
res_company()
|
||||
|
||||
class account_config_settings(osv.osv_memory):
|
||||
_inherit = 'account.config.settings'
|
||||
_columns = {
|
||||
'income_currency_exchange_account_id': fields.related(
|
||||
'company_id', 'income_currency_exchange_account_id',
|
||||
type='many2one',
|
||||
relation='account.account',
|
||||
string="Gain Exchange Rate Account"),
|
||||
'expense_currency_exchange_account_id': fields.related(
|
||||
'company_id', 'expense_currency_exchange_account_id',
|
||||
type="many2one",
|
||||
relation='account.account',
|
||||
string="Loss Exchange Rate Account"),
|
||||
}
|
||||
|
||||
class account_voucher(osv.osv):
|
||||
def _check_paid(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
|
|
|
@ -249,16 +249,23 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- res.company form view -->
|
||||
<record model="ir.ui.view" id="view_company_inherit_currency_xchange_form">
|
||||
<field name="name">res.company.form.inherit</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="model">res.company</field>
|
||||
<!-- res.config form view -->
|
||||
<record model="ir.ui.view" id="view_account_settings_currency_xchange_form">
|
||||
<field name="name">account.config.settings.inherit</field>
|
||||
<field name="inherit_id" ref="account.view_account_config_settings"/>
|
||||
<field name="model">account.config.settings</field>
|
||||
<field name="priority">20</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="currency_id" position="after">
|
||||
<field name="income_currency_exchange_account_id"/>
|
||||
<field name="expense_currency_exchange_account_id"/>
|
||||
</field>
|
||||
<xpath expr="//div[@name='group_multi_currency']" position="after">
|
||||
<group attrs="{'invisible': [('group_multi_currency', '<>', True)]}" col="2">
|
||||
<group>
|
||||
<field name="income_currency_exchange_account_id"/>
|
||||
<field name="expense_currency_exchange_account_id"/>
|
||||
</group>
|
||||
<group>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
Loading…
Reference in New Issue