Skip to content

Commit

Permalink
Merge PR #1511 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
OCA-git-bot committed Mar 11, 2024
2 parents bfef029 + fe138ac commit d4db91a
Show file tree
Hide file tree
Showing 27 changed files with 1,250 additions and 0 deletions.
91 changes: 91 additions & 0 deletions product_uom_use_type/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
======================
Product UoM - Use Type
======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproduct--attribute-lightgray.png?logo=github
:target: https://github.com/OCA/product-attribute/tree/12.0/product_uom_use_type
:alt: OCA/product-attribute
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_uom_use_type
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/135/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends unities of measure (uom) by sorting them into three
categories :

* uom for sales only
* uom for purchases only
* uom for both sales and purchases (**default**).

.. figure:: https://raw.githubusercontent.com/OCA/product-attribute/12.0/product_uom_use_type/static/description/use_type_list.png

**Table of contents**

.. contents::
:local:

Configuration
=============

Every unities of measure's use type will be set as **both** by default.

If you want to change that (or when you create a new unity of measure),
set use type field with sales/purchase/both.

.. figure:: https://raw.githubusercontent.com/OCA/product-attribute/12.0/product_uom_use_type/static/description/use_type_form.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/product-attribute/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_uom_use_type%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Quentin Dupont <[email protected]>
* Sylvain LE GAL <https://twitter.com/legalsylvain>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/product-attribute <https://github.com/OCA/product-attribute/tree/12.0/product_uom_use_type>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions product_uom_use_type/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions product_uom_use_type/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2019, Grap
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product UoM - Use Type",
"summary": "Define UoM for Sale and / or for Purchase purpose",
"version": "16.0.1.0.0",
"category": "Product",
"website": "https://github.com/OCA/product-attribute",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"license": "AGPL-3",
"depends": ["product", "uom"],
"data": ["views/view_product_uom.xml"],
"demo": [
"demo/product_uom.xml",
"demo/product_template.xml",
"demo/res_groups.xml",
],
"installable": True,
}
20 changes: 20 additions & 0 deletions product_uom_use_type/demo/product_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
@author: Quentin DUPONT
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record model="product.template" id="product_bier_faucheuse">
<field name="name">Bier - La Faucheuse</field>
<field name="uom_id" ref="uom.product_uom_litre" />
<field name="uom_po_id" ref="uom.product_uom_litre" />
<field
name="image_1920"
type="base64"
file="product_uom_use_type/static/src/img/demo/bier_faucheuse.png"
/>
</record>

</odoo>
27 changes: 27 additions & 0 deletions product_uom_use_type/demo/product_uom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
@author: Quentin DUPONT
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record model="uom.uom" id="product_uom_barrel">
<field name="name">Barrel - 159L (Unit only for purchases)</field>
<field name="category_id" ref="uom.product_uom_categ_vol" />
<field name="use_type">purchase</field>
<field name="factor_inv" eval="159.0" />
<field name="rounding">0.2</field>
<field name="uom_type">bigger</field>
</record>

<record model="uom.uom" id="product_uom_pint">
<field name="name">Pint US - 0,55L (Unit only for sales)</field>
<field name="category_id" ref="uom.product_uom_categ_vol" />
<field name="use_type">sale</field>
<field name="factor" eval="0.55" />
<field name="rounding" eval="0.001" />
<field name="uom_type">smaller</field>
</record>

</odoo>
13 changes: 13 additions & 0 deletions product_uom_use_type/demo/res_groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (C) 2018 - Today: GRAP (http://www.grap.coop)
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="uom.group_uom" model="res.groups">
<field name="users" eval="[(4, ref('base.user_admin'))]" />
</record>

</odoo>
106 changes: 106 additions & 0 deletions product_uom_use_type/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_uom_use_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-02-08 13:44+0000\n"
"Last-Translator: claudiagn <[email protected]>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: product_uom_use_type
#: model:uom.uom,name:product_uom_use_type.product_uom_barrel
msgid "Barrel - 159L (Unit only for purchases)"
msgstr "Barril - 159L (Unitat només per a compres)"

#. module: product_uom_use_type
#: model:product.template,name:product_uom_use_type.product_bier_faucheuse
msgid "Bier - La Faucheuse"
msgstr "Cervesa: The Grim Reaper"

#. module: product_uom_use_type
#: model:ir.model.fields,help:product_uom_use_type.field_product_product__uom_id
#: model:ir.model.fields,help:product_uom_use_type.field_product_template__uom_id
msgid "Default unit of measure used for all stock operations."
msgstr ""
"Unitat de mesura predeterminada que s’utilitza per a totes les operacions "
"d’estoc."

#. module: product_uom_use_type
#: model:ir.model.fields,help:product_uom_use_type.field_product_product__uom_po_id
#: model:ir.model.fields,help:product_uom_use_type.field_product_template__uom_po_id
msgid "Default unit of measure used for purchase orders. It must be in the same category as the default unit of measure."
msgstr ""
"Unitat de mesura predeterminada que s’utilitza per a les comandes de compra. "
"Ha de ser de la mateixa categoria que la unitat de mesura per defecte."

#. module: product_uom_use_type
#: model:product.template,uom_name:product_uom_use_type.product_bier_faucheuse
#: model:product.template,volume_uom_name:product_uom_use_type.product_bier_faucheuse
msgid "Liter(s)"
msgstr "Litre(s)"

#. module: product_uom_use_type
#: model:uom.uom,name:product_uom_use_type.product_uom_pint
msgid "Pint US - 0,55L (Unit only for sales)"
msgstr "Pint US - 0,55L (Unitat només per a vendes)"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_product_product
msgid "Product"
msgstr "Producte"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_product_template
msgid "Product Template"
msgstr "Plantilla de producte"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_uom_uom
msgid "Product Unit of Measure"
msgstr "Unitat de mesura del producte"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_product__uom_po_id
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_template__uom_po_id
msgid "Purchase Unit of Measure"
msgstr "Unitat de mesura de compres"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for purchases"
msgstr "Unitat disponible per compres"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for sales"
msgstr "Unitat disponible per vendes"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for sales and purchases"
msgstr "Unitat disponible per vendes i compres"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_product__uom_id
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_template__uom_id
msgid "Unit of Measure"
msgstr "Unitat de mesura"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_uom_uom__use_type
msgid "Use Type"
msgstr "Tipus d'ús"

#. module: product_uom_use_type
#: model:product.template,weight_uom_name:product_uom_use_type.product_bier_faucheuse
msgid "kg"
msgstr "kg"
106 changes: 106 additions & 0 deletions product_uom_use_type/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_uom_use_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-09-15 12:00+0000\n"
"Last-Translator: claudiagn <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: product_uom_use_type
#: model:uom.uom,name:product_uom_use_type.product_uom_barrel
msgid "Barrel - 159L (Unit only for purchases)"
msgstr "Barril - 159L (Unidad solo para compras)"

#. module: product_uom_use_type
#: model:product.template,name:product_uom_use_type.product_bier_faucheuse
msgid "Bier - La Faucheuse"
msgstr "Bier - La Faucheuse"

#. module: product_uom_use_type
#: model:ir.model.fields,help:product_uom_use_type.field_product_product__uom_id
#: model:ir.model.fields,help:product_uom_use_type.field_product_template__uom_id
msgid "Default unit of measure used for all stock operations."
msgstr ""
"Unidad de medida predeterminada utilizada para todas las operaciones de "
"stock."

#. module: product_uom_use_type
#: model:ir.model.fields,help:product_uom_use_type.field_product_product__uom_po_id
#: model:ir.model.fields,help:product_uom_use_type.field_product_template__uom_po_id
msgid "Default unit of measure used for purchase orders. It must be in the same category as the default unit of measure."
msgstr ""
"Unidad de medida predeterminada utilizada para órdenes de compra. Debe estar "
"en la misma categoría que la unidad de medida predeterminada."

#. module: product_uom_use_type
#: model:product.template,uom_name:product_uom_use_type.product_bier_faucheuse
#: model:product.template,volume_uom_name:product_uom_use_type.product_bier_faucheuse
msgid "Liter(s)"
msgstr "Litro(s)"

#. module: product_uom_use_type
#: model:uom.uom,name:product_uom_use_type.product_uom_pint
msgid "Pint US - 0,55L (Unit only for sales)"
msgstr "Pinta US - 0,55L (Unidad solo para venta)"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_product_product
msgid "Product"
msgstr "Producto"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"

#. module: product_uom_use_type
#: model:ir.model,name:product_uom_use_type.model_uom_uom
msgid "Product Unit of Measure"
msgstr "Unidad de medida del producto"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_product__uom_po_id
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_template__uom_po_id
msgid "Purchase Unit of Measure"
msgstr "Unidad de medida de compra"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for purchases"
msgstr "Unidad disponible para compras"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for sales"
msgstr "Unidad disponible para ventas"

#. module: product_uom_use_type
#: selection:uom.uom,use_type:0
msgid "Unit available for sales and purchases"
msgstr "Unidad disponible para ventas y compras"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_product__uom_id
#: model:ir.model.fields,field_description:product_uom_use_type.field_product_template__uom_id
msgid "Unit of Measure"
msgstr "Unidad de medida"

#. module: product_uom_use_type
#: model:ir.model.fields,field_description:product_uom_use_type.field_uom_uom__use_type
msgid "Use Type"
msgstr "Tipo de uso"

#. module: product_uom_use_type
#: model:product.template,weight_uom_name:product_uom_use_type.product_bier_faucheuse
msgid "kg"
msgstr "kg"
Loading

0 comments on commit d4db91a

Please sign in to comment.