Skip to content

Commit

Permalink
Merge PR OCA#1625 into 16.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 97c6049 + 38b1742 commit efb9e71
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 @@ -20,7 +20,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 @@ -31,6 +31,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 efb9e71

Please sign in to comment.