[FIX] res.partner: rename commercial_id to commercial_partner_id, following corresponding change in `base`
bzr revid: odo@openerp.com-20130418154022-lt7frhp9c8f2boo0
This commit is contained in:
parent
556e4e76c3
commit
a9d5c2d37e
|
@ -1735,7 +1735,7 @@ class res_partner(osv.osv):
|
|||
'''
|
||||
Find the partner for which the accounting entries will be created
|
||||
'''
|
||||
# FIXME: after 7.0, to replace by function field partner.commercial_id
|
||||
# FIXME: after 7.0, to replace by function field partner.commercial_partner_id
|
||||
|
||||
#if the chosen partner is not a company and has a parent company, use the parent for the journal entries
|
||||
#because you want to invoice 'Agrolait, accounting department' but the journal items are for 'Agrolait'
|
||||
|
|
|
@ -25,7 +25,7 @@ class account_invoice(osv.Model):
|
|||
_inherit = 'account.invoice'
|
||||
|
||||
_columns = {
|
||||
'partner_commercial_id': fields.related('partner_id', 'commercial_id', string='Commercial Entity', type='many2one',
|
||||
'commercial_partner_id': fields.related('partner_id', 'commercial_partner_id', string='Commercial Entity', type='many2one',
|
||||
relation='res.partner', store=True, readonly=True,
|
||||
help="The commercial entity that will be used on Journal Entries for this invoice")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="inherit_id" ref="account.invoice_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="partner_commercial_id" invisible="1"/>
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter string="Partner" position="replace">
|
||||
<filter name="partner_commercial_id" string="Partner" domain="[]" context="{'group_by':'partner_commercial_id'}"/>
|
||||
<filter name="commercial_partner_id" string="Partner" domain="[]" context="{'group_by':'commercial_partner_id'}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -23,14 +23,14 @@ from openerp.osv import osv, fields
|
|||
class account_invoice_report(osv.Model):
|
||||
_inherit = 'account.invoice.report'
|
||||
_columns = {
|
||||
'partner_commercial_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"),
|
||||
'commercial_partner_id': fields.many2one('res.partner', 'Partner Company', help="Commercial Entity"),
|
||||
}
|
||||
|
||||
def _select(self):
|
||||
return super(account_invoice_report, self)._select() + ", sub.partner_commercial_id as partner_commercial_id"
|
||||
return super(account_invoice_report, self)._select() + ", sub.commercial_partner_id as commercial_partner_id"
|
||||
|
||||
def _sub_select(self):
|
||||
return super(account_invoice_report, self)._sub_select() + ", ai.partner_commercial_id as partner_commercial_id"
|
||||
return super(account_invoice_report, self)._sub_select() + ", ai.commercial_partner_id as commercial_partner_id"
|
||||
|
||||
def _group_by(self):
|
||||
return super(account_invoice_report, self)._group_by() + ", ai.partner_commercial_id"
|
||||
return super(account_invoice_report, self)._group_by() + ", ai.commercial_partner_id"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<field name="inherit_id" ref="account.view_account_invoice_report_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="partner_commercial_id" invisible="1"/>
|
||||
<field name="commercial_partner_id" invisible="1"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -16,7 +16,7 @@
|
|||
<field name="inherit_id" ref="account.view_account_invoice_report_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<filter name="partner" position="replace">
|
||||
<filter string="Partner" name="partner_commercial_id" context="{'group_by':'partner_commercial_id','residual_visible':True}"/>
|
||||
<filter string="Partner" name="commercial_partner_id" context="{'group_by':'commercial_partner_id','residual_visible':True}"/>
|
||||
</filter>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue