diff options
| author | XavierDo <xdo@odoo.com> | 2018-02-14 11:11:49 +0100 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2018-02-26 14:27:26 +0100 |
| commit | 6a378e383910ab597359f95c38028b229fc82cc7 (patch) | |
| tree | d57505eb382baf08a5ea74863f83e7f11acbb634 /addons/uom/views | |
| parent | 9de5d41754b3b26a8c61d9f6dc4de64221c1d48a (diff) | |
[IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.
This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
Diffstat (limited to 'addons/uom/views')
| -rw-r--r-- | addons/uom/views/uom_uom_views.xml | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/addons/uom/views/uom_uom_views.xml b/addons/uom/views/uom_uom_views.xml new file mode 100644 index 00000000000..149f48d4ce8 --- /dev/null +++ b/addons/uom/views/uom_uom_views.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="product_uom_tree_view" model="ir.ui.view"> + <field name="name">product.uom.tree</field> + <field name="model">product.uom</field> + <field name="arch" type="xml"> + <tree string="Units of Measure"> + <field name="name"/> + <field name="category_id"/> + <field name="uom_type"/> + </tree> + </field> + </record> + + <record id="product_uom_form_view" model="ir.ui.view"> + <field name="name">product.uom.form</field> + <field name="model">product.uom</field> + <field name="arch" type="xml"> + <form string="Units of Measure"> + <group> + <group> + <field name="name"/> + <field name="category_id"/> + <field name="uom_type"/> + <field name="factor" + digits="[42,5]" + attrs="{'invisible':[('uom_type','!=','smaller')], + 'readonly':[('uom_type','=','bigger')]}"/> + <field name="factor_inv" + digits="[42,5]" + attrs="{'invisible':[('uom_type','!=','bigger')], + 'readonly':[('uom_type','!=','bigger')]}"/> + <p attrs="{'invisible':[('uom_type','!=','smaller')]}" class="oe_grey" colspan="2"> + e.g: 1 * (reference unit) = ratio * (this unit) + </p> + <p attrs="{'invisible':[('uom_type','!=','bigger')]}" class="oe_grey" colspan="2"> + e.g: 1 * (this unit) = ratio * (reference unit) + </p> + </group> + <group> + <field name="active"/> + <field name="rounding" digits="[42, 5]"/> + </group> + </group> + </form> + </field> + </record> + <record id="product_uom_form_action" model="ir.actions.act_window"> + <field name="name">Units of Measure</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">product.uom</field> + <field name="view_type">form</field> + <field name="view_id" ref="product_uom_tree_view"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Add a new unit of measure + </p><p> + You must define a conversion rate between several Units of + Measure within the same category. + </p> + </field> + </record> + + <record id="product_uom_categ_form_view" model="ir.ui.view"> + <field name="name">product.uom.categ.form</field> + <field name="model">product.uom.categ</field> + <field name="arch" type="xml"> + <form string="Units of Measure categories"> + <group> + <field name="name"/> + </group> + </form> + </field> + </record> + <record id="product_uom_categ_form_action" model="ir.actions.act_window"> + <field name="name">Unit of Measure Categories</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">product.uom.categ</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Add a new unit of measure category + </p><p> + Units of measure belonging to the same category can be + converted between each others. For example, in the category + <i>'Time'</i>, you will have the following units of measure: + Hours, Days. + </p> + </field> + </record> +</odoo>
\ No newline at end of file |
