mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[IMP] Update pre-commit lints according with OCA ones
This commit is contained in:
committed by
AaronHForgeFlow
parent
66819a207c
commit
7bd96a89bc
@@ -6,13 +6,22 @@
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="name" position="before">
|
||||
<div class="oe_button_box" attrs="{'invisible': [('rma_count', '=', 0)]}">
|
||||
<button type="object" name="action_view_rma_customer"
|
||||
<div
|
||||
class="oe_button_box"
|
||||
attrs="{'invisible': [('rma_count', '=', 0)]}"
|
||||
>
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_rma_customer"
|
||||
class="oe_stat_button"
|
||||
icon="fa-eject"
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user">
|
||||
<field name="rma_count" widget="statinfo"
|
||||
string="RMA"/>
|
||||
groups="rma.group_rma_customer_user,rma.group_rma_supplier_user"
|
||||
>
|
||||
<field
|
||||
name="rma_count"
|
||||
widget="statinfo"
|
||||
string="RMA"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
@@ -29,9 +38,10 @@
|
||||
<data>
|
||||
<field name="name" position="after">
|
||||
<field name="rma_line_count" invisible="1" />
|
||||
<field name="rma_line_id"
|
||||
string="RMA line originated"/>
|
||||
<notebook attrs="{'invisible': [('rma_line_count', '=', 0)]}">
|
||||
<field name="rma_line_id" string="RMA line originated" />
|
||||
<notebook
|
||||
attrs="{'invisible': [('rma_line_count', '=', 0)]}"
|
||||
>
|
||||
<page string="RMA Lines">
|
||||
<field name="rma_line_ids" />
|
||||
</page>
|
||||
@@ -48,14 +58,17 @@
|
||||
<field name="inherit_id" ref="account.view_move_form" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="invoice_vendor_bill_id" position="after">
|
||||
<field name="add_rma_line_id"
|
||||
<field
|
||||
name="add_rma_line_id"
|
||||
context="{'rma': True}"
|
||||
domain="[('type', '=', 'customer'),
|
||||
('partner_id', '=', partner_id)]"
|
||||
attrs="{'readonly': [('state','not in',['draft'])],
|
||||
'invisible': ['|', ('state', '=', 'paid'),
|
||||
('type', '=', 'in_invoice')]}" class="oe_edit_only"
|
||||
options="{'no_create': True}"/>
|
||||
('type', '=', 'in_invoice')]}"
|
||||
class="oe_edit_only"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
|
||||
<odoo>
|
||||
|
||||
<record id="action_rma_account_customer_lines" model="ir.actions.act_window">
|
||||
<record
|
||||
id="action_rma_account_customer_lines"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Customer RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'customer')]</field>
|
||||
@@ -15,45 +18,57 @@
|
||||
<field name="name">Supplier RMA</field>
|
||||
<field name="res_model">rma.order.line</field>
|
||||
<field name="domain">[('type','=', 'supplier')]</field>
|
||||
<field name="context">{"search_default_to_refund":1, "supplier":1}</field>
|
||||
<field
|
||||
name="context"
|
||||
>{"search_default_to_refund":1, "supplier":1}</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="rma.view_rma_line_supplier_tree" />
|
||||
</record>
|
||||
|
||||
<!-- Accountants menu RMA -->
|
||||
<menuitem id="menu_rma_account"
|
||||
<menuitem
|
||||
id="menu_rma_account"
|
||||
name="Accounting"
|
||||
groups="account.group_account_user"
|
||||
sequence="32"
|
||||
parent="rma.menu_rma_root"/>
|
||||
parent="rma.menu_rma_root"
|
||||
/>
|
||||
|
||||
<menuitem id="menu_rma_customer_refunds"
|
||||
<menuitem
|
||||
id="menu_rma_customer_refunds"
|
||||
name="Customer RMA to Refund"
|
||||
sequence="20"
|
||||
parent="rma_account.menu_rma_account"
|
||||
groups="rma.group_rma_customer_user"
|
||||
action="action_rma_account_customer_lines"/>
|
||||
action="action_rma_account_customer_lines"
|
||||
/>
|
||||
|
||||
<menuitem id="menu_rma_line_supplier_refunds"
|
||||
<menuitem
|
||||
id="menu_rma_line_supplier_refunds"
|
||||
name="Supplier RMA to Refund"
|
||||
sequence="20"
|
||||
parent="rma_account.menu_rma_account"
|
||||
groups="rma.group_rma_customer_user"
|
||||
action="action_rma_supplier_lines"/>
|
||||
action="action_rma_supplier_lines"
|
||||
/>
|
||||
|
||||
|
||||
<menuitem id="menu_rma_line_account_customer"
|
||||
<menuitem
|
||||
id="menu_rma_line_account_customer"
|
||||
name="Customer RMA to Refund"
|
||||
sequence="20"
|
||||
parent="account.menu_finance_receivables"
|
||||
groups="rma.group_rma_customer_user"
|
||||
action="action_rma_account_customer_lines"/>
|
||||
action="action_rma_account_customer_lines"
|
||||
/>
|
||||
|
||||
<menuitem id="menu_rma_line_account_supplier"
|
||||
<menuitem
|
||||
id="menu_rma_line_account_supplier"
|
||||
name="Supplier RMA to Refund"
|
||||
sequence="20"
|
||||
parent="account.menu_finance_payables"
|
||||
groups="rma.group_rma_supplier_user"
|
||||
action="action_rma_supplier_lines"/>
|
||||
action="action_rma_supplier_lines"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -6,26 +6,37 @@
|
||||
<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"
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
string="Origin Inv">
|
||||
string="Origin Inv"
|
||||
>
|
||||
</button>
|
||||
<button type="object" name="action_view_refunds"
|
||||
<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"/>
|
||||
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"
|
||||
<field
|
||||
name="account_move_line_id"
|
||||
options="{'no_create': True}"
|
||||
context="{'rma': True}"
|
||||
domain="['|',
|
||||
('move_id.partner_id', '=', partner_id),
|
||||
('move_id.partner_id', 'child_of', partner_id)]"/>
|
||||
('move_id.partner_id', 'child_of', partner_id)]"
|
||||
/>
|
||||
</group>
|
||||
<field name="operation_id" position="after">
|
||||
<field name="refund_policy" />
|
||||
@@ -36,8 +47,10 @@
|
||||
</page>
|
||||
</page>
|
||||
<field name="delivery_address_id" position="after">
|
||||
<field name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'/>
|
||||
<field
|
||||
name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
/>
|
||||
</field>
|
||||
<group name="deliver" position="after">
|
||||
<group name="refund">
|
||||
@@ -54,26 +67,37 @@
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_out_shipments" position="after">
|
||||
<button type="object" name="action_view_invoice"
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
string="Origin Inv">
|
||||
string="Origin Inv"
|
||||
>
|
||||
</button>
|
||||
<button type="object" name="action_view_refunds"
|
||||
<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"/>
|
||||
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"
|
||||
<field
|
||||
name="account_move_line_id"
|
||||
options="{'no_create': True}"
|
||||
context="{'rma': True}"
|
||||
domain="['|',
|
||||
('move_id.partner_id', '=', partner_id),
|
||||
('move_id.partner_id', 'child_of', partner_id)]"/>
|
||||
('move_id.partner_id', 'child_of', partner_id)]"
|
||||
/>
|
||||
</group>
|
||||
<field name="operation_id" position="after">
|
||||
<field name="refund_policy" />
|
||||
@@ -84,8 +108,10 @@
|
||||
</page>
|
||||
</page>
|
||||
<field name="delivery_address_id" position="after">
|
||||
<field name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'/>
|
||||
<field
|
||||
name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'
|
||||
/>
|
||||
</field>
|
||||
<group name="supplier_rma" position="after">
|
||||
<group name="refund">
|
||||
@@ -102,8 +128,12 @@
|
||||
<field name="inherit_id" ref="rma.view_rma_rma_line_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<filter name="to_refund" string="To Refund" domain="[('qty_to_refund', '>', 0)]"
|
||||
context="{'group_by':'partner_id'}"/>
|
||||
<filter
|
||||
name="to_refund"
|
||||
string="To Refund"
|
||||
domain="[('qty_to_refund', '>', 0)]"
|
||||
context="{'group_by':'partner_id'}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,21 +5,32 @@
|
||||
<field name="model">rma.order</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_out_shipments"
|
||||
position="after">
|
||||
<button type="object" name="action_view_invoice_refund"
|
||||
<button name="action_view_out_shipments" position="after">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice_refund"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user">
|
||||
<field name="invoice_refund_count" widget="statinfo"
|
||||
string="Refunds"/>
|
||||
groups="account.group_account_user"
|
||||
>
|
||||
<field
|
||||
name="invoice_refund_count"
|
||||
widget="statinfo"
|
||||
string="Refunds"
|
||||
/>
|
||||
</button>
|
||||
<button type="object" name="action_view_invoice"
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user">
|
||||
<field name="invoice_count" widget="statinfo"
|
||||
string="Origin Inv"/>
|
||||
groups="account.group_account_user"
|
||||
>
|
||||
<field
|
||||
name="invoice_count"
|
||||
widget="statinfo"
|
||||
string="Origin Inv"
|
||||
/>
|
||||
</button>
|
||||
</button>
|
||||
<!--
|
||||
@@ -36,21 +47,32 @@
|
||||
<field name="model">rma.order</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_out_shipments"
|
||||
position="after">
|
||||
<button type="object" name="action_view_invoice_refund"
|
||||
<button name="action_view_out_shipments" position="after">
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice_refund"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user">
|
||||
<field name="invoice_refund_count" widget="statinfo"
|
||||
string="Refunds"/>
|
||||
groups="account.group_account_user"
|
||||
>
|
||||
<field
|
||||
name="invoice_refund_count"
|
||||
widget="statinfo"
|
||||
string="Refunds"
|
||||
/>
|
||||
</button>
|
||||
<button type="object" name="action_view_invoice"
|
||||
<button
|
||||
type="object"
|
||||
name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user">
|
||||
<field name="invoice_count" widget="statinfo"
|
||||
string="Origin Inv"/>
|
||||
groups="account.group_account_user"
|
||||
>
|
||||
<field
|
||||
name="invoice_count"
|
||||
widget="statinfo"
|
||||
string="Origin Inv"
|
||||
/>
|
||||
</button>
|
||||
</button>
|
||||
<!--
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" ?>
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="view_rma_add_account_move" model="ir.ui.view">
|
||||
@@ -8,18 +7,25 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Invoice from customer">
|
||||
<group>
|
||||
<field name="partner_id"
|
||||
<field
|
||||
name="partner_id"
|
||||
domain="[('customer','=',True)]"
|
||||
string="Customer"/>
|
||||
string="Customer"
|
||||
/>
|
||||
</group>
|
||||
<separator string="Select Invoices lines to add" />
|
||||
<field name="line_ids"
|
||||
<field
|
||||
name="line_ids"
|
||||
domain="[('move_id.partner_id', '=', partner_id),
|
||||
('move_id.type', '=', 'out_invoice')]">
|
||||
('move_id.type', '=', 'out_invoice')]"
|
||||
>
|
||||
<tree string="Invoice Lines">
|
||||
<field name="move_id" />
|
||||
<field name="name" />
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field
|
||||
name="account_id"
|
||||
groups="account.group_account_user"
|
||||
/>
|
||||
<field name="quantity" />
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_id" />
|
||||
@@ -32,11 +38,17 @@
|
||||
<footer>
|
||||
<button
|
||||
string="Confirm"
|
||||
name="add_lines" type="object"
|
||||
class="oe_highlight"/>
|
||||
name="add_lines"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button name="action_cancel"
|
||||
string="Cancel" class="oe_link" special="cancel"/>
|
||||
<button
|
||||
name="action_cancel"
|
||||
string="Cancel"
|
||||
class="oe_link"
|
||||
special="cancel"
|
||||
/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
@@ -48,18 +60,25 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Invoice from supplier">
|
||||
<group>
|
||||
<field name="partner_id"
|
||||
<field
|
||||
name="partner_id"
|
||||
domain="[('supplier','=',True)]"
|
||||
string="Supplier"/>
|
||||
string="Supplier"
|
||||
/>
|
||||
</group>
|
||||
<separator string="Select Invoices lines to add" />
|
||||
<field name="line_ids"
|
||||
<field
|
||||
name="line_ids"
|
||||
domain="[('move_id.partner_id', '=', partner_id),
|
||||
('move_id.type', '=', 'in_invoice')]">
|
||||
('move_id.type', '=', 'in_invoice')]"
|
||||
>
|
||||
<tree string="Invoice Lines">
|
||||
<field name="move_id" />
|
||||
<field name="name" />
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field
|
||||
name="account_id"
|
||||
groups="account.group_account_user"
|
||||
/>
|
||||
<field name="quantity" />
|
||||
<field name="product_id" />
|
||||
<field name="product_uom_id" />
|
||||
@@ -72,11 +91,17 @@
|
||||
<footer>
|
||||
<button
|
||||
string="Confirm"
|
||||
name="add_lines" type="object"
|
||||
class="oe_highlight"/>
|
||||
name="add_lines"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
/>
|
||||
or
|
||||
<button name="action_cancel"
|
||||
string="Cancel" class="oe_link" special="cancel"/>
|
||||
<button
|
||||
name="action_cancel"
|
||||
string="Cancel"
|
||||
class="oe_link"
|
||||
special="cancel"
|
||||
/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
@@ -89,10 +114,16 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="view_rma_add_account_move" />
|
||||
<field name="groups_id" eval="[(4, ref('rma.group_rma_customer_user'))]"/>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('rma.group_rma_customer_user'))]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<record id="action_rma_add_account_move_supplier" model="ir.actions.act_window">
|
||||
<record
|
||||
id="action_rma_add_account_move_supplier"
|
||||
model="ir.actions.act_window"
|
||||
>
|
||||
<field name="name">Add Invoice</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">rma_add_account_move</field>
|
||||
@@ -100,7 +131,10 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="view_rma_add_account_move_supplier" />
|
||||
<field name="groups_id" eval="[(4, ref('rma.group_rma_supplier_user'))]"/>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('rma.group_rma_supplier_user'))]"
|
||||
/>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_add_account_move_form" model="ir.ui.view">
|
||||
@@ -109,9 +143,11 @@
|
||||
<field name="inherit_id" ref="rma.view_rma_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="%(action_rma_add_account_move)d"
|
||||
<button
|
||||
name="%(action_rma_add_account_move)d"
|
||||
string="Add From Invoice"
|
||||
type="action"/>
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -122,9 +158,11 @@
|
||||
<field name="inherit_id" ref="rma.view_rma_supplier_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="%(action_rma_add_account_move_supplier)d"
|
||||
<button
|
||||
name="%(action_rma_add_account_move_supplier)d"
|
||||
string="Add From Invoice"
|
||||
type="action"/>
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -26,8 +26,17 @@
|
||||
</tree>
|
||||
</field>
|
||||
<footer>
|
||||
<button string='Create Refund' name="invoice_refund" type="object" class="btn-primary"/>
|
||||
<button string="Cancel" class="btn-default" special="cancel"/>
|
||||
<button
|
||||
string='Create Refund'
|
||||
name="invoice_refund"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
/>
|
||||
<button
|
||||
string="Cancel"
|
||||
class="btn-default"
|
||||
special="cancel"
|
||||
/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
@@ -39,8 +48,10 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_rma_refund" />
|
||||
<field name="binding_model_id" ref="rma.model_rma_order_line" />
|
||||
<field name="groups_id"
|
||||
eval="[(4, ref('account.group_account_invoice'))]"/>
|
||||
<field
|
||||
name="groups_id"
|
||||
eval="[(4, ref('account.group_account_invoice'))]"
|
||||
/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
@@ -50,9 +61,13 @@
|
||||
<field name="inherit_id" ref="rma.view_rma_line_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"/>
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
states="approved"
|
||||
string="Create Refund"
|
||||
class="oe_highlight"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -63,9 +78,13 @@
|
||||
<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"/>
|
||||
<button
|
||||
name="%(action_rma_refund)d"
|
||||
states="approved"
|
||||
string="Create Refund"
|
||||
class="oe_highlight"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user