bemade_multiple_billing_contacts: Initial commit.
This commit is contained in:
parent
8a38758085
commit
3424f7221c
4 changed files with 23 additions and 1 deletions
|
|
@ -27,7 +27,7 @@
|
|||
'author': 'Bemade Inc.',
|
||||
'website': 'https://www.bemade.org',
|
||||
'license': 'OPL-1',
|
||||
'depends': [],
|
||||
'depends': ['sale', 'account'],
|
||||
'data': [],
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
|
|
|
|||
0
models/account_move.py
Normal file
0
models/account_move.py
Normal file
16
models/res_partner.py
Normal file
16
models/res_partner.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from odoo import models, fields, api, _, Command
|
||||
|
||||
|
||||
class Partner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
def _billing_contacts_domain(self):
|
||||
self.ensure_one()
|
||||
return [('is_company', '=', False), ('root_ancestor', '=', self.root_ancestor)]
|
||||
billing_contacts = fields.Many2many(string='Default Billing Contacts',
|
||||
comodel_name='res.partner',
|
||||
relation='res_partner_billing_contact_rel',
|
||||
column1='billing_contact_id',
|
||||
column2='billed_partner_id',
|
||||
domain=_billing_contacts_domain,
|
||||
tracking=True)
|
||||
6
models/sale_order.py
Normal file
6
models/sale_order.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from odoo import models, fields, api, _, Command
|
||||
|
||||
|
||||
class SaleOrder(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
Loading…
Reference in a new issue