Skip to content

Commit

Permalink
[FIX] purchase_stock_ux: new origin_description field to show in Deli…
Browse files Browse the repository at this point in the history
…very Slip

closes #170

Related: ingadhoc/stock#377
Signed-off-by: Nicolas Mac Rouillon <nmr@adhoc.com.ar>
  • Loading branch information
vib-adhoc committed Jul 4, 2023
1 parent 6b353b3 commit 82f562e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion purchase_stock_ux/__manifest__.py
Expand Up @@ -19,7 +19,7 @@
##############################################################################
{
'name': 'Purchase Stock UX',
'version': "16.0.1.1.0",
'version': "16.0.1.2.0",
'category': 'Purchases',
'sequence': 14,
'summary': '',
Expand Down
6 changes: 6 additions & 0 deletions purchase_stock_ux/models/stock_move.py
Expand Up @@ -11,3 +11,9 @@ class StockMove(models.Model):
purchase_id = fields.Many2one(
related='purchase_line_id.order_id',
)

def _compute_origin_description(self):
super()._compute_origin_description()
for rec in self:
if rec.purchase_line_id:
rec.origin_description = rec.purchase_line_id.name

0 comments on commit 82f562e

Please sign in to comment.