mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: change unlink checkins partner autocreate by write
This commit is contained in:
@@ -208,7 +208,8 @@ class PmsCheckinPartner(models.Model):
|
||||
lambda c: c.state == "draft"
|
||||
)
|
||||
if len(draft_checkins) > 0 and vals.get("partner_id"):
|
||||
draft_checkins[0].sudo().unlink()
|
||||
draft_checkins[0].write(vals)
|
||||
return draft_checkins[0]
|
||||
if vals.get("identifier", _("New")) == _("New") or "identifier" not in vals:
|
||||
pms_property_id = (
|
||||
self.env.user.get_active_property_ids()[0]
|
||||
|
||||
Reference in New Issue
Block a user