mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms: sintax error in account_move_line
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user