mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-11-15 10:42:06 +00:00
27 lines
1023 B
Python
27 lines
1023 B
Python
|
# Copyright 2017 Therp BV <https://therp.nl>
|
||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||
|
from flectra.tests.common import TransactionCase
|
||
|
|
||
|
|
||
|
class TestPartnerLabel(TransactionCase):
|
||
|
def test_partner_label(self):
|
||
|
settings = self.env["res.config.settings"].create({})
|
||
|
settings.refresh()
|
||
|
self.assertItemsEqual(
|
||
|
settings.action_partner_labels_preview()["context"]["report_action"][
|
||
|
"context"
|
||
|
]["active_ids"],
|
||
|
self.env["res.partner"].search([], limit=100).ids,
|
||
|
)
|
||
|
self.assertEqual(
|
||
|
settings.partner_labels_paperformat_id,
|
||
|
self.env.ref("partner_label.report_res_partner_label").paperformat_id,
|
||
|
)
|
||
|
settings.partner_labels_paperformat_id = (
|
||
|
self.env.ref("base.paperformat_us").id,
|
||
|
)
|
||
|
self.assertEqual(
|
||
|
self.env.ref("partner_label.report_res_partner_label").paperformat_id,
|
||
|
self.env.ref("base.paperformat_us"),
|
||
|
)
|