'journal_id' : fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='cascade', select=True),
'code' : fields.char('Code', size=8),
'user_id' : fields.many2one('res.users', 'User',),
- 'ref': fields.char('Ref.', size=32),
+ 'currency_id': fields.function(_get_account_currency, method=True, type='many2one', relation='res.currency', string='Account currency',
+ store={
+ 'account.analytic.account': (_get_account_line, ['company_id'], 50),
+ },
+ help="The related account currency if not equal to the company one."),
+ 'company_id': fields.many2one('res.company','Company',required=True),
+ 'amount_currency': fields.function(_amount_currency, method=True, digits=(16, int(config['price_accuracy'])), string='Amount currency',
+ store={
+ 'account.analytic.account': (_get_account_line, ['company_id'], 50),
+ },
- help="The amount expressed in the related account currency if not equal to the company one.",),
-
++ help="The amount expressed in the related account currency if not equal to the company one.",)
+ 'ref': fields.char('Reference', size=32),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),