[NEW] account_sub_account: create add-on
This commit is contained in:
committed by
Stéphan Sainléger
parent
09f0eaac18
commit
c56771ca37
2
account_sub_accounts/models/__init__.py
Normal file
2
account_sub_accounts/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import res_parter
|
||||
from . import account_move_line
|
15
account_sub_accounts/models/account_move_line.py
Normal file
15
account_sub_accounts/models/account_move_line.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
_inherit = "account.move.line"
|
||||
|
||||
sub_account_customer = fields.Char(
|
||||
string="Custommer sub-account",
|
||||
related="partner_id.sub_account_customer"
|
||||
)
|
||||
|
||||
sub_account_supplier = fields.Char(
|
||||
string="Supplier sub-account",
|
||||
related="partner_id.sub_account_supplier"
|
||||
)
|
8
account_sub_accounts/models/res_parter.py
Normal file
8
account_sub_accounts/models/res_parter.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class Partner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
sub_account_customer = fields.Char(string="Custommer sub-account")
|
||||
sub_account_supplier = fields.Char(string="Supplier sub-account")
|
Reference in New Issue
Block a user