Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12.0][MIG] product_profile_example #1849

Open
wants to merge 23 commits into
base: 12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
69dae00
module product_profile_exemple
bealdav Apr 24, 2015
c4ef5cc
take care of repeated fields in xml for profile
bealdav May 19, 2015
1f40fcf
dynamically create search filters
bealdav Jun 22, 2015
98325e5
doc + complete product_profile_example
bealdav Nov 16, 2015
916dc01
OCA remarks
bealdav Nov 20, 2015
1f928bd
 m2o field use in product_profile
bealdav Feb 16, 2016
afae909
make behavior homogeneous between onchange and import data on profile…
bealdav Mar 18, 2016
2543edf
add test unit to product profile
bealdav Mar 20, 2016
ee8befa
ensure updated profile impact products
bealdav Mar 25, 2016
c8d868e
profile when default in vals
bealdav Jun 6, 2016
af1962f
OCA Transbot updated translations from Transifex
oca-transbot Nov 29, 2016
0a00aeb
OCA Transbot updated translations from Transifex
oca-transbot Mar 4, 2017
ff76257
mig V10
EBII Mar 31, 2017
8a2112d
code reviews
EBII May 4, 2017
1a3be41
code review
EBII May 12, 2017
e3512b1
[FIX] pylint
mourad-ehm Dec 11, 2017
5fed113
FIX profile example, move csv to demo
bealdav Jan 26, 2018
722a29e
OCA Transbot updated translations from Transifex
oca-transbot Jan 27, 2018
43cf2be
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
36fa52f
[UPD] Update product_profile_example.pot
oca-travis Jun 23, 2018
5a84305
Translated using Weblate (Spanish)
mvrodriguez Feb 8, 2019
b16d227
[IMP] product_profile_example: black, structure change
kevinkhao Feb 11, 2020
c6364f3
[MIG][12.0] product_profile_example: Migration to 12.0
kevinkhao Feb 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions product_profile_example/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3

=======================
Product Profile Example
=======================

This module is a use case of **Product Profile Example** module.

See its description.



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

Optionally:

* Settings > Configuration > General Settings: check 'Display fields in Profile' and apply
(only if you want display hidden fields set by profile git )



Usage
=====

Create or modify a product template or a product variant. Assign a value to the profile field.
Then, all fields which depend on this profile will be set to the right value at once.

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

See 'Bug tracker' in the README.rst of Product Profile module

Credits
=======

Contributors
------------

* David BEAL <david.beal@akretion.com>
* Kevin KHAO <kevin.khao@akretion.com>

Maintainer
----------

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit http://odoo-community.org.
4 changes: 4 additions & 0 deletions product_profile_example/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import models
15 changes: 15 additions & 0 deletions product_profile_example/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"license": "AGPL-3",
"name": "Product Profile Example",
"summary": "Product Profile Use Case",
"version": "12.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"category": "product",
"depends": ["product_profile", "purchase_stock", "point_of_sale", "mrp"],
"website": "https://github.com/OCA/product-attribute",
"demo": ["demo/product_profile.xml", "demo/product_product.xml"],
"installable": True,
}
12 changes: 12 additions & 0 deletions product_profile_example/demo/product_product.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<odoo noupdate="1">

<record id="mrp.product_product_computer_desk_bolt" model="product.product">
<field name="profile_id" ref="profile_consu"/>
</record>

<record id="product.product_product_3" model="product.product">
<field name="profile_id" ref="profile_manuf"/>
</record>

</odoo>
57 changes: 57 additions & 0 deletions product_profile_example/demo/product_profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<odoo>

<record id="profile_own" model="product.profile">
<field name="name">My Own Type Saleable</field>
<field name="type">product</field>
<field name="sale_ok">True</field>
<field name="purchase_ok">False</field>
<field name="profile_default_categ_id" ref="product.product_category_all"/>
<field name="available_in_pos">True</field>
<field name="profile_default_route_ids" eval="[(6, 0, [ref('purchase_stock.route_warehouse0_buy')])]"/>
<field name="explanation">- My own type
- Saleable product
- Not purchasable</field>
</record>

<record id="profile_complete" model="product.profile">
<field name="name">Complete Profile</field>
<field name="type">product</field>
<field name="sale_ok">True</field>
<field name="purchase_ok">True</field>
<field name="profile_default_categ_id" ref="product.product_category_all"/>
<field name="available_in_pos">True</field>
<field name="profile_default_route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto'),ref('purchase_stock.route_warehouse0_buy')])]"/>
<field name="explanation">- Stockable product
- Saleable
- Purchasable
- Available in POS
- MTO
- Manufacturable</field>
</record>

<record id="profile_manuf" model="product.profile">
<field name="name">Manufacturing TO</field>
<field name="type">product</field>
<field name="sale_ok">True</field>
<field name="purchase_ok">False</field>
<field name="profile_default_categ_id" ref="product.product_category_5"/>
<field name="available_in_pos">True</field>
<field name="profile_default_route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture'),ref('stock.route_warehouse0_mto')])]"/>
<field name="explanation">- Manufacturing Product
- Make to order product
- Display on POS</field>
</record>

<record id="profile_consu" model="product.profile">
<field name="name">Consumable</field>
<field name="type">consu</field>
<field name="sale_ok">True</field>
<field name="purchase_ok">False</field>
<field name="profile_default_categ_id" ref="product.product_category_all"/>
<field name="available_in_pos">False</field>
<field name="explanation">Consumable</field>
</record>


</odoo>
67 changes: 67 additions & 0 deletions product_profile_example/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_profile_example
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2018
# Rudolf Schnapka <rs@techno-flex.de>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 08:49+0000\n"
"PO-Revision-Date: 2018-01-29 08:49+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>, 2018\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_available_in_pos
msgid "Available in pos"
msgstr "Verfügbar in POS/Kasse"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_purchase_ok
msgid "Can be Purchased"
msgstr "Kann eingekauft werden"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_sale_ok
msgid "Can be Sold"
msgstr "Kann verkauft werden"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_categ_id
msgid "Default category"
msgstr "Vorgabe-Kategorie"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_profile_default_route_ids
msgid ""
"Depending on the modules installed, this will allow you to define the route "
"of the product: whether it will be bought, manufactured, MTO/MTS,..."
msgstr ""
"Abhängig von installierten Modulen, wird Ihnen hiermit die Festlegung des "
"Routings für das Produkt ermöglicht: Ob es erworben oder hergestellt wird, "
"Auftrags-/Lagerbeschaffung, ..."

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_route_ids
msgid "Routes"
msgstr "Routen"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_sale_ok
msgid "Specify if the product can be selected in a sales order line."
msgstr ""
"Geben Sie an, ob das Produkt in einer Verkaufsauftragsposition ausgewählt "
"werden darf."

#. module: product_profile_example
#: model:ir.model,name:product_profile_example.model_product_profile
msgid "product.profile"
msgstr "product.profile"
66 changes: 66 additions & 0 deletions product_profile_example/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_profile_example
#
# Translators:
# enjolras <yo@miguelrevilla.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 08:49+0000\n"
"PO-Revision-Date: 2019-02-08 13:50+0000\n"
"Last-Translator: Marta Vázquez Rodríguez <vazrodmar@gmail.com>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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.4\n"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_available_in_pos
msgid "Available in pos"
msgstr "Disponible en TPV"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_purchase_ok
msgid "Can be Purchased"
msgstr "Se puede comprar"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_sale_ok
msgid "Can be Sold"
msgstr "Se puede vender"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_categ_id
msgid "Default category"
msgstr "Categoría predeterminada"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_profile_default_route_ids
msgid ""
"Depending on the modules installed, this will allow you to define the route "
"of the product: whether it will be bought, manufactured, MTO/MTS,..."
msgstr ""
"Dependiendo de los módulos instalados, esto le permitirá definir la ruta del "
"producto: si se va comprar, manufacturado, MTO, MTS,..."

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_route_ids
msgid "Routes"
msgstr "Rutas"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_sale_ok
msgid "Specify if the product can be selected in a sales order line."
msgstr ""
"Especifica si el producto puede ser seleccionado en la línea del pedido de "
"venta."

#. module: product_profile_example
#: model:ir.model,name:product_profile_example.model_product_profile
msgid "product.profile"
msgstr "product.profile"
66 changes: 66 additions & 0 deletions product_profile_example/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_profile_example
#
# Translators:
# Quentin THEURET <odoo@kerpeo.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-29 08:49+0000\n"
"PO-Revision-Date: 2018-01-29 08:49+0000\n"
"Last-Translator: Quentin THEURET <odoo@kerpeo.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\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"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_available_in_pos
msgid "Available in pos"
msgstr "Disponible dans le PdV"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_purchase_ok
msgid "Can be Purchased"
msgstr "Peut être acheté"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_sale_ok
msgid "Can be Sold"
msgstr "Peut être vendu"

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_categ_id
msgid "Default category"
msgstr "Catégorie par défaut"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_profile_default_route_ids
msgid ""
"Depending on the modules installed, this will allow you to define the route "
"of the product: whether it will be bought, manufactured, MTO/MTS,..."
msgstr ""
"En fonction des modules installés, ceci va vous autoriser à définir la route "
"du produit : si il peut être acheté, fabriqué, approvisionné à la commande, "
"approvisionné sur stock,..."

#. module: product_profile_example
#: model:ir.model.fields,field_description:product_profile_example.field_product_profile_profile_default_route_ids
msgid "Routes"
msgstr "Routes"

#. module: product_profile_example
#: model:ir.model.fields,help:product_profile_example.field_product_profile_sale_ok
msgid "Specify if the product can be selected in a sales order line."
msgstr ""
"Détermine si le produit peut être sélectionné dans les lignes de commandes "
"de vente."

#. module: product_profile_example
#: model:ir.model,name:product_profile_example.model_product_profile
msgid "product.profile"
msgstr "product.profile"
Loading
Loading