Skip to content

Commit

Permalink
Merge PR OCA#1630 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Jun 14, 2024
2 parents 8337f44 + e825e4b commit 8d22099
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stock_picking_invoice_link/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AccountMove(models.Model):
)

picking_count = fields.Integer(
string="Pickings count", compute="_compute_picking_ids"
string="Pickings count", compute="_compute_picking_count"
)

@api.depends("invoice_line_ids", "invoice_line_ids.move_line_ids")
Expand All @@ -33,6 +33,11 @@ def _compute_picking_ids(self):
)
invoice.picking_count = len(invoice.picking_ids)

@api.depends("picking_ids")
def _compute_picking_count(self):
for invoice in self:
invoice.picking_count = len(invoice.picking_ids)

def action_show_picking(self):
"""This function returns an action that display existing pickings
of given invoice.
Expand Down

0 comments on commit 8d22099

Please sign in to comment.