summaryrefslogtreecommitdiff
path: root/addons/purchase_stock/views
diff options
context:
space:
mode:
Diffstat (limited to 'addons/purchase_stock/views')
-rw-r--r--addons/purchase_stock/views/assets.xml8
-rw-r--r--addons/purchase_stock/views/product_category_views.xml13
-rw-r--r--addons/purchase_stock/views/purchase_views.xml72
-rw-r--r--addons/purchase_stock/views/res_config_settings_views.xml78
-rw-r--r--addons/purchase_stock/views/res_partner_views.xml30
-rw-r--r--addons/purchase_stock/views/stock_production_lot_views.xml35
-rw-r--r--addons/purchase_stock/views/stock_rule_views.xml17
-rw-r--r--addons/purchase_stock/views/stock_views.xml40
8 files changed, 293 insertions, 0 deletions
diff --git a/addons/purchase_stock/views/assets.xml b/addons/purchase_stock/views/assets.xml
new file mode 100644
index 00000000..8724db5b
--- /dev/null
+++ b/addons/purchase_stock/views/assets.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<odoo>
+ <template id="assets_backend" name="purchase stock assets" inherit_id="web.assets_backend">
+ <xpath expr="script[last()]" position="after">
+ <script type="text/javascript" src="/purchase_stock/static/src/js/tours/purchase_stock.js"></script>
+ </xpath>
+ </template>
+</odoo>
diff --git a/addons/purchase_stock/views/product_category_views.xml b/addons/purchase_stock/views/product_category_views.xml
new file mode 100644
index 00000000..43320f30
--- /dev/null
+++ b/addons/purchase_stock/views/product_category_views.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="product_category_view_form" model="ir.ui.view">
+ <field name="name">product.category.view.form.inherit.purchase.stock</field>
+ <field name="model">product.category</field>
+ <field name="inherit_id" ref="purchase.view_category_property_form"/>
+ <field name="arch" type="xml">
+ <field name="property_account_creditor_price_difference_categ" position="attributes">
+ <attribute name="attrs">{'invisible':[('property_valuation', '=', 'manual_periodic')]}</attribute>
+ </field>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/purchase_stock/views/purchase_views.xml b/addons/purchase_stock/views/purchase_views.xml
new file mode 100644
index 00000000..6f850b62
--- /dev/null
+++ b/addons/purchase_stock/views/purchase_views.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="purchase_order_view_form_inherit" model="ir.ui.view">
+ <field name="name">purchase.order.form.inherit</field>
+ <field name="model">purchase.order</field>
+ <field name="inherit_id" ref="purchase.purchase_order_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//header/button[@name='action_rfq_send']" position="after">
+ <button name="action_view_picking" string="Receive Products" class="oe_highlight" type="object" attrs="{'invisible': ['|', '|' , ('is_shipped', '=', True), ('state','not in', ('purchase','done')), ('picking_count', '=', 0)]}"/>
+ </xpath>
+ <xpath expr="//header/button[@name='confirm_reminder_mail']" position="attributes">
+ <attribute name="attrs">{'invisible': ['|', '|', '|', ('state', 'not in', ('purchase', 'done')), ('mail_reminder_confirmed', '=', True), ('date_planned', '=', False), ('effective_date', '!=', False)]}</attribute>
+ </xpath>
+ <xpath expr="//div[hasclass('oe_button_box')]" position="inside">
+ <button type="object"
+ name="action_view_picking"
+ class="oe_stat_button"
+ icon="fa-truck" attrs="{'invisible':[('picking_ids','=',[])]}">
+ <field name="picking_count" widget="statinfo" string="Receipt" help="Incoming Shipments"/>
+ <field name="picking_ids" invisible="1"/>
+ </button>
+ </xpath>
+ <xpath expr="//field[@name='currency_id']" position="after">
+ <field name="is_shipped" invisible="1"/>
+ </xpath>
+ <xpath expr="//field[@name='order_line']/tree//field[@name='date_planned']" position="after">
+ <field name="move_dest_ids" invisible="1"/>
+ </xpath>
+ <xpath expr="//div[@name='date_planned_div']" position="inside">
+ <button name="%(action_purchase_vendor_delay_report)d" class="oe_link" type="action" context="{'search_default_partner_id': partner_id}" attrs="{'invisible': ['|', ('state', 'in', ['purchase', 'done']), ('partner_id', '=', False)]}">
+ <span attrs="{'invisible': [('on_time_rate', '&lt;', 0)]}"><field name="on_time_rate" widget="integer" class="oe_inline"/>% On-Time Delivery</span>
+ <span attrs="{'invisible': [('on_time_rate', '&gt;=', 0)]}">No On-time Delivery Data</span>
+ </button>
+ </xpath>
+ <xpath expr="//div[@name='reminder']" position="attributes">
+ <attribute name="attrs">{'invisible': [('effective_date', '!=', False)]}</attribute>
+ </xpath>
+ <xpath expr="//div[@name='reminder']" position="after">
+ <field name="effective_date" attrs="{'invisible': [('effective_date', '=', False)]}"/>
+ </xpath>
+ <xpath expr="//field[@name='order_line']/form//field[@name='invoice_lines']" position="after">
+ <field name="move_ids"/>
+ </xpath>
+ <xpath expr="//field[@name='order_line']/form//field[@name='account_analytic_id']" position="before">
+ <field name="propagate_cancel" groups="base.group_no_one"/>
+ </xpath>
+ <xpath expr="//field[@name='order_line']/tree//field[@name='qty_received']" position="attributes">
+ <attribute name="attrs">{'column_invisible': [('parent.state', 'not in', ('purchase', 'done'))], 'readonly': [('product_type', 'in', ('consu', 'product'))]}</attribute>
+ </xpath>
+ <xpath expr="//page[@name='purchase_delivery_invoice']/group/group" position="inside">
+ <field name="picking_type_id" domain="[('code','=','incoming'), '|', ('warehouse_id', '=', False), ('warehouse_id.company_id', '=', company_id)]" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
+ <field name="dest_address_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}"/>
+ <field name="default_location_dest_id_usage" invisible="1"/>
+ <field name="incoterm_id"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="purchase_order_line_view_form_inherit" model="ir.ui.view">
+ <field name="name">purchase.order.line.form.inherit</field>
+ <field name="model">purchase.order.line</field>
+ <field name="inherit_id" ref="purchase.purchase_order_line_form2"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='invoice_lines']" position="after">
+ <separator string="Stock Moves"/>
+ <field name="move_ids"/>
+ </xpath>
+ </field>
+ </record>
+
+</odoo>
diff --git a/addons/purchase_stock/views/res_config_settings_views.xml b/addons/purchase_stock/views/res_config_settings_views.xml
new file mode 100644
index 00000000..8bfcde03
--- /dev/null
+++ b/addons/purchase_stock/views/res_config_settings_views.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="res_config_settings_view_form_purchase" model="ir.ui.view">
+ <field name="name">res.config.settings.view.form.inherit.purchase</field>
+ <field name="model">res.config.settings</field>
+ <field name="priority" eval="25"/>
+ <field name="inherit_id" ref="purchase.res_config_settings_view_form_purchase"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[@data-key='purchase']" position="inside">
+ <field name="is_installed_sale" invisible="1"/>
+ <h2 attrs="{'invisible': [('is_installed_sale', '=', False)]}">Logistics</h2>
+ <div class="row mt16 o_settings_container" name="request_vendor_setting_container">
+ <div class="col-12 col-lg-6 o_setting_box" attrs="{'invisible': [('is_installed_sale', '=', False)]}" title="This adds a dropshipping route to apply on products in order to request your vendors to deliver to your customers. A product to dropship will generate a purchase request for quotation once the sales order confirmed. This is a on-demand flow. The requested delivery address will be the customer delivery address and not your warehouse.">
+ <div class="o_setting_left_pane">
+ <field name="module_stock_dropshipping"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_stock_dropshipping"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/delivery/dropshipping.html" title="Documentation" class="o_doc_link" target="_blank"></a>
+ <div class="text-muted">
+ Request your vendors to deliver to your customers
+ </div>
+ </div>
+ </div>
+ </div>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="res_config_settings_view_form_stock" model="ir.ui.view">
+ <field name="name">res.config.settings.view.form.inherit.purchase.stock</field>
+ <field name="model">res.config.settings</field>
+ <field name="inherit_id" ref="stock.res_config_settings_view_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//h2[@id='schedule_info']" position="attributes">
+ <attribute name="invisible">0</attribute>
+ </xpath>
+ <div id="purchase_po_lead" position="replace">
+ <div class="col-12 col-lg-6 o_setting_box"
+ title="Margin of error for vendor lead times. When the system generates Purchase Orders for reordering products,they will be scheduled that many days earlier to cope with unexpected vendor delays."
+ name="schedule_receivings_setting_container">
+ <div class="o_setting_left_pane">
+ <field name="use_po_lead"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="use_po_lead"/>
+ <a href="https://www.odoo.com/documentation/14.0/applications/inventory_and_mrp/inventory/management/planning/scheduled_dates.html" title="Documentation" class="mr-2 o_doc_link" target="_blank"></a>
+ <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." groups="base.group_multi_company"/>
+ <div class="text-muted">
+ Schedule receivings earlier to avoid delays
+ </div>
+ <div class="content-group">
+ <div class="mt16" attrs="{'invisible': [('use_po_lead','=',False)]}">
+ <span>Move forward expected delivery dates by <field name="po_lead" class="oe_inline"/> days</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="col-12 col-lg-6 o_setting_box">
+ <div class="o_setting_right_pane">
+ <label for="days_to_purchase"/>
+ <span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company"/>
+ <div class="text-muted">
+ Days needed to confirm a PO, define when a PO should be validated
+ </div>
+ <div class="content-group">
+ <div class="mt16">
+ <span><field name="days_to_purchase" class="oe_inline"/> days</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </field>
+ </record>
+
+</odoo>
diff --git a/addons/purchase_stock/views/res_partner_views.xml b/addons/purchase_stock/views/res_partner_views.xml
new file mode 100644
index 00000000..b86ca351
--- /dev/null
+++ b/addons/purchase_stock/views/res_partner_views.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="res_partner_view_purchase_buttons_inherit" model="ir.ui.view">
+ <field name="name">res.partner.purchase.stock.form.inherit</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="purchase.res_partner_view_purchase_buttons"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='purchase_order_count']/.." position="after">
+ <button class="oe_stat_button" name="%(action_purchase_vendor_delay_report)d" type="action"
+ groups="purchase.group_purchase_user"
+ icon="fa-truck"
+ context="{'search_default_partner_id': id}">
+ <div class="o_form_field o_stat_info">
+ <div class="o_row" attrs="{'invisible': [('on_time_rate', '&lt;', 0)]}">
+ <span class="o_stat_value">
+ <field string="On-time Rate" name="on_time_rate" widget="integer"/>
+ </span>
+ <span class="o_stat_value">%</span>
+ </div>
+ <div class="o_stat_value" attrs="{'invisible': [('on_time_rate', '&gt;=', 0)]}">
+ No data yet
+ </div>
+ <span class="o_stat_text">On-time Rate</span>
+ </div>
+ </button>
+ </xpath>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/purchase_stock/views/stock_production_lot_views.xml b/addons/purchase_stock/views/stock_production_lot_views.xml
new file mode 100644
index 00000000..15211756
--- /dev/null
+++ b/addons/purchase_stock/views/stock_production_lot_views.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="stock_production_lot_view_form" model="ir.ui.view">
+ <field name="name">stock.production.lot.view.form</field>
+ <field name="model">stock.production.lot</field>
+ <field name="inherit_id" ref="stock.view_production_lot_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[hasclass('oe_button_box')]/button" position="before">
+ <button class="oe_stat_button" name="action_view_po"
+ type="object" icon="fa-shopping-cart" help="Purchase Orders"
+ attrs="{'invisible': ['|', ('purchase_order_count', '=', 0), ('display_complete', '=', False)]}">
+ <div class="o_field_widget o_stat_info">
+ <span class="o_stat_value">
+ <field name="purchase_order_count" widget="statinfo" nolabel="1" class="mr4"/>
+ </span>
+ <span class="o_stat_text">Purchases</span>
+ </div>
+ </button>
+ </xpath>
+ <xpath expr="//group[@name='main_group']" position="after">
+ <group>
+ <field name="purchase_order_ids" widget="many2many" readonly="True"
+ attrs="{'invisible': ['|', ('purchase_order_ids', '=', []), ('display_complete', '=', True)]}">
+ <tree>
+ <field name="name"/>
+ <field name="partner_id"/>
+ <field name="date_order"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ </group>
+ </xpath>
+ </field>
+ </record>
+</odoo>
diff --git a/addons/purchase_stock/views/stock_rule_views.xml b/addons/purchase_stock/views/stock_rule_views.xml
new file mode 100644
index 00000000..adbdd662
--- /dev/null
+++ b/addons/purchase_stock/views/stock_rule_views.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!-- Stock rules -->
+ <record id="view_stock_rule_form_stock_inherit_purchase_stock" model="ir.ui.view">
+ <field name="name">stock.rule.form.stock.inherit.purchase_stock</field>
+ <field name="model">stock.rule</field>
+ <field name="inherit_id" ref="stock.view_stock_rule_form"/>
+ <field name="arch" type="xml">
+ <field name="location_src_id" position="attributes">
+ <attribute name="attrs">{'required': [('action', 'in', ['pull', 'push', 'pull_push'])], 'invisible': [('action', '=', 'buy')]}</attribute>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</odoo>
diff --git a/addons/purchase_stock/views/stock_views.xml b/addons/purchase_stock/views/stock_views.xml
new file mode 100644
index 00000000..2ea08b5e
--- /dev/null
+++ b/addons/purchase_stock/views/stock_views.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="stock_move_purchase" model="ir.ui.view">
+ <field name="name">stock.move.form</field>
+ <field name="model">stock.move</field>
+ <field name="inherit_id" ref="stock.view_move_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='origin_grp']" position="inside">
+ <field name="purchase_line_id"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_warehouse_inherited" model="ir.ui.view">
+ <field name="name">Stock Warehouse Inherited</field>
+ <field name="model">stock.warehouse</field>
+ <field name="inherit_id" ref="stock.view_warehouse"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='resupply_wh_ids']" position="before">
+ <field name="buy_to_resupply" />
+ </xpath>
+ <xpath expr="//group[@name='group_resupply']" position="attributes">
+ <attribute name="attrs">{}</attribute>
+ </xpath>
+ </field>
+ </record>
+
+ <record id="view_warehouse_orderpoint_tree_editable_inherited_mrp" model="ir.ui.view">
+ <field name="name">stock.warehouse.orderpoint.tree.editable.inherit.mrp</field>
+ <field name="model">stock.warehouse.orderpoint</field>
+ <field name="inherit_id" ref="stock.view_warehouse_orderpoint_tree_editable"/>
+ <field name="arch" type="xml">
+ <field name="route_id" position="after">
+ <field name="show_supplier" invisible="1"/>
+ <field name="supplier_id" optional="hide" attrs="{'invisible': [('show_supplier', '=', False)]}" options="{'no_create': True}"/>
+ </field>
+ </field>
+ </record>
+
+</odoo>