diff --git a/addons/loyalty/data/loyalty_demo.xml b/addons/loyalty/data/loyalty_demo.xml index e463796f3a8..ad32529f4cd 100644 --- a/addons/loyalty/data/loyalty_demo.xml +++ b/addons/loyalty/data/loyalty_demo.xml @@ -80,6 +80,7 @@ auto True $ + diff --git a/addons/pos_loyalty/data/pos_loyalty_demo.xml b/addons/pos_loyalty/data/pos_loyalty_demo.xml index a77d2c82149..7d430536343 100644 --- a/addons/pos_loyalty/data/pos_loyalty_demo.xml +++ b/addons/pos_loyalty/data/pos_loyalty_demo.xml @@ -90,4 +90,8 @@ + + + + diff --git a/addons/pos_loyalty/models/pos_config.py b/addons/pos_loyalty/models/pos_config.py index b25d948ba80..e4207ce34e6 100644 --- a/addons/pos_loyalty/models/pos_config.py +++ b/addons/pos_loyalty/models/pos_config.py @@ -63,6 +63,12 @@ class PosConfig(models.Model): reward = gc_program.reward_ids if reward.reward_type != 'discount' or reward.discount_mode != 'per_point' or reward.discount != 1: raise UserError(_('Invalid gift card program reward. Use 1 currency per point discount.')) + if self.gift_card_settings == "create_set": + if not gc_program.mail_template_id: + raise UserError(_('There is no email template on the gift card program and your pos is set to print them.')) + if not gc_program.pos_report_print_id: + raise UserError(_('There is no print report on the gift card program and your pos is set to print them.')) + return super()._check_before_creating_new_session() def use_coupon_code(self, code, creation_date, partner_id):