Git Product home page Git Product logo

odoo-pim's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

Product Information Manager

Addons to add PIM functions to Odoo

Available addons

addon version maintainers summary
attribute_set 14.0.1.3.2 Attribute Set
attribute_set_completeness 14.0.2.0.0 Attribute Set Completeness
attribute_set_mass_edit 14.0.1.1.0 Attribute Set Mass Edit
attribute_set_searchable 14.0.1.0.1 Attribute Set Searchable
pim 14.0.1.1.0 Product Information Management
product_attribute_set 14.0.1.1.0 Product Attribute Set
product_attribute_set_completeness 14.0.2.0.0 Product Attribute Set Completeness
product_search_multi_value 14.0.1.0.1 Product Search Multi Value

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


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.

odoo-pim's People

Contributors

bealdav avatar bguillot avatar borjagarciarouco avatar cedric-pigeon avatar clementmbr avatar guewen avatar guillemcforgeflow avatar hparfr avatar hviorforgeflow avatar ibuioli avatar lepistone avatar lmignon avatar mathieuvatel avatar mileo avatar miquelrforgeflow avatar mourad-ehm avatar oca-git-bot avatar oca-transbot avatar pedrobaeza avatar qgroulard avatar rapgenic avatar rousseldenis avatar rvalyi avatar sandreanybox avatar sbidoul avatar sebastienbeau avatar simahawk avatar xavier-bouquiaux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odoo-pim's Issues

Add ability to edit columns in PIM list view

In the video here: https://www.youtube.com/watch?v=36u13vFuzcc

Cédric Pigeon mentions that the feature of being able to "manage the attributes you want to see in the list view" will be added in the coming weeks - for Odoo 13 and 14. I am using Odoo 14 but cannot see an option to edit the columns in list view like for other list views (e.g. Sales).

Am I missing something, or do I need to enable an option in the settings?

Cédric Pigeon mentions this at 23:44 - here https://youtu.be/36u13vFuzcc?t=1424

Thank you so much for this amazing plugin @Cedric-Pigeon and the team. This is truly incredible for the Odoo community

Add dynamic attribute options for relational PIM attributes

Our goal is to add Many2many PIM attributes to represent OpenCart fields such as related products.

The PIM module has a Relational Model option for Multiselect fields, but it doesn’t allow the user to dynamically choose the records. Instead, the set of all allowed records must first be defined in the attribute settings.

image

My suggested fix is to add a Dynamic Options checkbox that allows just using the domain field to filter the selectable records. The existing behavior of manually selecting the records can be kept when the checkbox is not selected.

[12.0] completion rate filling

About the Completness feature. The sum of all completion rates attributes must be equal to 100 %.

In the Product Attribute Sets / Set_name view, when we add or delete an attribut in Completness, we must manually change the remaining completion rates to 100 % again. For the user, it can take some times and it can be unnecessary to have different values fot each attribute in many case.

So, I made a little custom in order to automatically compute equal completion rate for each attribute with the sum equal to 100 %:

  • Add a button to let the user choose between automatic completion rate vs manual input
  • If automatic mode, each attribut will have the same completion rate.
  • When 100 divided by the number of attributs give a remainder. For example 3 attributs give 33 % of completion rate with 1 as remainder. In that way, if the sum of the completion rates is not equal to 100, the remainder will be added to the first attribut when saving the set.

Link to the PR : #84

I’m a beginner here, so if you see a more elegant way to do it…

Hope it can be helpful for all.

Best regards

Kévin

[14.0] attribute_set: Failed to load serialized attribute field

Module

attribute_set

Describe the bug

Create a Serialized attribute block PIM usage.

To Reproduce

Affected versions:
14.0

Steps to reproduce the behavior:

  1. Install fresh demo db with pim module
  2. Create an empty Attribute Set and Attribute Group for example with test name:
  3. Create for example a Char attribute with Serialized flag True:
    image
  4. Assign some product to the Attribute Set
  5. Access to product form
  6. Restart Odoo, try again

After that you receive several odoo client error any time you try to access to a product

Traceback:
Error: field is undefined
_getFieldWidgetClass@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1622:46
_processField@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1627:240
_processNode@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1640:142
_processNode@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:2339:13
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
_processArch/<@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1627:136
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:321
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
traverse/<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:368
_.forEach@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:108:566
traverse@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4981:331
_processArch@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1627:95
_processArch@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:2337:84
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
_processFieldsView@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1637:239
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
init@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1268:1117
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
init@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:1621:594
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
init@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:3349:187
OdooClass.extend/Class.include/</prototype[name]@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4655:371
init@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:2330:639
OdooClass.extend/</prototype[name]<@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4652:488
Class@http://localhost:8069/web/content/341-81624e7/web.assets_common.js:4653:65
_createViewController@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:456:658
_executeWindowAction/</<@http://localhost:8069/web/content/342-cf0a73b/web.assets_backend.js:461:169

Once you restart Odoo you receive this following error:

023-01-09 14:28:18,517 83649 ERROR 14.0-test-attribute_set-pim odoo.addons.base.models.ir_model: Failed to load field product.template.x_integer_test: skipped 
Traceback (most recent call last):
  File "/home/hvior/Projects/odoo/14.0/odoo/odoo/addons/base/models/ir_model.py", line 1171, in _add_manual_fields
    field = self._instanciate(field_data)
  File "/home/hvior/Projects/odoo/14.0/odoo/odoo/addons/base/models/ir_model.py", line 1161, in _instanciate
    attrs = self._instanciate_attrs(field_data)
  File "/home/hvior/Projects/odoo/14.0/odoo/addons/mail/models/ir_model_fields.py", line 29, in _instanciate_attrs
    attrs = super(IrModelField, self)._instanciate_attrs(field_data)
  File "/home/hvior/Projects/odoo/14.0/odoo/addons/base_sparse_field/models/models.py", line 85, in _instanciate_attrs
    attrs['sparse'] = serialization_record.name
  File "/home/hvior/Projects/odoo/14.0/odoo/odoo/fields.py", line 972, in __get__
    value = env.cache.get(record, self)
  File "/home/hvior/Projects/odoo/14.0/odoo/odoo/api.py", line 792, in get
    if field.depends_context:
AttributeError: 'Char' object has no attribute 'depends_context'

Expected behavior
Serialized field is created properly and can be accessed.

Any thoughts on this? @kevinkhao @simahawk @rousseldenis

Storage and search optimization

Is your feature request related to a problem?

Actually, when you create a custom attribute, an alter of the table is performed to add a new column to store the attribute. The main issue is that while an alter on a table is performed, the table is lock by PostgreSQL. This mean that if you have a user that add a new attribute and one that is doing a search on the same table, the search will be blocked until the alter is finished.

This problem is solved if you use serialized attributes. It uses the base_sparse_field addon to store the attributes in a serialized column, this mean that the table is not altered. But you can't perform search on these attributes.

We want to avoid the alter of the table and still be able to perform search on attributes.

Another improvement is to allow the user to define fields that would be displayed on a search panel for a given model(product.template) to perform a search without having to create a new filter in the search.

Describe the solution you'd like

We can use the jsonb field of PostgreSQL to store the attributes. PostgreSQL provide a very good support for jsonb field to perform search and index on it.

For the search panel, we could reuse the widget search panel of Odoo and add a new field to define the field that would be display on the search panel. This widget only support field if type selection or many2one. We could extend it to support boolean to.

Describe alternatives you've considered

We have considered to use Elasticsearch to store the attributes. But this implied to have a new dependency and to have a new service to maintain.

Additional context

If we want to use other type of storage, we could extend our implementation with a new type of field and have a nice base to start with the implementation done for the jsonb field.

How to use :

In the attribute creation menu you now have a new type of attribute named 'Json_postgresql' with the same option as custom field except this field can't be serialized.

image

Some type of field are not supported, Select and Multiselect because json_field does not support relation in PostgreSQL. But the Select type can be replaced by the Selection type that use selection field of Odoo.

For the search panel once the module is installed, you can go to Settings > Search panel fields and then select the field that should appear on the search panel. But be sure that the model you want to have the search panel inherit search.panel.mixin or nothing will show.

image

Once a field is selected, it appears on the search panel, it will only display the value present in the database, if you have a selection field with the values wood, plastic, iron and iron isn't selected on any model than it won't be displayed.

image

Todo :

  • Add the possibility for an allowed user to create index at runtime.

Pull request :

Attribute json 16
#145
#146
#147

Search panel 16
#148
#149
#150

Attribute json 14

#154
#155
#156
#157

Search panel 14

#158
#159
#160

After install : nothing

Follow general instruction for install plugin in docker for odoo 14. No application found in app dashboard

Module

pim

Describe the bug

No app in list

To Reproduce

Affected versions: Odoo 14.0-20220609 (Community Edition)

Steps to reproduce the behavior:

  1. install plugin
  2. reboot docker env
  3. show

Expected behavior
found app in app dashboard

Additional context
docker image

product m2m attr: Uncaught TypeError: Cannot read property 'list' of undefined

with the current product_custom_attribute module, if you add some many2many attribute (here the multi field) in your attribute_set, it seems that for any attribute of the form, you will have the following javascript error triggered with the onchange event.

web.assets_backend.js:2142 Uncaught TypeError: Cannot read property 'list' of undefined
    at web.assets_backend.js:2142
    at Function._.each._.forEach (web.assets_common.js:12)
    at web.assets_backend.js:2142
    at Function._.each._.forEach (web.assets_common.js:12)
    at Class._build_onchange_specs (web.assets_backend.js:2142)
    at Class.do_onchange (web.assets_backend.js:2145)
    at Class.<anonymous> (web.assets_backend.js:2189)
    at Class.trigger (web.assets_common.js:3105)
    at Class.trigger (web.assets_common.js:3109)
    at Class.<anonymous> (web.assets_backend.js:2229)

Screenshot from 2019-05-22 09-50-05

Moreover, with @sebastienbeau we were talking about changing the m2m widget as a many2many_tags widget. Well it happens that using the many2many_tags widget avoids this bug yet I have no idea why. So eventually we have a widget field to specify the attribute widget, but I suggest that as a first approach we simply use the many2many_tags widget as default as it avoids this bug.

RFC Use new odoo native property feature to improve PIM usability

Is your feature request related to a problem?

Pim is a great innovative but new feature in odoo, property, could improve the usability of the modules suite

Describe the solution you'd like

Here is an example of the feature on project / tasks
Settings in project
https://github.com/odoo/odoo/blob/16.0/addons/project/models/project.py#L368

Concrete fields in task
https://github.com/odoo/odoo/blob/16.0/addons/project/models/project.py#L1135

Just test it on runbot, in a task with property link.

We may easily imagine how to apply this principle on product.product.

attribute.set or other object may keep the settings according to kind of product

These properties are very flexible and easy to use and benefit of advanced postgres features.

Describe alternatives you've considered

Keep PIM as it, but ui is complex.

We could also use pim current way and new way available, experiments will answer us which is the best.

cc @sebastienbeau @rvalyi @clementmbr @Cedric-Pigeon @rousseldenis @PierrickBrun

Maintain variant specific PIM attributes

We are faced with the requirement to maintain variant specific PIM attributes. At this moment the whole PIM is designed so as to maintain the attribute.attribute records as being associated to the product.template.

We could always create a variant attribute set and maintain variant-specific attributes this way.

Perhaps you've come across this requirement before?

Rights on repo

@OCA/core-maintainers Is it possible to correct the OCA/product-maintainers rights on this repo as it is read and not write ?

[14.0]attribute_set

Module

attribute_set

Describe the bug

impossible to install the module
here are the logs :

Odoo Server 14.0:test_odoo_preprod_14:ERROR:odoo.sql_db:bad query: SELECT company_dependent FROM attribute_attribute WHERE field_id=17261
                                         ERROR: ERREUR:  la relation « attribute_attribute » n'existe pas
                                         LIGNE 1 : SELECT company_dependent FROM attribute_attribute WHERE fiel...
                                                                                 ^
mars 23 08:13:05 test3 python3.9[280204]: Odoo Server 14.0:test_odoo_preprod_14:ERROR:odoo.addons.base.models.ir_model:Failed to load field res.country.group.x_id_migrate: skipped
                                         Traceback (most recent call last):
                                           File "/home/preprod_odoo_14/server/odoo/addons/base/models/ir_model.py", line 1171, in _add_manual_fields
                                             field = self._instanciate(field_data)
                                           File "/home/preprod_odoo_14/server/odoo/addons/base/models/ir_model.py", line 1161, in _instanciate
                                             attrs = self._instanciate_attrs(field_data)
                                           File "/home/preprod_odoo_14/additionnal_repositories/OCA-pim/attribute_set/models/ir_model.py", line 17, in _instanciate_attrs
                                             self.env.cr.execute(
                                           File "<decorator-gen-3>", line 2, in execute
                                           File "/home/preprod_odoo_14/server/odoo/sql_db.py", line 101, in check
                                             return f(self, *args, **kwargs)
                                           File "/home/preprod_odoo_14/server/odoo/sql_db.py", line 301, in execute
                                             res = self._obj.execute(query, params)
                                         psycopg2.errors.UndefinedTable: ERREUR:  la relation « attribute_attribute » n'existe pas
                                         LIGNE 1 : SELECT company_dependent FROM attribute_attribute WHERE fiel...
                                                                                 ^
mars 23 08:13:05 test3 python3.9[280204]: Odoo Server 14.0:test_odoo_preprod_14:ERROR:odoo.sql_db:bad query: SELECT company_dependent FROM attribute_attribute WHERE field_id=17259
                                         ERROR: ERREUR:  la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
                                         de la transaction

To Reproduce

Affected versions:

14.0

Steps to reproduce the behavior:

  1. just click on install

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)

Access rights: Only working for menu visibility

Three access rights levels are created when installing the module, but they seem to only be used for the visibility of the root PIM menu, while CRUD access is adjusted with the standard base groups: base.group_erp_manager, base.group_user.

So the PIM User and PIM Manager are not being used.

Is this intended behavior? Thank you!

[14.0] attribute_set, Error on restart at creating serialized attribute: Uncaught TypeError: Cannot read properties of undefined (reading 'type')

On a fresh DB,
I install attribute_set and product_attribute_set,

Create a attribute_group on the db.

On the Attribute Set menu option I create a set and an Attribute with the serialized check on.
screenshot-localhost_8069-2022 02 14-12_08_02
screenshot-localhost_8069-2022 02 14-12_08_15

When I attach that set to a product, the tab with the attribute is there showing perfectly.
screenshot-localhost_8069-2022 02 14-12_14_49

When I restart odoo, an error shows when I try to open any product:
screenshot-localhost_8069-2022 02 14-12_08_41
screenshot-localhost_8069-2022 02 14-12_16_08

If i upgrade product the error disappears until odoo is restarted.

Handle attribute type changes

Is your feature request related to a problem?
It is a reasonable feature of a PIM system to handle attribute changes without the need for creating new attributes.
As the dataset grows, the amount of manual work to transfer the data from one field to another increases.

Describe the solution you'd like
For certain logical type conversions, such as Select to Multiselect, it would be helpful if the module automatically converts the type and keeps the existing selection. Other conversions include String to Number, Date to Integer, and Boolean to Integer. I understand that there are some non-sensical conversions like Text to Float. Those can be blocked.

Describe alternatives you've considered
The alternative is doing it manually by creating the new field and somehow assigning new values for each record. This becomes substantially more tedious as the dataset gets bigger.

@schiggi

Incorrect capitalization of attribute group in the rendered XML

Module

attribute_set

Describe the bug

During the XML rendering, attribute group names are formatted such that the first letter is capitalized.
This breaks the title-case. For instance, System Integrations becomes System integrations.

att_group_name = att_group.name.capitalize()

To Reproduce

Affected versions: 14.0.1.0.1

Steps to reproduce the behavior:

  1. Create a new attribute set
  2. Add an attribute to a product under that attribute set
  3. View the product form's attribute tab

Expected behavior
I think it's better to keep the attribute group name as entered by the user, especially since it can be in multiple languages.

attribute_set: "required on view" property does not work properly

1/ Create an attribute A with "Required on view" checked
image

2/ Create an attribute B with "Required on view" not checked

image

4/ Create an attribute set A with attribute A

image

5/ Try to create a product X

image

It is not possible to save as the frontend complains that a required field A is not filled.

product/attribute_set: Unable to write on ir.model.fields

If base fields are written through attribute.attribute there:

https://github.com/shopinvader/odoo-pim/blob/12.0/attribute_set/models/attribute_attribute.py#L427

an Exception is raised there:

https://github.com/odoo/odoo/blob/12.0/odoo/addons/base/models/ir_model.py#L750

image

The problem is raised when loading demo data from product_attribute_set but never raised in Travis as there is no tests, so no demo data are loaded.

I don't know why there is no problem through interface (I haven't tested myself).

@sebastienbeau @lmignon @Cedric-Pigeon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.