bemade_partner_root_ancestor: initial commit
This commit is contained in:
commit
3135a41ed5
6 changed files with 59 additions and 0 deletions
1
__init__.py
Normal file
1
__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import models
|
||||
35
__manifest__.py
Normal file
35
__manifest__.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#
|
||||
# Bemade Inc.
|
||||
#
|
||||
# Copyright (C) June 2023 Bemade Inc. (<https://www.bemade.org>).
|
||||
# Author: mdurepos (Contact : it@bemade.org)
|
||||
#
|
||||
# This program is under the terms of the Odoo Proprietary License v1.0 (OPL-1)
|
||||
# It is forbidden to publish, distribute, sublicense, or sell copies of the Software
|
||||
# or modified copies of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
{
|
||||
'name': 'bemade_multiple_billing_contacts',
|
||||
'version': '15.0.1.0.0',
|
||||
'summary': 'Send invoices to multiple contacts by default.',
|
||||
'description': """By default, newly created invoices add all invoice addresses for the given partner as
|
||||
followers on the invoice. If billing contacts are set manually on the sales order, those billing
|
||||
contacts are added as followers on the invoice instead.""",
|
||||
'category': 'Invoicing Management',
|
||||
'author': 'Bemade Inc.',
|
||||
'website': 'https://www.bemade.org',
|
||||
'license': 'OPL-1',
|
||||
'depends': ['sale', 'account'],
|
||||
'data': [],
|
||||
'demo': [],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
1
models/__init__.py
Normal file
1
models/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
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