mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
Merge pull request #159 from ForgeFlow/14.0-fix-rma
[14.0][IMP] rma: rma.line views improvements
This commit is contained in:
@@ -20,22 +20,16 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Operations">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button
|
||||
name="toggle_active"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-archive"
|
||||
>
|
||||
<field
|
||||
name="active"
|
||||
widget="boolean_button"
|
||||
options='{"terminology": "archive"}'
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
attrs="{'invisible': [('active', '=', True)]}"
|
||||
/>
|
||||
<div class="oe_button_box" name="button_box" />
|
||||
<group colspan="4" col="2">
|
||||
<group name="description" string="Description">
|
||||
<field name="active" invisible="1" />
|
||||
<field name="code" />
|
||||
<field name="name" />
|
||||
<field name="type" />
|
||||
|
||||
@@ -48,242 +48,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="RMA Line">
|
||||
<header>
|
||||
<button
|
||||
name="action_rma_to_approve"
|
||||
type="object"
|
||||
string="Request Approval"
|
||||
attrs="{'invisible':[('state', '!=', 'draft')]}"
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
name="action_rma_draft"
|
||||
type="object"
|
||||
string="Back to Draft"
|
||||
attrs="{'invisible':[('state', '=', 'draft')]}"
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user"
|
||||
/>
|
||||
<button
|
||||
name="action_rma_approve"
|
||||
type="object"
|
||||
string="Approve"
|
||||
attrs="{'invisible':[('state', '!=', 'to_approve')]}"
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<button
|
||||
name="action_rma_done"
|
||||
type="object"
|
||||
string="Done"
|
||||
attrs="{'invisible':[('state', 'in', ('done', 'draft'))]}"
|
||||
groups="rma.group_rma_customer_user"
|
||||
/>
|
||||
<field name="state" widget="statusbar" nolabel="1" />
|
||||
</header>
|
||||
<sheet>
|
||||
<div name="button_box" class="oe_button_box">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_in_shipments"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
name="in_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Shipments"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_out_shipments"
|
||||
class="oe_stat_button"
|
||||
icon="fa-truck"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
name="out_shipment_count"
|
||||
widget="statinfo"
|
||||
string="Deliveries"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_rma_lines"
|
||||
class="oe_stat_button"
|
||||
icon="fa-link"
|
||||
groups="stock.group_stock_user"
|
||||
>
|
||||
<field
|
||||
name="rma_line_count"
|
||||
widget="statinfo"
|
||||
string="Customer RMA"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title" name="title">
|
||||
<h1>
|
||||
<field
|
||||
name="name"
|
||||
readonly="1"
|
||||
invisible="context.get('hide_title',False)"
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group name="partner">
|
||||
<field
|
||||
name="partner_id"
|
||||
context="{'res_partner_search_mode': 'supplier'}"
|
||||
string="Supplier"
|
||||
/>
|
||||
<field
|
||||
name="delivery_address_id"
|
||||
domain="['|', ('parent_id', '=', partner_id),('id', '=', partner_id)]"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="product" string="Product">
|
||||
<field name="product_id" />
|
||||
<newline />
|
||||
<field name="product_tracking" invisible="1" />
|
||||
<field
|
||||
name="lot_id"
|
||||
groups="stock.group_production_lot"
|
||||
attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}"
|
||||
domain="[('product_id', '=', product_id)]"
|
||||
/>
|
||||
</group>
|
||||
<group name="product_qty" string="Quantity">
|
||||
<field name="product_qty" />
|
||||
<field name="price_unit" />
|
||||
<field name="uom_id" groups="uom.group_uom" />
|
||||
</group>
|
||||
</group>
|
||||
<group name="main_info" string="Origin">
|
||||
<field
|
||||
name="reference_move_id"
|
||||
options="{'no_create': True}"
|
||||
domain="[('picking_id.partner_id', '=', partner_id),
|
||||
('location_id.usage', '=', 'supplier'),
|
||||
('state', '=', 'done')]"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<group name="operation" string="Operation">
|
||||
<field
|
||||
name="operation_id"
|
||||
domain="[('type','=','supplier')]"
|
||||
/>
|
||||
<field name="receipt_policy" />
|
||||
<field name="delivery_policy" />
|
||||
</group>
|
||||
<group name="description" string="Description">
|
||||
<field name="description" nolabel="1" />
|
||||
</group>
|
||||
<group name="contact" string="Contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="route" string="Routes">
|
||||
<group>
|
||||
<group name="inbound" string="Inbound">
|
||||
<field name="in_warehouse_id" />
|
||||
<field
|
||||
name="location_id"
|
||||
domain="[('usage', '=', 'internal')]"
|
||||
/>
|
||||
<field
|
||||
name="in_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
</group>
|
||||
<group name="outbound" string="Outbound">
|
||||
<field name="out_warehouse_id" />
|
||||
<field
|
||||
name="out_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
<field name="supplier_to_customer" />
|
||||
<field
|
||||
name="customer_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
attrs="{'required':[('supplier_to_customer', '=', True)],
|
||||
'invisible':[('supplier_to_customer', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="stock" string="Stock Moves">
|
||||
<field name="move_ids" nolabel="1" readonly="1" />
|
||||
</page>
|
||||
<page name="quantities" string="Quantities">
|
||||
<group>
|
||||
<group
|
||||
name="quantities"
|
||||
col="4"
|
||||
string="Quantities"
|
||||
>
|
||||
<group name="receive">
|
||||
<field name="qty_to_receive" />
|
||||
<field name="qty_incoming" />
|
||||
<field name="qty_received" />
|
||||
</group>
|
||||
<group name="deliver">
|
||||
<field name="qty_to_deliver" />
|
||||
<field name="qty_outgoing" />
|
||||
<field name="qty_delivered" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="other" string="Other Info">
|
||||
<group name="general" string="General">
|
||||
<field name="conditions" />
|
||||
<field
|
||||
name="rma_id"
|
||||
groups="rma.group_rma_groups"
|
||||
/>
|
||||
<field name="origin" />
|
||||
|
||||
</group>
|
||||
<group
|
||||
name="company"
|
||||
string="Company"
|
||||
groups="base.group_multi_company"
|
||||
>
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field
|
||||
name="message_follower_ids"
|
||||
widget="mail_followers"
|
||||
groups="base.group_user"
|
||||
/>
|
||||
<field name="message_ids" widget="mail_thread" />
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
@@ -303,7 +67,6 @@
|
||||
type="object"
|
||||
string="Back to Draft"
|
||||
attrs="{'invisible':[('state', '=', 'draft')]}"
|
||||
class="oe_highlight"
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user"
|
||||
/>
|
||||
<button
|
||||
@@ -380,7 +143,7 @@
|
||||
/>
|
||||
</h1>
|
||||
</div>
|
||||
<group name="partner">
|
||||
<group>
|
||||
<group name="partner">
|
||||
<field
|
||||
name="partner_id"
|
||||
@@ -395,7 +158,13 @@
|
||||
options="{'always_reload': 1}"
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
/>
|
||||
<field name="under_warranty" />
|
||||
</group>
|
||||
<group>
|
||||
<group name="contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" />
|
||||
<field name="type" invisible="1" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
@@ -408,6 +177,7 @@
|
||||
groups="stock.group_production_lot"
|
||||
attrs="{'required': [('product_tracking', 'in', ('serial', 'lot'))]}"
|
||||
/>
|
||||
<field name="under_warranty" />
|
||||
</group>
|
||||
<group name="product_qty" string="Quantity">
|
||||
<field name="product_qty" />
|
||||
@@ -437,44 +207,7 @@
|
||||
<field name="description" nolabel="1" />
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group name="contact" string="Contact">
|
||||
<field name="requested_by" readonly="1" />
|
||||
<field name="assigned_to" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="route" string="Routes">
|
||||
<group name="inbound" string="Inbound">
|
||||
<field name="in_warehouse_id" />
|
||||
<field
|
||||
name="location_id"
|
||||
domain="[('usage', '=', 'internal')]"
|
||||
/>
|
||||
<field
|
||||
name="in_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
<field name="customer_to_supplier" />
|
||||
<field
|
||||
name="supplier_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
attrs="{'required':[('customer_to_supplier', '=', True)],
|
||||
'invisible':[('customer_to_supplier', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
<group name="outbound" string="Outbound">
|
||||
<field name="out_warehouse_id" />
|
||||
<field
|
||||
name="out_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page name="stock" string="Stock Moves">
|
||||
<field name="move_ids" nolabel="1" readonly="1" />
|
||||
</page>
|
||||
<page name="quantities" string="Quantities">
|
||||
<group name="quantities" col="4" string="Quantities">
|
||||
<group name="receive">
|
||||
@@ -489,13 +222,58 @@
|
||||
</group>
|
||||
<group
|
||||
name="supplier_rma"
|
||||
attrs="{'invisible':[('customer_to_supplier','=',False)]}"
|
||||
attrs="{'invisible':['|', ('type', '!=', 'customer'), ('customer_to_supplier','=',False)]}"
|
||||
>
|
||||
<field name="qty_to_supplier_rma" />
|
||||
<field name="qty_in_supplier_rma" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page name="route" string="Routes">
|
||||
<group name="inbound" string="Inbound">
|
||||
<field name="in_warehouse_id" />
|
||||
<field
|
||||
name="location_id"
|
||||
domain="[('usage', '=', 'internal')]"
|
||||
/>
|
||||
<field
|
||||
name="in_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
<field
|
||||
name="customer_to_supplier"
|
||||
attrs="{'invisible':[('type', '!=', 'customer')]}"
|
||||
/>
|
||||
<field
|
||||
name="supplier_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
attrs="{'required':[('customer_to_supplier', '=', True)],
|
||||
'invisible':[('customer_to_supplier', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
<group name="outbound" string="Outbound">
|
||||
<field name="out_warehouse_id" />
|
||||
<field
|
||||
name="out_route_id"
|
||||
groups="stock.group_adv_location"
|
||||
/>
|
||||
<field
|
||||
name="supplier_to_customer"
|
||||
attrs="{'invisible':[('type', '!=', 'supplier')]}"
|
||||
/>
|
||||
<field
|
||||
name="customer_address_id"
|
||||
context="{'show_address': 1}"
|
||||
options="{'always_reload': 1}"
|
||||
attrs="{'required':[('supplier_to_customer', '=', True)],
|
||||
'invisible':[('supplier_to_customer', '=', False)]}"
|
||||
/>
|
||||
</group>
|
||||
</page>
|
||||
<page name="stock" string="Stock Moves">
|
||||
<field name="move_ids" nolabel="1" readonly="1" />
|
||||
</page>
|
||||
<page name="other" string="Other Info">
|
||||
<group name="general" string="General">
|
||||
<field name="conditions" />
|
||||
@@ -510,8 +288,8 @@
|
||||
string="Company"
|
||||
groups="base.group_multi_company"
|
||||
>
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
<field name="company_id" />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
@@ -527,6 +305,40 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//button[@name='action_view_rma_lines']/field"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="string">Customer RMA</attribute>
|
||||
</xpath>
|
||||
<field name="partner_id" position="attributes">
|
||||
<attribute name="string">Supplier</attribute>
|
||||
<attribute
|
||||
name="context"
|
||||
>{'res_partner_search_mode': 'supplier'}</attribute>
|
||||
</field>
|
||||
<field name="under_warranty" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</field>
|
||||
<field name="reference_move_id" position="attributes">
|
||||
<attribute
|
||||
name="domain"
|
||||
>[('picking_id.partner_id', '=', partner_id),
|
||||
('location_id.usage', '=', 'supplier'),
|
||||
('state', '=', 'done')]</attribute>
|
||||
</field>
|
||||
<field name="operation_id" position="attributes">
|
||||
<attribute name="domain">[('type','=','supplier')]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.select</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
|
||||
@@ -106,40 +106,28 @@
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_picking_in)d"
|
||||
states="approved"
|
||||
string="Create Incoming Shipment"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_receive', '=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_picking_out)d"
|
||||
states="approved"
|
||||
string="Create Delivery"
|
||||
class="oe_highlight"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_button_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_picking_in)d"
|
||||
states="approved"
|
||||
string="Create Incoming Shipment"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_receive', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_picking_out)d"
|
||||
states="approved"
|
||||
string="Create Delivery"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_deliver', '=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_picking_out)d"
|
||||
string="Create Delivery"
|
||||
attrs="{'invisible':['|', ('qty_to_deliver', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
|
||||
@@ -67,9 +67,8 @@
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_supplier_rma)d"
|
||||
states="approved"
|
||||
string="Create Supplier RMA"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('type', '!=', 'customer'), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
|
||||
@@ -5,25 +5,6 @@
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_out_shipments" position="after">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
string="Origin Inv"
|
||||
>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_refunds"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user"
|
||||
>
|
||||
<field name="refund_count" widget="statinfo" string="Refunds" />
|
||||
</button>
|
||||
</button>
|
||||
<group name="main_info" position="inside">
|
||||
<field
|
||||
name="account_move_line_id"
|
||||
@@ -32,28 +13,9 @@
|
||||
domain="[('move_id.move_type', 'not in', ['entry','out_invoice','out_refund']), '|',
|
||||
('move_id.partner_id', '=', partner_id),
|
||||
('move_id.partner_id', 'child_of', partner_id)]"
|
||||
attrs="{'invisible':[('type', '!=', 'supplier')]}"
|
||||
/>
|
||||
</group>
|
||||
<field name="operation_id" position="after">
|
||||
<field name="refund_policy" />
|
||||
</field>
|
||||
<page name="stock" position="after">
|
||||
<page name="refunds" string="Refunds">
|
||||
<field name="refund_line_ids" nolabel="1" />
|
||||
</page>
|
||||
</page>
|
||||
<field name="delivery_address_id" position="after">
|
||||
<field
|
||||
name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
/>
|
||||
</field>
|
||||
<group name="deliver" position="after">
|
||||
<group name="refund">
|
||||
<field name="qty_to_refund" />
|
||||
<field name="qty_refunded" />
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -89,6 +51,7 @@
|
||||
domain="[('move_id.move_type', '!=', 'entry'), '|',
|
||||
('move_id.partner_id', '=', partner_id),
|
||||
('move_id.partner_id', 'child_of', partner_id)]"
|
||||
attrs="{'invisible':[('type', '!=', 'customer')]}"
|
||||
/>
|
||||
</group>
|
||||
<field name="operation_id" position="after">
|
||||
|
||||
@@ -57,29 +57,19 @@
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
states="approved"
|
||||
string="Create Refund"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_refund', '=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
string="Create Refund"
|
||||
attrs="{'invisible':['|', ('qty_to_refund', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_button_refund_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_button_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
states="approved"
|
||||
string="Create Refund"
|
||||
class="oe_highlight"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -8,29 +8,28 @@
|
||||
<field name="view_mode">form,tree</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_button_sale_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_button_form" />
|
||||
<field name="arch" type="xml">
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_purchase_order)d"
|
||||
states="approved"
|
||||
string="Create Purchase Order"
|
||||
class="oe_highlight"
|
||||
context="{'rma_line_id': active_id, 'default_partner_id': partner_id}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_purchase_order)d"
|
||||
string="Create Purchase Order"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_purchase', '=', 0), ('state', '!=', 'approved')]}"
|
||||
context="{'rma_line_id': active_id, 'default_partner_id': partner_id}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_order_line_make_purchase_order)d"
|
||||
string="Create Purchase Order"
|
||||
attrs="{'invisible':['|', ('qty_to_purchase', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
context="{'rma_line_id': active_id, 'default_partner_id': partner_id}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
<div name='button_box' position="inside">
|
||||
<button
|
||||
type="object"
|
||||
|
||||
@@ -11,7 +11,7 @@ class RepairOrder(models.Model):
|
||||
comodel_name="rma.order.line", string="RMA", ondelete="restrict"
|
||||
)
|
||||
under_warranty = fields.Boolean(
|
||||
related="rma_line_id.under_warranty", readonly=False
|
||||
related="rma_line_id.under_warranty",
|
||||
)
|
||||
payment_state = fields.Selection(
|
||||
related="invoice_id.payment_state", string="Payment Status"
|
||||
|
||||
@@ -48,9 +48,15 @@
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_repair)d"
|
||||
states="approved"
|
||||
string="Create Repair Order"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', '|', ('type', '!=', 'customer'), ('qty_to_repair', '=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
<button
|
||||
name="%(action_rma_order_line_make_repair)d"
|
||||
string="Create Repair Order"
|
||||
attrs="{'invisible':['|', '|', ('type', '!=', 'customer'), ('qty_to_repair', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
name="sale_line_id"
|
||||
context="{'rma': True}"
|
||||
options="{'no_create': True}"
|
||||
attrs="{'invisible':[('type', '!=', 'customer')]}"
|
||||
/>
|
||||
</group>
|
||||
<group name="quantities" position="inside">
|
||||
@@ -51,43 +52,6 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_supplier_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name='button_box' position="inside">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_sale_order"
|
||||
class="oe_stat_button"
|
||||
icon="fa-strikethrough"
|
||||
groups="sales_team.group_sale_salesman_all_leads"
|
||||
>
|
||||
<field
|
||||
name="sales_count"
|
||||
widget="statinfo"
|
||||
string="Sales Orders"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
<group name="quantities" position="inside">
|
||||
<group>
|
||||
<field name="qty_to_sell" />
|
||||
<field name="qty_sold" />
|
||||
</group>
|
||||
</group>
|
||||
<field name="delivery_policy" position="after">
|
||||
<field name="sale_policy" />
|
||||
</field>
|
||||
<notebook position="inside">
|
||||
<page name="sale" string="Sale Lines">
|
||||
<field name="sale_line_ids" nolabel="1" />
|
||||
</page>
|
||||
</notebook>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_button_sale_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
@@ -96,25 +60,15 @@
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_sale_order)d"
|
||||
states="approved"
|
||||
string="Create Sales Quotation"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_sell', '=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_rma_line_supplier_button_sale_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.supplier.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_supplier_button_form" />
|
||||
<field name="arch" type="xml">
|
||||
<header position="inside">
|
||||
<button
|
||||
name="%(action_rma_order_line_make_sale_order)d"
|
||||
states="approved"
|
||||
string="Create Sales Quotation"
|
||||
class="oe_highlight"
|
||||
attrs="{'invisible':['|', ('qty_to_sell', '!=', 0), ('state', '!=', 'approved')]}"
|
||||
type="action"
|
||||
/>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user