The aim of this commit is to simplify and standardize the settings archs.
To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.
The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.
```xml
<app string="CRM" name="crm">
...
</app>
```
- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
logo is created using the `name` parameter :
`/{name}/static/description/icon.png`.
The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.
```xml
<block title="Title of group Bar">
...
</block>
```
- `title` *optional* : The title of the block of settings (the old h2),
you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
(the old h3), you can perform research on its text.
The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.
```xml
<setting string="this is bar">
<field name="bar"/>
...More elements
</setting>
```
- `type` *optional* : By default, a setting is visually separated on two
panels (left and right), and is used to edit a given field. By
defining `type='header'`, a special kind of setting is rendered
instead. This setting is used to modify the scope of the other
settings. For example, on the website application, this setting
is used to indicate to which website the other settings apply.
The header setting is visually represented as a yellow banner on
the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
displayed just below the setting label (with classname
`text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
icon is displayed next to the setting label to explicit that
this setting is company-specific.
- `documentation` *optional* : If this attribute is set, an icon is
added next to the setting label, this icon is a link to the
documentation. Note that you can use relative or absolute path.
The relative path is relative to
`https://www.odoo.com/documentation/server_version`, so it's not
necessary to hard-code the server version on the arch anymore.
closes odoo/odoo#106425
Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
195 lines
17 KiB
XML
195 lines
17 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
<record id="res_config_settings_view_form" model="ir.ui.view">
|
|
<field name="name">res.config.settings.view.form.inherit.stock</field>
|
|
<field name="model">res.config.settings</field>
|
|
<field name="priority" eval="30"/>
|
|
<field name="inherit_id" ref="base.res_config_settings_view_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//form" position="inside" >
|
|
<app data-string="Inventory" string="Inventory" name="stock" groups="stock.group_stock_manager">
|
|
<block title="Operations" name="operations_setting_container">
|
|
<setting id="product_packs_tracking" documentation="/applications/inventory_and_mrp/inventory/management/products/usage.html#packages" title="Put your products in packs (e.g. parcels, boxes) and track them" help="Put your products in packs (e.g. parcels, boxes) and track them">
|
|
<field name="group_stock_tracking_lot"/>
|
|
</setting>
|
|
<setting id="process_transfers" help="Process transfers in batch per worker">
|
|
<field name="module_stock_picking_batch"/>
|
|
<div class="row mt-2" attrs="{'invisible': [('module_stock_picking_batch','=',False)]}">
|
|
<field name="group_stock_picking_wave" class="col-lg-1 ml16 mr0"/>
|
|
<div class="col ps-0">
|
|
<label for="group_stock_picking_wave"/>
|
|
<div class="text-muted">Process operations in wave transfers</div>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="warning_info" string="Warnings" help="Get informative or blocking warnings on partners">
|
|
<field name="group_warning_stock"/>
|
|
</setting>
|
|
<setting id="quality_control" help="Add quality checks to your transfer operations">
|
|
<field name="module_quality_control" widget="upgrade_boolean"/>
|
|
<div class="row mt-2" attrs="{'invisible': [('module_quality_control','=',False)]}">
|
|
<field name="module_quality_control_worksheet" widget="upgrade_boolean" class="col-lg-1 ml16 mr0"/>
|
|
<div class="col ps-0">
|
|
<label for="module_quality_control_worksheet"/>
|
|
<div class="text-muted">
|
|
Create customizable worksheets for your quality checks
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="annual_inventory_date" groups='stock.group_stock_manager' string="Annual Inventory Day and Month" help="Day and month that annual inventory counts should occur.">
|
|
<div class="content-group">
|
|
<field name="annual_inventory_day" class="o_light_label" style="width: 30px;"/>
|
|
<field name="annual_inventory_month" class="o_light_label"/>
|
|
</div>
|
|
</setting>
|
|
<setting id="reception_report" help="View and allocate received quantities.">
|
|
<field name="group_stock_reception_report"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Barcode" name="barcode_setting_container">
|
|
<setting id="process_operations_barcodes" help="Process operations faster with barcodes" company_dependent="1" documentation="/applications/inventory_and_mrp/inventory/barcode/setup/software.html">
|
|
<field name="module_stock_barcode" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Shipping" name="shipping_setting_container">
|
|
<setting id="stock_move_email" company_dependent="1" string="Email Confirmation" help="Send an automatic confirmation email when Delivery Orders are done">
|
|
<field name="stock_move_email_validation"/>
|
|
</setting>
|
|
<setting id="stock_sms" company_dependent="1" help="Send an automatic confirmation SMS Text Message when Delivery Orders are done">
|
|
<field name="module_stock_sms"/>
|
|
</setting>
|
|
<setting id="signature_delivery_orders" help="Require a signature on your delivery orders">
|
|
<field name="group_stock_sign_delivery"/>
|
|
</setting>
|
|
<setting id="delivery" help="Compute shipping costs" title="Shipping connectors allow to compute accurate shipping costs, print shipping labels and request carrier picking at your warehouse to ship to the customer. Apply shipping connector from delivery methods.">
|
|
<field name="module_delivery"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Shipping Connectors" name="product_setting_container">
|
|
<setting id="compute_shipping_costs_ups" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html" help="Compute shipping costs and ship with UPS">
|
|
<field name="module_delivery_ups" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="compute_shipping_costs_dhl" help=" Compute shipping costs and ship with DHL" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_dhl" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="compute_shipping_costs_fedex" help="Compute shipping costs and ship with FedEx" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_fedex" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="compute_shipping_costs_usps" help="Compute shipping costs and ship with USPS" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_usps" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="compute_shipping_costs_bpost" help="Compute shipping costs and ship with bpost" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_bpost" widget="upgrade_boolean"/>
|
|
</setting>
|
|
|
|
<setting id="compute_shipping_costs_easypost" help="Compute shipping costs and ship with Easypost" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_easypost" widget="upgrade_boolean"/>
|
|
</setting>
|
|
<setting id="compute_shipping_costs_sendcloud" help="Compute shipping costs and ship with Sendcloud" documentation="/applications/inventory_and_mrp/inventory/shipping/setup/third_party_shipper.html">
|
|
<field name="module_delivery_sendcloud" widget="upgrade_boolean"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Products" name="product_setting_container">
|
|
<setting id="product_attributes" help="Set product attributes (e.g. color, size) to manage variants" documentation="/applications/sales/sales/products_prices/products/variants.html">
|
|
<field name="group_product_variant"/>
|
|
<div class="content-group">
|
|
<div class="mt8" attrs="{'invisible': [('group_product_variant', '=', False)]}">
|
|
<button name="%(product.attribute_action)d" icon="fa-arrow-right" type="action" string="Attributes" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="sell_purchase_uom" help="Sell and purchase products in different units of measure" documentation="/applications/inventory_and_mrp/inventory/management/products/uom.html">
|
|
<field name="group_uom"/>
|
|
<div class="content-group">
|
|
<div class="mt8" attrs="{'invisible': [('group_uom', '=', False)]}">
|
|
<button name="%(uom.product_uom_categ_form_action)d" icon="fa-arrow-right" type="action" string="Units Of Measure" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="manage_product_packaging" title="Manage product packagings (e.g. pack of 6 bottles, box of 10 pieces)" help="Manage product packagings (e.g. pack of 6 bottles, box of 10 pieces)" documentation="/applications/inventory_and_mrp/inventory/management/products/usage.html#packaging">
|
|
<field name="group_stock_packaging"/>
|
|
<div class="content-group">
|
|
<div class="mt8" attrs="{'invisible': [('group_stock_packaging', '=', False)]}">
|
|
<button name="%(product.action_packaging_view)d" icon="fa-arrow-right" type="action" string="Product Packagings" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
<block title="Traceability" id="production_lot_info">
|
|
<setting id="full_traceability" help="Get a full traceability from vendors to customers" documentation="/applications/inventory_and_mrp/inventory/management/lots_serial_numbers/differences.html">
|
|
<field name="group_stock_production_lot"/>
|
|
<div class="row mt-2" attrs="{'invisible': [('group_stock_production_lot','=',False)]}">
|
|
<field name="group_stock_lot_print_gs1" class="col-lg-1 ml16 mr0"/>
|
|
<div class="col ps-0">
|
|
<label for="group_stock_lot_print_gs1"/>
|
|
<div class="text-muted">Use GS1 nomenclature datamatrix whenever barcodes are printed for lots and serial numbers.</div>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="expiration_dates_serial_numbers" help="Set expiration dates on lots & serial numbers" attrs="{'invisible': [('group_stock_production_lot', '=', False)]}" title="Track following dates on lots & serial numbers: best before, removal, end of life, alert. Such dates are set automatically at lot/serial number creation based on values set on the product (in days).">
|
|
<field name="module_product_expiry"/>
|
|
</setting>
|
|
<setting help="Lots & Serial numbers will appear on the delivery slip" attrs="{'invisible': [('group_stock_production_lot', '=', False)]}" id="group_lot_on_delivery_slip">
|
|
<field name="group_lot_on_delivery_slip"/>
|
|
</setting>
|
|
<setting id="owner_stored_products" help="Set owner on stored products" documentation="/applications/inventory_and_mrp/inventory/management/misc/owned_stock.html">
|
|
<field name="group_stock_tracking_owner"/>
|
|
</setting>
|
|
</block>
|
|
<block title="Warehouse" name="warehouse_setting_container">
|
|
<setting id="track_product_location" help="Track product location in your warehouse" documentation="/applications/inventory_and_mrp/inventory/management/warehouses/difference_warehouse_location.html" title="Store products in specific locations of your warehouse (e.g. bins, racks) and to track inventory accordingly.">
|
|
<field name="group_stock_multi_locations"/>
|
|
<div class="content-group">
|
|
<div class="mt8" attrs="{'invisible': [('group_stock_multi_locations', '=', False)]}">
|
|
<button name="%(stock.action_location_form)d" icon="fa-arrow-right" type="action" string="Locations" class="btn-link"/><br/>
|
|
<button name="stock.action_putaway_tree" icon="fa-arrow-right" type="action" string="Putaway Rules" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="use_own_routes" help="Use your own routes" documentation="/applications/inventory_and_mrp/inventory/routes/concepts/use-routes.html" title="Add and customize route operations to process product moves in your warehouse(s): e.g. unload > quality control > stock for incoming products, pick > pack > ship for outgoing products. You can also set putaway strategies on warehouse locations in order to send incoming products into specific child locations straight away (e.g. specific bins, racks).">
|
|
<field name="group_stock_adv_location"/>
|
|
<div class="content-group">
|
|
<div class="mt8" attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
|
|
<button name="%(stock.action_warehouse_form)d" icon="fa-arrow-right" type="action" string="Set Warehouse Routes" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
<setting id="categorize_locations" help="Categorize your locations for smarter putaway rules" attrs="{'invisible': [('group_stock_multi_locations', '=', False)]}">
|
|
<field name="group_stock_storage_categories"/>
|
|
<div class="content-group" attrs="{'invisible': [('group_stock_storage_categories', '=', False)]}">
|
|
<div class="mt8">
|
|
<button name="%(stock.action_storage_category)d" icon="fa-arrow-right" type="action" string="Storage Categories" class="btn-link"/>
|
|
</div>
|
|
<div class="mt4" groups="base.group_no_one">
|
|
<button name="%(stock.action_storage_category_capacity)d" icon="fa-arrow-right" type="action" string="Storage Category Capacity" class="btn-link"/>
|
|
</div>
|
|
</div>
|
|
</setting>
|
|
</block>
|
|
<block title="Advanced Scheduling" id="schedule_info" invisible="1">
|
|
<div id="sale_security_lead"/>
|
|
<div id="purchase_po_lead"/>
|
|
</block>
|
|
</app>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_stock_config_settings" model="ir.actions.act_window">
|
|
<field name="name">Settings</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">res.config.settings</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">inline</field>
|
|
<field name="context">{'module' : 'stock', 'bin_size': False}</field>
|
|
</record>
|
|
|
|
<menuitem id="menu_stock_config_settings" name="Configuration" parent="menu_stock_root"
|
|
sequence="100" groups="group_stock_manager"/>
|
|
<menuitem id="menu_stock_general_settings" name="Settings" parent="menu_stock_config_settings"
|
|
sequence="0" action="action_stock_config_settings" groups="base.group_system"/>
|
|
</data>
|
|
</odoo>
|