Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
1
Beantwoorden
477
Weergaven
Hi
you can inherit the pos config and add the custom message that you needed in _reset_default_on_vals function.
class PosConfig(models.Model):
_inherit = 'pos.config'
def _reset_default_on_vals(self, vals):
if 'tip_product_id' in vals and any(self.mapped('iface_tipproduct')) and not vals['tip_product_id']:
default_product = self.env.ref('point_of_sale.product_product_tip', False)
if default_product:
vals['tip_product_id'] = default_product.id
else:
raise UserError(_('Add the message content that you needed'))
Regards
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden