Skip to Content
Menu
This question has been flagged
2 Replies
1466 Views

This model does not appear in the community edition, but it exists in my Odoo.sh instances.  I have wasted a lot of time trying to find the .py where it's defined, but have had no luck.  Anyone have an idea?

Here is the definition from the RPC (snipped on the right):

{"jsonrpc": "2.0", "id": 921359310, "result": {
"id": {"type": "integer", "change_default": false
"__last_update": {"type": "datetime", "change_def
"display_name": {"type": "char", "change_default"
"create_uid": {"type": "many2one", "change_defaul
"create_date": {"type": "datetime", "change_defau
"write_uid": {"type": "many2one", "change_default
"write_date": {"type": "datetime", "change_defaul
"x_name": {"type": "char", "change_default": fals
}}

Obviously, x_name and display_name are the only non-boilerplate fields here.

And here is the field where it is used in product.template, also from the RPC fetch:

"x_studio_product_tags": 
{"type": "many2many", "change_default": false, "company_dependent": false, ...
"relation": "x_producttags", "required": false, "searchable": true, "sortable": false, "store": true, 
"string": "Product Tags", 
"name": "x_studio_product_tags},

Which is obviously a Studio generated reference, but the underlying table x_producttags doesn't seem to be.  The tags are accessed in forms using a standard many2many_tags widget.

Since I have inherited this system, it may be some previous owner built it, but I have been able to track it down. 

Avatar
Discard
Author

last line should be "... been unable to track it down."

Author Best Answer

Yes, indeed, some previous worker created the x_ elements.

Sadly, this poses difficult issues for continuing development in Odoo.sh.  The x_ elements exist in the master DB instance and in staging instances restored from the master DB.  That works well.  However, the standard Odoo.sh process of developing and testing new modules/apps in a development branch poses problems as the the x_ and x_studio_ elements from master do not appear in the demo databases used in the standard development builds.

The bottom line is that those elements should have been created in a module if anyone anticipated they would need to participate in future extensions, but they did not.

Alternately, wouldn't it be nice to have a "create or replace" or an "if !exists, create" feature within a module that would allow me to create the x_ or x_studio_ elements in my module, if they didn't already exist, such as in a demo database.  Or perhaps one could use a "bridge" module that is installed only in development containing the elements from master missing from the demo database.

The ideal solution, of course, is to rip out the x_ and x_studio_ elements in the master and replace them with module-derived equivalents.  That's not practical in a running, production system.

In any event, this issue has highlighted for me the problems created by mixing x_studio_ elements with x_ (Settings>Technical) elements and module-derived elements under Odoo.sh.

Avatar
Discard
Best Answer

Hi Ken,

Hope you are doing well.

It seems that the x_producttags model was created in the Odoo Studio, a visual development platform in the Enterprise Edition. It's possible that a previous owner of your system created this model using the Studio, but it is not present in the Community Edition. The x_studio_product_tags field in the product.template model is a many2many relation to the x_producttags model, and it's used to display product tags in forms with the many2many_tags widget.

Team Ksolves!


Avatar
Discard
Author

Does the "x_" prefix signify that the table was created in Studio the way the "x_studio" prefix does for fields?

Related Posts Replies Views Activity
1
Jul 25
1757
4
Apr 25
12130
1
Feb 25
3517
1
Jan 25
1398
1
Jan 25
4857