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

[17.0][MIG] product_profile #1731

Open
wants to merge 58 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
8473313
product_profile module
bealdav Apr 13, 2015
7986a89
misc remark sylvain and first implement fields_view_get
bealdav Apr 15, 2015
e63f235
add group to show fields in profile
bealdav Apr 17, 2015
ac4bdb7
gurneyalex reamrks
bealdav Apr 24, 2015
9f88f0e
module product_profile_exemple
bealdav Apr 24, 2015
acbc04e
take care of repeated fields in xml for profile
bealdav May 19, 2015
5654e2c
dynamically create search filters
bealdav Jun 22, 2015
ad1755e
onchange in case of import of m2m
bealdav Jul 16, 2015
9fb6fdc
refactor the way to process the onchange on create and add it on write
sebastienbeau Sep 3, 2015
1b2a0c3
refactor teh code in order to avoid useless loop in write, we do not …
sebastienbeau Sep 3, 2015
00a732e
fix many2many field, need to pass the [(6, 0, ...)] stuff
sebastienbeau Sep 13, 2015
fe25940
Update product fields with product.profile corresponding fields with …
ahilali Nov 4, 2015
e64e732
doc + complete product_profile_example
bealdav Nov 16, 2015
38f2f67
OCA remarks
bealdav Nov 20, 2015
e18e971
Warning 'profile_default' shouldn't be in vals for write or create pr…
bealdav Nov 21, 2015
675b63d
 m2o field use in product_profile
bealdav Feb 16, 2016
0d22dd2
avoid attrs readonly/invisible for default profile fields
bealdav Mar 4, 2016
36cce53
back to oldname key
bealdav Mar 8, 2016
7f650a0
spell in README
bealdav Mar 8, 2016
73d1a27
make behavior homogeneous between onchange and import data on profile…
bealdav Mar 18, 2016
a077bab
back to previous api to not break it
bealdav Mar 19, 2016
a8426a4
add test unit to product profile
bealdav Mar 20, 2016
60de247
ensure updated profile impact products
bealdav Mar 25, 2016
489c539
alert for end user if update profile, upd translation, only update pr…
bealdav Mar 29, 2016
b498fb5
profile when default in vals
bealdav Jun 6, 2016
1354c56
prevent unseful writing on products in product_profile
bealdav Oct 24, 2016
fe6b1c4
@hparfr remarks on product_profile
bealdav Nov 1, 2016
23a95ea
readibility in product_profile
bealdav Nov 2, 2016
a8a1cc9
Migrate to Version 10
EBII Mar 31, 2017
7ff4c2c
[FIX] pylint
mourad-ehm Dec 11, 2017
d1d2cb5
FIX set explicitely profile_id string field
bealdav Mar 6, 2018
e9a3844
[FIX] do not customize product easy form view
Nov 15, 2018
568c8e8
Translated using Weblate (Spanish)
mvrodriguez Feb 8, 2019
4e5963e
[IMP] product_profile: black, file structure change
kevinkhao Feb 23, 2020
dea1e1a
[MIG][12.0] product_profile: Migration to 12.0
kevinkhao Feb 23, 2020
58b7ea6
product_profile 12.0.2.0.0
OCA-git-bot Jul 17, 2020
1693616
Translated using Weblate (Spanish)
claudiagn Oct 14, 2020
95cec7f
[IMP] product_profile: black, isort, prettier
sebastienbeau Dec 2, 2020
8c4853b
[MIG] product_profile: Migration to 14.0
sebastienbeau Dec 2, 2020
094505c
[FIX] add missing default value
sebastienbeau Dec 18, 2020
ae8fcb2
[FIX] fix modifier, inherit _fields_view_get to avoid complexe code
sebastienbeau Dec 22, 2020
7660263
[UPD] Update product_profile.pot
oca-travis Sep 29, 2021
982bcb2
[UPD] README.rst
OCA-git-bot Sep 29, 2021
09158db
Translated using Weblate (Catalan)
Noel000 Mar 22, 2022
64447ba
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 31, 2022
f2872d4
[IMP] product-profile make code more inheritable
sebastienbeau Nov 5, 2021
e306b25
product_profile 14.0.1.0.1
OCA-git-bot Apr 1, 2022
91583ad
[MIG] product_profile: Migration to 15.0
bosd Oct 30, 2022
748b285
product_profile: add demo data
bosd Apr 30, 2023
0c1e6b2
[UPD] Update product_profile.pot
Jun 22, 2023
cc50663
[UPD] README.rst
OCA-git-bot Jun 22, 2023
a571b75
[MIG] product_profile: Migration to 16.0
bosd Jun 22, 2023
3922469
Translated using Weblate (Italian)
mymage Dec 24, 2023
e6a0c62
Translated using Weblate (Dutch (nl_NL))
bosd Dec 30, 2023
6d8f855
Translated using Weblate (Italian)
francesco-ooops Jan 29, 2024
e500bcc
[IMP]Product_profile: Support Create multi
bosd Feb 12, 2024
39ee5ce
[IMP] product_profile: pre-commit execution
bosd Feb 5, 2024
c3deb6e
[MIG] product_profile: Migration to 17.0
bosd Feb 5, 2024
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
200 changes: 200 additions & 0 deletions product_profile/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
===============
Product Profile
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f04f87cc48c1940f6a787ce702e91fbe42ce1cf2e9a1d585b34b17b966fc1dcb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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/17.0/product_profile
: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-17-0/product-attribute-17-0-product_profile
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/product-attribute&target_branch=17.0
:alt: Try me on Runboat

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

This module provides easier products configuration (in one click). It
allows to configure a product template with only one field.

|image1|

**Main use case**: a lot of modules are installed (mrp, purchase, sale,
pos) and products configuration becomes harder for end users: too many
fields to take care of.

You are concerned that at any time a product might be not configured
correctly: this module is your friend.

Thanks to this module, a lot of complexity becomes hidden (default
behavior) to the end user and usability is optimal.

It eases as well the data migration by only specifying the profile field
instead of all fields which depend on it.

Note: This module is meant to be used by skilled people in database
fields creation within the ERP framework.

Additional feature: a default value can be attached to a profile (see §
Configuration, part 3)

.. |image1| image:: https://raw.githubusercontent.com/OCA/product-attribute/17.0/product_profile/static/img/field.png

**Table of contents**

.. contents::
:local:

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

1. Create your own profile here: Sales > Configuration > Product >
Product Profiles

|image2|

|image3|

2. Extend "product.profile" model to add fields from product.template,
either in normal mode or default mode (see note section below). These
fields should be identical to their original fields **(especially
"required" field attribute)**.

.. code:: python

class ProductProfile(models.Model):
""" Require dependency on sale, purchase and point_of_sale modules
"""

_inherit = "product.profile"

def _get_types(self):
return [("product", "Stockable Product"),
("consu", 'Consumable'),
("service", "Service")]

sale_ok = fields.Boolean(
string="Can be Sold",
help="Specify if the product can be selected in a sales order line.")
purchase_ok = fields.Boolean(
string="Can be Purchased")
available_in_pos = fields.Boolean()

3. Insert data (xml or csv) and define values for each field defined
above for each configuration scenario

Note : You might want to declare profile fields as defaults. To do this,
just prefix the field with "profile_default".

.. code:: python

class ProductProfile(models.Model):
profile_default_categ_id = fields.Many2one(
"product.category",
string="Default category",
)
profile_default_tag_ids = fields.Many2many(
comodel_name="product.template.tag",
string="Tags",
)

Default fields only influence the records the first time they are set. -
if the profile is modified, changes are not propagated to all the
records that have this profile - if the record previously had another
profile, changing profile will not influence default values

.. |image2| image:: https://raw.githubusercontent.com/OCA/product-attribute/17.0/product_profile/static/img/list.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/product-attribute/17.0/product_profile/static/img/create.png


Usage
=====

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

If you deselect the profile value, all these fields keep the same value
and you can change them manually (back to standard behavior).

Profiles are also defined as search filter and group.

Known issues / Roadmap
======================

- Streamlined behaviour of default/nondefault fields in every situation
- More robust/less error-prone functionality for required fields or
fields implicated in workflows
- More flexible/configurable behaviour for profile fields (instead of
only default/nondefault fields)

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/product-attribute/issues/new?body=module:%20product_profile%0Aversion:%2017.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
-------

* Akretion

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

- David BEAL <[email protected]>
- Sébastien BEAU <[email protected]>
- Abdessamad HILALI <[email protected]>
- Kevin Khao <[email protected]>

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.

.. |maintainer-bealdav| image:: https://github.com/bealdav.png?size=40px
:target: https://github.com/bealdav
:alt: bealdav
.. |maintainer-sebastienbeau| image:: https://github.com/sebastienbeau.png?size=40px
:target: https://github.com/sebastienbeau
:alt: sebastienbeau
.. |maintainer-kevinkhao| image:: https://github.com/kevinkhao.png?size=40px
:target: https://github.com/kevinkhao
:alt: kevinkhao

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-bealdav| |maintainer-sebastienbeau| |maintainer-kevinkhao|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions product_profile/__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
23 changes: 23 additions & 0 deletions product_profile/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Product Profile",
"version": "17.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"summary": "Allow to configure a product in 1 click",
"category": "product",
"development_status": "Production/Stable",
"depends": ["sale_management"],
"website": "https://github.com/OCA/product-attribute",
"data": [
"security/group.xml",
"views/product_view.xml",
"views/config_view.xml",
"security/ir.model.access.csv",
],
"demo": ["demo/profile_demo.xml"],
"installable": True,
"license": "AGPL-3",
"maintainers": ["bealdav", "sebastienbeau", "kevinkhao"],
}
18 changes: 18 additions & 0 deletions product_profile/demo/profile_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="my_own_consumable" model="product.profile">
<field name="name">My Own Type Consumable</field>
<field name="explanation">My Own Type, Consumable</field>
<field name="detailed_type">consu</field>
</record>

<record id="stockable_lot_sale_pur" model="product.profile">
<field name="name">Service Product Profile Example</field>
<field
name="explanation"
>Minimal example of service product profile, extend this to your own needs</field>
<field name="detailed_type">service</field>
</record>

</odoo>
Loading
Loading