Skip to content

Commit

Permalink
Merge PR OCA#1631 into 17.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 e1b9666 + cbf1afc commit f1f9f82
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 @@ -21,7 +21,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 @@ -32,6 +32,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 f1f9f82

Please sign in to comment.