OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
834 B

  1. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
  2. from odoo.tests.common import TransactionCase
  3. class TestResPartner(TransactionCase):
  4. def setUp(self):
  5. super(TestResPartner, self).setUp()
  6. self.template_id = self.env['base.comment.template'].create({
  7. 'name': 'Comment before lines',
  8. 'position': 'before_lines',
  9. 'text': 'Text before lines',
  10. })
  11. def test_commercial_partner_fields(self):
  12. # Azure Interior
  13. partner_id = self.env.ref('base.res_partner_12')
  14. partner_id.property_comment_template_id = self.template_id.id
  15. # Test childs propagation of commercial partner field
  16. for child_id in partner_id.child_ids:
  17. self.assertEqual(
  18. child_id.property_comment_template_id, self.template_id)