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):
|
def _get_valid_lines(self):
|
||||||
""":return: A recordset of rma lines.
|
""":return: A recordset of rma lines.
|
||||||
"""
|
"""
|
||||||
for rec in self:
|
self.ensure_one()
|
||||||
return rec.rma_line_ids
|
return self.rma_line_ids
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def action_view_lines(self):
|
def action_view_lines(self):
|
||||||
@@ -192,8 +192,7 @@ class RmaOrder(models.Model):
|
|||||||
lines = self._get_valid_lines()
|
lines = self._get_valid_lines()
|
||||||
# choose the view_mode accordingly
|
# choose the view_mode accordingly
|
||||||
if len(lines) != 1:
|
if len(lines) != 1:
|
||||||
result['domain'] = "[('id', 'in', " + \
|
result['domain'] = [('id', 'in', lines.ids)]
|
||||||
str(lines.ids) + ")]"
|
|
||||||
elif len(lines) == 1:
|
elif len(lines) == 1:
|
||||||
if self.type == 'customer':
|
if self.type == 'customer':
|
||||||
res = self.env.ref('rma.view_rma_line_form', False)
|
res = self.env.ref('rma.view_rma_line_form', False)
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
<field name="model">rma.order.line</field>
|
<field name="model">rma.order.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="RMA Line" create="0">
|
<form string="RMA Line" create="0">
|
||||||
|
<header/>
|
||||||
<sheet>
|
<sheet>
|
||||||
<header/>
|
|
||||||
<div name="button_box" class="oe_button_box">
|
<div name="button_box" class="oe_button_box">
|
||||||
<button type="object" name="action_view_in_shipments"
|
<button type="object" name="action_view_in_shipments"
|
||||||
class="oe_stat_button"
|
class="oe_stat_button"
|
||||||
@@ -172,8 +172,8 @@
|
|||||||
<field name="model">rma.order.line</field>
|
<field name="model">rma.order.line</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Rma Line" create="0">
|
<form string="Rma Line" create="0">
|
||||||
|
<header/>
|
||||||
<sheet>
|
<sheet>
|
||||||
<header/>
|
|
||||||
<div name="button_box" class="oe_button_box">
|
<div name="button_box" class="oe_button_box">
|
||||||
<button type="object" name="action_view_in_shipments"
|
<button type="object" name="action_view_in_shipments"
|
||||||
class="oe_stat_button"
|
class="oe_stat_button"
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<record id="view_rma_add_stock_move_customer_form" model="ir.ui.view">
|
<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="model">rma.order</field>
|
||||||
<field name="inherit_id" ref="rma.view_rma_form"/>
|
<field name="inherit_id" ref="rma.view_rma_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
|
|
||||||
<record id="view_rma_add_stock_move_button_supplier_form"
|
<record id="view_rma_add_stock_move_button_supplier_form"
|
||||||
model="ir.ui.view">
|
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="model">rma.order</field>
|
||||||
<field name="inherit_id" ref="rma.view_rma_supplier_form"/>
|
<field name="inherit_id" ref="rma.view_rma_supplier_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
|||||||
Reference in New Issue
Block a user