mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[9.0][IMP] rma: add link to source SO and PO
This commit is contained in:
@@ -44,6 +44,11 @@ class RmaOrderLine(models.Model):
|
||||
ondelete='restrict',
|
||||
readonly=True, states={'draft': [('readonly', False)]},
|
||||
)
|
||||
purchase_id = fields.Many2one(
|
||||
string="Source Purchase Order",
|
||||
related='purchase_order_line_id.order_id',
|
||||
readonly=True,
|
||||
)
|
||||
purchase_order_line_ids = fields.Many2many(
|
||||
comodel_name='purchase.order.line',
|
||||
relation='purchase_line_rma_line_rel',
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
<field name="qty_purchased"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="origin" position="after">
|
||||
<field name="purchase_id"
|
||||
attrs="{'invisible': [('purchase_order_line_id', '=', False)]}"/>
|
||||
</field>
|
||||
<notebook position="inside">
|
||||
<page name="purchase" string="Purchase Lines">
|
||||
<field name="purchase_order_line_ids" nolabel="1"/>
|
||||
|
||||
Reference in New Issue
Block a user