Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
16
sale_elaboration/views/product_category_views.xml
Executable file
16
sale_elaboration/views/product_category_views.xml
Executable file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record
|
||||
model="ir.ui.view"
|
||||
id="sale_elaboration_product_category_view_form_inherit_elaboration_id"
|
||||
>
|
||||
<field name="name">product.category.view.form.sale.elaboration</field>
|
||||
<field name="model">product.category</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='logistics']" position="inside">
|
||||
<field name="elaboration_profile_id" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
29
sale_elaboration/views/product_views.xml
Executable file
29
sale_elaboration/views/product_views.xml
Executable file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2019 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<field name='default_code' position="after">
|
||||
<field name="is_elaboration" invisible="type != 'service'" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_template_form_view" model="ir.ui.view">
|
||||
<field name="model">product.template</field>
|
||||
<field name="inherit_id" ref="product.product_template_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='description']/.." position="after">
|
||||
<group name="elboration" string="Elaborations">
|
||||
<field
|
||||
name="elaboration_profile_id"
|
||||
invisible="product_variant_count > 1 and not is_product_variant"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
23
sale_elaboration/views/res_config_settings_views.xml
Executable file
23
sale_elaboration/views/res_config_settings_views.xml
Executable file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view" model="ir.ui.view">
|
||||
<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="//setting[@id='group_lot_on_delivery_slip']" position="after">
|
||||
<setting
|
||||
help="Elaboration notes will appear on the delivery slip"
|
||||
id="group_elaboration_note_on_delivery_slip"
|
||||
>
|
||||
<field name="group_elaboration_note_on_delivery_slip" />
|
||||
</setting>
|
||||
<setting
|
||||
help="Elaboration notes will appear on the picking operations report"
|
||||
id="group_elaboration_note_on_picking_operations"
|
||||
>
|
||||
<field name="group_elaboration_note_on_picking_operations" />
|
||||
</setting>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
58
sale_elaboration/views/sale_elaboration_profile_views.xml
Executable file
58
sale_elaboration/views/sale_elaboration_profile_views.xml
Executable file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="product_elaboration_profile_tree_view" model="ir.ui.view">
|
||||
<field name="name">product.elaboration.profile.tree.view</field>
|
||||
<field name="model">product.elaboration.profile</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="name" />
|
||||
<field name="code" />
|
||||
<field name="active" widget="boolean_toggle" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="product_elaboration_profile_form_view" model="ir.ui.view">
|
||||
<field name="name">product.elaboration.profile.form.view</field>
|
||||
<field name="model">product.elaboration.profile</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
<group>
|
||||
<field name="name" />
|
||||
<field name="code" />
|
||||
</group>
|
||||
<group string="Elaborations">
|
||||
<field name="elaboration_ids" nolabel="1" colspan="2" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sale_elaboration_profile_action" model="ir.actions.act_window">
|
||||
<field name="name">Sale Elaboration Profiles</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.elaboration.profile</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_sale_elaboration_root"
|
||||
name="Elaborations"
|
||||
parent="sale.menu_sale_config"
|
||||
sequence="60"
|
||||
/>
|
||||
<menuitem
|
||||
id="menu_sale_elaboration_profile"
|
||||
action="sale_elaboration_profile_action"
|
||||
parent="menu_sale_elaboration_root"
|
||||
sequence="10"
|
||||
/>
|
||||
</odoo>
|
||||
86
sale_elaboration/views/sale_elaboration_report_views.xml
Executable file
86
sale_elaboration/views/sale_elaboration_report_views.xml
Executable file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
Copyright 2019 Tecnativa - Pedro M. Baeza
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="report_elaboration_view_tree" model="ir.ui.view">
|
||||
<field name="name">Elaborations</field>
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="arch" type="xml">
|
||||
<list create="false">
|
||||
<field name="date_order" />
|
||||
<field name="scheduled_date" />
|
||||
<field name="order_id" />
|
||||
<field name="salesman_id" />
|
||||
<field name="order_partner_id" />
|
||||
<field name="product_id" />
|
||||
<field name="elaboration_ids" widget="many2many_tags" />
|
||||
<field name="elaboration_note" />
|
||||
<field name="product_uom_qty" />
|
||||
<field name="product_uom" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_sales_order_line_filter" model="ir.ui.view">
|
||||
<field name="model">sale.order.line</field>
|
||||
<field name="inherit_id" ref="sale.view_sales_order_line_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<separator />
|
||||
<field
|
||||
name="date_order"
|
||||
filter_domain="[('date_order','>=', self)]"
|
||||
string="After Date"
|
||||
/>
|
||||
<field name="elaboration_ids" />
|
||||
<field name="elaboration_note" />
|
||||
<filter
|
||||
string="Is Elaboration"
|
||||
domain="['|', ('elaboration_ids', '!=', False), ('elaboration_note', '!=', '')]"
|
||||
name="is_elaboration"
|
||||
/>
|
||||
<separator />
|
||||
<filter
|
||||
string="Is Prepared"
|
||||
domain="[('is_prepared', '=', True)]"
|
||||
name="is_prepared"
|
||||
/>
|
||||
<filter
|
||||
string="Is Not Prepared"
|
||||
domain="[('is_prepared', '=', False)]"
|
||||
name="is_not_prepared"
|
||||
/>
|
||||
<separator />
|
||||
</field>
|
||||
<group position="inside">
|
||||
<filter
|
||||
string="Elaboration"
|
||||
context="{'group_by':'elaboration_ids'}"
|
||||
name="elaboration_grouped"
|
||||
/>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
<record id="sale_elaboration_report_action" model="ir.actions.act_window">
|
||||
<field name="name">Sale Elaboration Report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sale.order.line</field>
|
||||
<field name="view_mode">list,pivot</field>
|
||||
<field name="domain">[('state', '=', 'sale')]</field>
|
||||
<field name="context">{'search_default_is_elaboration':1}</field>
|
||||
<field name="search_view_id" ref="view_sales_order_line_filter" />
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_sale_elaboration_report"
|
||||
action="sale_elaboration_report_action"
|
||||
parent="sale.menu_sale_report"
|
||||
sequence="60"
|
||||
/>
|
||||
<!-- Allow inventory users to access to elaboration report -->
|
||||
<menuitem
|
||||
id="menu_stock_sale_elaboration_report"
|
||||
action="sale_elaboration_report_action"
|
||||
parent="stock.menu_warehouse_report"
|
||||
sequence="160"
|
||||
/>
|
||||
</odoo>
|
||||
96
sale_elaboration/views/sale_elaboration_views.xml
Executable file
96
sale_elaboration/views/sale_elaboration_views.xml
Executable file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="elaboration_view_form" model="ir.ui.view">
|
||||
<field name="name">Elaborations</field>
|
||||
<field name="model">product.elaboration</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Elaborations">
|
||||
<sheet>
|
||||
<widget
|
||||
name="web_ribbon"
|
||||
title="Archived"
|
||||
bg_color="bg-danger"
|
||||
invisible="active"
|
||||
/>
|
||||
<field name="active" invisible="1" />
|
||||
<group>
|
||||
<field name="code" />
|
||||
<field name="name" />
|
||||
<field
|
||||
name="product_id"
|
||||
context="{'default_is_elaboration': True, 'default_detailed_type': 'service'}"
|
||||
/>
|
||||
</group>
|
||||
<group>
|
||||
<field
|
||||
name="route_ids"
|
||||
widget="many2many_tags"
|
||||
groups="stock.group_adv_location"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="elaboration_view_tree" model="ir.ui.view">
|
||||
<field name="name">Elaborations</field>
|
||||
<field name="model">product.elaboration</field>
|
||||
<field name="arch" type="xml">
|
||||
<list multi_edit="1" editable="top">
|
||||
<field name="code" />
|
||||
<field name="name" />
|
||||
<field
|
||||
name="product_id"
|
||||
context="{'default_is_elaboration': True, 'default_detailed_type': 'service'}"
|
||||
/>
|
||||
<field
|
||||
name="route_ids"
|
||||
widget="many2many_tags"
|
||||
groups="stock.group_adv_location"
|
||||
options="{'no_create': True}"
|
||||
/>
|
||||
<field name="profile_ids" widget="many2many_tags" optional="hide" />
|
||||
<field name="active" widget="boolean_toggle" />
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="elaboration_view_search" model="ir.ui.view">
|
||||
<field name="name">Elaborations</field>
|
||||
<field name="model">product.elaboration</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Elaborations Search">
|
||||
<field name="name" string="Elaboration" />
|
||||
<field name="product_id" />
|
||||
<separator />
|
||||
<filter
|
||||
name="archived"
|
||||
string="Archived"
|
||||
domain="[('active', '=', False)]"
|
||||
/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter
|
||||
string="Product"
|
||||
name="product_id"
|
||||
context="{'group_by': 'product_id'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
<record id="sale_elaboration_action" model="ir.actions.act_window">
|
||||
<field name="name">Sale Elaboration</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">product.elaboration</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="search_view_id" ref="elaboration_view_search" />
|
||||
</record>
|
||||
<menuitem
|
||||
id="menu_sale_elaboration"
|
||||
action="sale_elaboration_action"
|
||||
parent="menu_sale_elaboration_root"
|
||||
sequence="20"
|
||||
/>
|
||||
</odoo>
|
||||
93
sale_elaboration/views/sale_order_views.xml
Executable file
93
sale_elaboration/views/sale_order_views.xml
Executable file
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Sergio Teruel
|
||||
Copyright 2019 Tecnativa - Pedro M. Baeza
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">Sale Elaboration</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='order_line']/form/group" position="inside">
|
||||
<group string="Elaborations" name="elaboration">
|
||||
<field name="elaboration_profile_id" invisible="1" />
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
readonly="not product_updatable or parent.state in ('done', 'cancel')"
|
||||
domain="elaboration_profile_id and [('profile_ids', 'in', [elaboration_profile_id])] or []"
|
||||
/>
|
||||
<field
|
||||
name="elaboration_note"
|
||||
readonly="not product_updatable or parent.state in ('done', 'cancel')"
|
||||
/>
|
||||
<field
|
||||
name="elaboration_price_unit"
|
||||
readonly="1"
|
||||
widget="monetary"
|
||||
invisible="not elaboration_ids"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/list//field[@name='price_unit']"
|
||||
position="after"
|
||||
>
|
||||
<field name="elaboration_profile_id" column_invisible="1" />
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
readonly="not product_updatable or parent.state in ('done', 'cancel')"
|
||||
domain="elaboration_profile_id and [('profile_ids', 'in', [elaboration_profile_id])] or []"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="elaboration_note"
|
||||
readonly="not product_updatable or parent.state in ('done', 'cancel')"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="elaboration_price_unit"
|
||||
readonly="1"
|
||||
widget="monetary"
|
||||
optional="hide"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/kanban//field[@name='currency_id']"
|
||||
position="after"
|
||||
>
|
||||
<field name="elaboration_ids" />
|
||||
<field name="elaboration_note" />
|
||||
<field name="elaboration_price_unit" />
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/kanban//field[@name='price_unit']/.."
|
||||
position="after"
|
||||
>
|
||||
<t t-if="record.elaboration_ids.raw_value.length gt 0">
|
||||
<div>
|
||||
Elaboration price: <field
|
||||
name="elaboration_price_unit"
|
||||
widget="monetary"
|
||||
/>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//field[@name='order_line']/kanban//field[@name='discount']/../.."
|
||||
position="after"
|
||||
>
|
||||
<t t-if="record.elaboration_ids.raw_value.length gt 0">
|
||||
<div class="row mt8">
|
||||
<div class="col-12">
|
||||
<strong>
|
||||
<field name="elaboration_ids" widget="many2many_tags" />
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
53
sale_elaboration/views/stock_move_line_views.xml
Executable file
53
sale_elaboration/views/stock_move_line_views.xml
Executable file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_stock_move_line_operation_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_stock_move_line_operation_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_id" position="after">
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="elaboration_note" optional="hide" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_stock_move_line_detailed_operation_tree" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field
|
||||
name="inherit_id"
|
||||
ref="stock.view_stock_move_line_detailed_operation_tree"
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_id" position="after">
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="elaboration_note" optional="hide" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_move_line_tree_detailed" model="ir.ui.view">
|
||||
<field name="model">stock.move.line</field>
|
||||
<field name="inherit_id" ref="stock.view_move_line_tree_detailed" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_uom_id" position="after">
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
optional="hide"
|
||||
/>
|
||||
<field name="elaboration_note" optional="hide" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
28
sale_elaboration/views/stock_picking_views.xml
Executable file
28
sale_elaboration/views/stock_picking_views.xml
Executable file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2023 Tecnativa - Sergio Teruel
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_picking_form" model="ir.ui.view">
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.view_picking_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath
|
||||
expr="//field[@name='move_ids_without_package']/list/field[@name='picked']"
|
||||
position="before"
|
||||
>
|
||||
<field
|
||||
name="elaboration_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True}"
|
||||
readonly="not is_initial_demand_editable"
|
||||
optional="show"
|
||||
/>
|
||||
<field
|
||||
name="elaboration_note"
|
||||
readonly="not is_initial_demand_editable"
|
||||
optional="show"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user