[FIX]views rma

This commit is contained in:
aheficent
2018-07-30 18:36:49 +02:00
committed by Florian da Costa
parent 5606be6d2d
commit 2fd985f591
3 changed files with 80 additions and 85 deletions

View File

@@ -163,9 +163,6 @@ class TestRma(common.SavepointCase):
rma_id.partner_id.action_open_partner_rma() rma_id.partner_id.action_open_partner_rma()
rma_id.partner_id._compute_rma_line_count() rma_id.partner_id._compute_rma_line_count()
# approve the RMA
# rma_id.action_rma_to_approve()
# rma_id.action_rma_approve()
return rma_id return rma_id
@classmethod @classmethod

View File

@@ -1,90 +1,88 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data> <record id="rma_operation_tree" model="ir.ui.view">
<record id="rma_operation_tree" model="ir.ui.view"> <field name="name">rma.operation.tree</field>
<field name="name">rma.operation.tree</field> <field name="model">rma.operation</field>
<field name="model">rma.operation</field> <field name="arch" type="xml">
<field name="arch" type="xml"> <tree string="RMA Operations">
<tree string="RMA Operations"> <field name="active" invisible="1"/>
<field name="active" invisible="1"/> <field name="code"/>
<field name="code"/> <field name="name"/>
<field name="name"/> <field name="receipt_policy"/>
<field name="receipt_policy"/> <field name="delivery_policy"/>
<field name="delivery_policy"/> </tree>
</tree> </field>
</field> </record>
</record>
<record id="rma_operation_form" model="ir.ui.view"> <record id="rma_operation_form" model="ir.ui.view">
<field name="name">rma.operation.form</field> <field name="name">rma.operation.form</field>
<field name="model">rma.operation</field> <field name="model">rma.operation</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="RMA Operations"> <form string="RMA Operations">
<group colspan="4" col="2"> <group colspan="4" col="2">
<group name="description" <group name="description"
string="Description"> string="Description">
<field name="code"/> <field name="code"/>
<field name="name"/> <field name="name"/>
<field name="type"/> <field name="type"/>
<field name="active"/> <field name="active"/>
</group>
<group name="policies"
string="Policies">
<field name="receipt_policy"/>
<field name="delivery_policy"/>
</group>
<group name="inbound" string="Inbound">
<field name="in_route_id"/>
<field name="in_warehouse_id"/>
<field name="location_id"
domain="[('usage', '=', 'internal')]"/>
<field name="customer_to_supplier"
attrs="{'invisible':[('type', '=', 'supplier')]}"/>
</group>
<group name="outbound" string="Outbound">
<field name="out_route_id"/>
<field name="out_warehouse_id"/>
<field name="supplier_to_customer"
attrs="{'invisible':[('type', '=', 'customer')]}"/>
</group>
</group> </group>
</form> <group name="policies"
</field> string="Policies">
</record> <field name="receipt_policy"/>
<field name="delivery_policy"/>
</group>
<group name="inbound" string="Inbound">
<field name="in_route_id"/>
<field name="in_warehouse_id"/>
<field name="location_id"
domain="[('usage', '=', 'internal')]"/>
<field name="customer_to_supplier"
attrs="{'invisible':[('type', '=', 'supplier')]}"/>
</group>
<group name="outbound" string="Outbound">
<field name="out_route_id"/>
<field name="out_warehouse_id"/>
<field name="supplier_to_customer"
attrs="{'invisible':[('type', '=', 'customer')]}"/>
</group>
</group>
</form>
</field>
</record>
<record id="action_rma_operation_customer" model="ir.actions.act_window"> <record id="action_rma_operation_customer" model="ir.actions.act_window">
<field name="name">Customer Operations</field> <field name="name">Customer Operations</field>
<field name="res_model">rma.operation</field> <field name="res_model">rma.operation</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="context">{'default_type': "customer"}</field> <field name="context">{'default_type': "customer"}</field>
<field name="domain">[('type','=', 'customer')]</field> <field name="domain">[('type','=', 'customer')]</field>
<field name="view_id" ref="rma_operation_tree"/> <field name="view_id" ref="rma_operation_tree"/>
</record> </record>
<record id="action_rma_operation_supplier" model="ir.actions.act_window"> <record id="action_rma_operation_supplier" model="ir.actions.act_window">
<field name="name">Supplier Operations</field> <field name="name">Supplier Operations</field>
<field name="res_model">rma.operation</field> <field name="res_model">rma.operation</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="context">{'default_type': "supplier"}</field> <field name="context">{'default_type': "supplier"}</field>
<field name="domain">[('type','=', 'supplier')]</field> <field name="domain">[('type','=', 'supplier')]</field>
<field name="view_id" ref="rma_operation_tree"/> <field name="view_id" ref="rma_operation_tree"/>
</record> </record>
<menuitem id="menu_rma_operation_customer" <menuitem id="menu_rma_operation_customer"
name="Customer Operations" name="Customer Operations"
groups="rma.group_rma_manager" groups="rma.group_rma_manager"
sequence="35" sequence="35"
parent="rma.menu_rma_config" parent="rma.menu_rma_config"
action="action_rma_operation_customer"/> action="action_rma_operation_customer"/>
<menuitem id="menu_rma_operation_supplier" <menuitem id="menu_rma_operation_supplier"
name="Supplier Operations" name="Supplier Operations"
groups="rma.group_rma_manager" groups="rma.group_rma_manager"
sequence="40" sequence="40"
parent="rma.menu_rma_config" parent="rma.menu_rma_config"
action="action_rma_operation_supplier"/> action="action_rma_operation_supplier"/>
</data>
</odoo> </odoo>

View File

@@ -37,13 +37,13 @@
</field> </field>
</group> </group>
<newline/> <newline/>
<group colspan="2"> <footer colspan="2">
<button name="make_supplier_rma" <button name="make_supplier_rma"
string="Create/Update Supplier RMA" string="Create/Update Supplier RMA"
type="object" type="object"
class="oe_highlight"/> class="oe_highlight"/>
<button special="cancel" string="Cancel" class="oe_link"/> <button special="cancel" string="Cancel" class="oe_link"/>
</group> </footer>
</form> </form>
</field> </field>
</record> </record>