[FIX]reverting changes applied to v11

This commit is contained in:
aaron
2018-05-04 09:26:54 +02:00
committed by JasminSForgeFlow
parent 342ecd79f4
commit 7cc133ee74
2 changed files with 16 additions and 0 deletions

View File

@@ -27,6 +27,21 @@ class SaleOrderLine(models.Model):
name='', args=args, operator=operator, limit=limit,
name_get_uid=name_get_uid)
@api.multi
def name_get(self):
res = []
if self.env.context.get('rma'):
for sale in self:
if sale.order_id.name:
res.append((sale.id, "%s %s qty:%s" % (
sale.order_id.name,
sale.product_id.name, sale.product_uom_qty)))
else:
res.append(super(SaleOrderLine, sale).name_get()[0])
return res
else:
return super(SaleOrderLine, self).name_get()
rma_line_id = fields.Many2one(
comodel_name='rma.order.line', string='RMA', ondelete='restrict')

View File

@@ -18,6 +18,7 @@
</div>
<group name="main_info" position="inside">
<field name="sale_line_id"
context="{'rma': True}"
options="{'no_create': True}"
domain="['|',
('order_id.partner_id', '=', partner_id),