Initialize v18 branch
Rename *_usability modules to *_usability_akretion
This commit is contained in:
22
purchase_usability_akretion/views/account_move.xml
Normal file
22
purchase_usability_akretion/views/account_move.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2022 Akretion France (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_move_form" model="ir.ui.view">
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="purchase.view_move_form_inherit_purchase"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="button_draft" position="after">
|
||||
<button name="delete_lines_qty_zero" attrs="{'invisible': ['|', ('state', '!=', 'draft'), ('move_type', '!=', 'in_invoice')]}" string="Delete Lines Qty=0" type="object"/>
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</odoo>
|
||||
122
purchase_usability_akretion/views/purchase_order.xml
Normal file
122
purchase_usability_akretion/views/purchase_order.xml
Normal file
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014-2020 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="purchase_order_form" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.form</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_rfq_send" states="purchase" position="after">
|
||||
<button name="%(purchase.action_report_purchase_order)d" states="purchase,done" string="Print" type="action"/>
|
||||
</button>
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="widget">selection</attribute>
|
||||
</field>
|
||||
<button name="button_cancel" type="object" position="attributes">
|
||||
<attribute name="confirm">Are you sure you want to cancel this purchase order?</attribute>
|
||||
</button>
|
||||
<xpath expr="//field[@name='order_line']/tree//field[@name='product_id']" position="after">
|
||||
<field name="product_supplier_code" optional="hide"/>
|
||||
<field name="product_barcode" optional="hide"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase_order_tree" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.tree</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- the 'origin' field can be very long ; it can list a lot of MO or OP!
|
||||
I think limiting the size of the field would not be the best option,
|
||||
because the info it carries can be interesting. So we just hide it by default -->
|
||||
<field name="origin" position="attributes">
|
||||
<attribute name="optional">hide</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_purchase_order_filter" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.tree</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.view_purchase_order_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<group expand="0" position="inside">
|
||||
<filter string="Billing Status" name="invoice_status_groupby" context="{'group_by': 'invoice_status'}"/>
|
||||
</group>
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="string">Reference, Origin or Vendor Reference</attribute>
|
||||
<attribute name="filter_domain">['|', '|', '|', ('name', 'ilike', self), ('origin', 'ilike', self), ('partner_ref', 'ilike', self), ('partner_id', 'child_of', self)]</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Default measure should be Total without taxes instead of Total with taxes -->
|
||||
<record id="purchase_order_pivot" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.pivot</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_pivot"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_total" type="measure" position="replace">
|
||||
<field name="amount_untaxed" type="measure"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase_order_graph" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.graph</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_graph"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_total" type="measure" position="replace">
|
||||
<field name="amount_untaxed" type="measure"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase_order_calendar" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.calendar</field>
|
||||
<field name="model">purchase.order</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_calendar"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="amount_total" position="replace">
|
||||
<field name="amount_untaxed" widget="monetary"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Do not show cancelled quotations by default in "Requests for Quotation" -->
|
||||
<record id="purchase.purchase_rfq" model="ir.actions.act_window">
|
||||
<field name="context">{'search_default_draft': 1, 'quotation_only': True}</field>
|
||||
<field name="domain">[('state', 'not in', ('purchase', 'done'))]</field>
|
||||
</record>
|
||||
|
||||
<record id="purchase_order_line_tree" model="ir.ui.view">
|
||||
<field name="name">usability.purchase.order.line.tree</field>
|
||||
<field name="model">purchase.order.line</field>
|
||||
<field name="inherit_id" ref="purchase.purchase_order_line_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<field name="name" position="move"/>
|
||||
</field>
|
||||
<field name="product_qty" position="after">
|
||||
<field name="qty_received"/>
|
||||
<field name="qty_invoiced"/>
|
||||
</field>
|
||||
<field name="product_uom" position="after">
|
||||
<field name="price_unit" position="move"/>
|
||||
</field>
|
||||
<field name="date_planned" position="after">
|
||||
<field name="state"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
14
purchase_usability_akretion/views/purchase_report.xml
Normal file
14
purchase_usability_akretion/views/purchase_report.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2014-2022 Akretion (http://www.akretion.com/)
|
||||
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
-->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record id="purchase.action_purchase_order_report_all" model="ir.actions.act_window">
|
||||
<field name="view_mode">pivot,graph,tree</field> <!--- native order is graph,pivot. Switch order and add tree -->
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user