mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[9.0][IMP] rma_account:
* remove unneded copy attributes. * simplify action_view methods. * fix wrong naming. * fix misplaced views. * fix wrong count and view actions for rma.orders in invoices. * fix error when installing the module. * remove unneded data update when preparing rma lines from invoice lines. * minor extra fixes.
This commit is contained in:
committed by
AaronHForgeFlow
parent
77688d880d
commit
441218fecd
@@ -179,8 +179,8 @@ class RmaOrder(models.Model):
|
||||
def _get_valid_lines(self):
|
||||
""":return: A recordset of rma lines.
|
||||
"""
|
||||
for rec in self:
|
||||
return rec.rma_line_ids
|
||||
self.ensure_one()
|
||||
return self.rma_line_ids
|
||||
|
||||
@api.multi
|
||||
def action_view_lines(self):
|
||||
@@ -192,8 +192,7 @@ class RmaOrder(models.Model):
|
||||
lines = self._get_valid_lines()
|
||||
# choose the view_mode accordingly
|
||||
if len(lines) != 1:
|
||||
result['domain'] = "[('id', 'in', " + \
|
||||
str(lines.ids) + ")]"
|
||||
result['domain'] = [('id', 'in', lines.ids)]
|
||||
elif len(lines) == 1:
|
||||
if self.type == 'customer':
|
||||
res = self.env.ref('rma.view_rma_line_form', False)
|
||||
|
||||
Reference in New Issue
Block a user