Browse Source

[FIX] Fixed @api.constrains issue

pull/504/head
Krunal 4 years ago
parent
commit
c195b0678f
  1. 2
      pos_customer_required/models/pos_order.py

2
pos_customer_required/models/pos_order.py

@ -15,7 +15,7 @@ class PosOrder(models.Model):
related='session_id.config_id.require_customer', related='session_id.config_id.require_customer',
) )
@api.constrains('partner_id', 'require_customer')
@api.constrains('partner_id', 'session_id')
def _check_partner(self): def _check_partner(self):
for rec in self: for rec in self:
if rec.require_customer != 'no' and not rec.partner_id: if rec.require_customer != 'no' and not rec.partner_id:

Loading…
Cancel
Save