[FIX]: Add currency_id field

bzr revid: atp@tinyerp.com-20120706074215-4225u3zkx00gtfw5
This commit is contained in:
Atul Patel (OpenERP) 2012-07-06 13:12:15 +05:30
parent 5e7f7bef7b
commit 64bd1cdd87
4 changed files with 6 additions and 9 deletions

View File

@ -34,7 +34,7 @@ class account_analytic_line(osv.osv):
'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
'code': fields.char('Code', size=8),
'ref': fields.char('Ref.', size=64),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account Currency', store=True, help="The related account currency if not equal to the company one.", readonly=True),
'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount Currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True),
}

View File

@ -253,12 +253,9 @@
</group>
<group string="Amount">
<field name="amount"/>
<label for="amount_currency"/>
<div>
<field name="amount_currency" class="oe_inline"/>
<field name="currency_id" class="oe_inline"/>
<field invisible="1" name="general_account_id"/>
</div>
<field name="amount_currency"/>
<field name="currency_id"/>
<field invisible="1" name="general_account_id"/>
</group>
<group string="Product Information">
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>

View File

@ -123,7 +123,7 @@
<!-- Menus -->
<record id="action_hr_analytic_timesheet_open_tree" model="ir.actions.act_window">
<field name="name">Invoice Tasks Works</field>
<field name="name">Invoice Tasks Work</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -88,7 +88,7 @@
<!-- Menus -->
<record id="action_project_timesheet_bill_task" model="ir.actions.act_window">
<field name="name">Invoice Tasks Works</field>
<field name="name">Invoice Tasks Work</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>