Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
61
sale_order_product_recommendation/views/res_config_settings_views.xml
Executable file
61
sale_order_product_recommendation/views/res_config_settings_views.xml
Executable file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="res_config_settings_view_form_sale" model="ir.ui.view">
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="sale.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//setting[@id='quotation_validity_days']/.." position="after">
|
||||
<block
|
||||
title="Sale order recommendations"
|
||||
id="sale_order_recommendation"
|
||||
>
|
||||
<setting
|
||||
string="Product recommendation price origin"
|
||||
help="Select the origin for display product price in sale orders recommendation"
|
||||
>
|
||||
<div class="text-muted">
|
||||
<field name="default_sale_recommendation_price_origin" />
|
||||
</div>
|
||||
</setting>
|
||||
<setting
|
||||
string="Use delivery address"
|
||||
help="If this is selected, it will take care by default on
|
||||
Delivery Address instead of customer on sale orders
|
||||
recommendation"
|
||||
>
|
||||
<field name="default_use_delivery_address" />
|
||||
</setting>
|
||||
<setting
|
||||
string="Default months backwards to generate recommendations"
|
||||
help="If this is selected, it will take care by default on
|
||||
Delivery Address instead of customer on sale orders
|
||||
recommendation"
|
||||
>
|
||||
<field name="default_months" />
|
||||
</setting>
|
||||
<setting string="Default Number of recommendations">
|
||||
<field name="default_line_amount" />
|
||||
</setting>
|
||||
<setting
|
||||
string="Add recommended with zero units included"
|
||||
help="Add recomented products in so even if units included is zero."
|
||||
>
|
||||
<field name="force_zero_units_included" />
|
||||
</setting>
|
||||
<setting
|
||||
string="Sale order product recommendation domain"
|
||||
help="Domain applied on sale orders lines to recommend products for sales"
|
||||
>
|
||||
<div class="text-muted">
|
||||
<field
|
||||
name="sale_line_recommendation_domain"
|
||||
widget="domain"
|
||||
options="{'model': 'sale.order.line'}"
|
||||
/>
|
||||
</div>
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
20
sale_order_product_recommendation/views/sale_order_view.xml
Executable file
20
sale_order_product_recommendation/views/sale_order_view.xml
Executable file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record id="view_order_form" model="ir.ui.view">
|
||||
<field name="name">Recommended products button</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form//header//button[@name='action_draft']" position="after">
|
||||
<button
|
||||
name="%(sale_order_recommendation_action)d"
|
||||
invisible="locked or state == 'cancel'"
|
||||
string="Recommended Products"
|
||||
type="action"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user