[FIX]pms: sintax error in account_move_line

This commit is contained in:
Darío Lodeiros
2023-08-13 10:19:03 +02:00
parent 65b2f782a0
commit 439b7e174b
2 changed files with 3 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ class AccountMove(models.Model):
for move in self:
if self.env.context.get("force_pms_property"):
move.pms_property_id = self.env.context["force_pms_property"]
elif move.folio_ids:
elif move.folio_ids and len(move.folio_ids.mapped("pms_property_id")) == 1:
move.pms_property_id = move.folio_ids.mapped("pms_property_id")
elif len(
move.journal_id.mapped("pms_property_ids")

View File

@@ -57,7 +57,7 @@ class AccountMoveLine(models.Model):
)
move_id = fields.Many2one(check_pms_properties=True)
@api.depends('move_id.payment_reference', "quantity")
@api.depends("move_id.payment_reference", "quantity")
def _compute_name(self):
res = super()._compute_name()
for record in self:
@@ -124,7 +124,6 @@ class AccountMoveLine(models.Model):
move = self.browse(move_line["move_id"])
if move.pms_property_id or move.move_id.pms_property_id:
move_line["pms_property_id"] = (
move.pms_property_id.id
or move.move_id.pms_property_id.pms_property_id.id
move.pms_property_id.id or move.move_id.pms_property_id.id
)
return result