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)
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Line" create="0">
|
||||
<sheet>
|
||||
<header/>
|
||||
<sheet>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button type="object" name="action_view_in_shipments"
|
||||
class="oe_stat_button"
|
||||
@@ -172,8 +172,8 @@
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Rma Line" create="0">
|
||||
<sheet>
|
||||
<header/>
|
||||
<sheet>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button type="object" name="action_view_in_shipments"
|
||||
class="oe_stat_button"
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<record id="view_rma_add_stock_move_customer_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="name">rma.order.form - stock.move wizard</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_form"/>
|
||||
<field name="arch" type="xml">
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
<record id="view_rma_add_stock_move_button_supplier_form"
|
||||
model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="name">rma.order.supplier.form - stock.move wizard</field>
|
||||
<field name="model">rma.order</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_supplier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
Reference in New Issue
Block a user