diff --git a/addons/account_payment/account_payment.py b/addons/account_payment/account_payment.py index 138be103f2e..f3259f846cc 100644 --- a/addons/account_payment/account_payment.py +++ b/addons/account_payment/account_payment.py @@ -94,6 +94,7 @@ class payment_order(osv.osv): ], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."), 'date_created': fields.date('Creation date', readonly=True), 'date_done': fields.date('Execution date', readonly=True), + 'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), } _defaults = { @@ -343,7 +344,8 @@ class payment_line(osv.osv): 'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"), 'create_date': fields.datetime('Created', readonly=True), 'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True), - 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line') + 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line'), + 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True), } _defaults = { 'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence' diff --git a/addons/account_payment/account_payment_view.xml b/addons/account_payment/account_payment_view.xml index b829748cb93..56ff30e5ded 100644 --- a/addons/account_payment/account_payment_view.xml +++ b/addons/account_payment/account_payment_view.xml @@ -107,6 +107,7 @@