mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] base_comment_template multi company rules
[IMP] Move comment_template_id from account_invoice_comment_template and make it company_dependant [IMP] base_comment_template: Add test
This commit is contained in:
committed by
Pierre Verkest
parent
0bfc51ec59
commit
e7d0910671
2
base_comment_template/tests/__init__.py
Normal file
2
base_comment_template/tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from . import test_base_comment_template
|
||||
21
base_comment_template/tests/test_base_comment_template.py
Normal file
21
base_comment_template/tests/test_base_comment_template.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestResPartner(TransactionCase):
|
||||
|
||||
def setUp(self):
|
||||
self.template_id = self.env['base.comment.template'].create({
|
||||
'name': 'Comment before lines',
|
||||
'position': 'before_lines',
|
||||
'text': 'Text before lines',
|
||||
})
|
||||
|
||||
def test_commercial_partner_fields(self):
|
||||
# Azure Interior
|
||||
partner_id = self.env.ref('base.res_partner_12')
|
||||
partner_id.property_comment_template_id = self.template_id.id
|
||||
# Test childs propagation of commercial partner field
|
||||
for child_id in partner_id.child_ids:
|
||||
self.assertEqual(
|
||||
child_id.property_comment_template_id == self.template_id)
|
||||
Reference in New Issue
Block a user