mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[13.0][MIG] rma_purchase
This commit is contained in:
committed by
Chanakya Soni
parent
55c0b05234
commit
c76a65f887
@@ -36,12 +36,11 @@ class PurchaseOrderLine(models.Model):
|
||||
name_get_uid=name_get_uid,
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
res = []
|
||||
if self.env.context.get("rma"):
|
||||
for purchase in self:
|
||||
invoices = self.env["account.invoice.line"].search(
|
||||
invoices = self.env["account.move.line"].search(
|
||||
[("purchase_line_id", "=", purchase.id)]
|
||||
)
|
||||
if purchase.order_id.name:
|
||||
@@ -54,8 +53,7 @@ class PurchaseOrderLine(models.Model):
|
||||
" ".join(
|
||||
str(x)
|
||||
for x in [
|
||||
inv.number
|
||||
for inv in invoices.mapped("invoice_id")
|
||||
inv.name for inv in invoices.mapped("move_id")
|
||||
]
|
||||
),
|
||||
purchase.product_id.name,
|
||||
|
||||
Reference in New Issue
Block a user