Git Product home page Git Product logo

Comments (34)

sbidoul avatar sbidoul commented on June 30, 2024 1

Done. There are now only 21 products showing the problem:

In [4]: env['product.product'].search([('product_tmpl_id.odoo_module_id', '!=', False),('odoo_module_version_id','=',False)]).mapped('product_tmpl_id.name')
Out[4]: 
['LDAP Attribute Sync',
 'Mail track diff only',
 'Medical Lab',
 'Medical Manufacturer',
 'Medical Medicament',
 'Medical Medicament Components',
 'Medical Medicament - US Locale',
 'Medical Medication',
 'Medical Patient Allergies',
 'Medical Patient Disease',
 'Medical Patient DoB',
 'Medical Pharmacy',
 'Medical Pharmacy - US Locale',
 'Medical Physician',
 'Medical Prescription',
 'Medical Prescription Order States',
 'Medical Prescription Sales',
 'Medical Prescription Sale Stock',
 'Medical Prescription Thread',
 'Medical Prescription - US Locale',
 ' Sale CRM - Medical Prescription']

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024 1

@sbidoul okay perfect, Thank you so much for the efforts. 👍

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@elicoidal Seems like somehow the product variant and the module version link is missing. I will try to setup everything my local and try to reproduce same.

from apps-store.

elicoidal avatar elicoidal commented on June 30, 2024

Let us know if you some insight from the instance (cc @gurneyalex @sbidoul @pedrobaeza )

from apps-store.

pedrobaeza avatar pedrobaeza commented on June 30, 2024

Any news on this?

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

No. Tomorrow I will debug. It was busy days for me after trip to Belgium. Sorry for delay.

from apps-store.

pedrobaeza avatar pedrobaeza commented on June 30, 2024

Yeah, it's understandable. No worry.

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

I did some debugging and found that.
From Github interface for each module, it is creating Odoo Module branch it is creating Odoo Module version.
based on that module we are creating the Product Template and for each Odoo Module Version we are creating/adding the attribute value and linking the product.product with that odoo module version with odoo_module_version_id field.

Now when second time the cron or the Analyze branch will be executed.
it is deleting all the old Odoo Module Version from this code https://github.com/OCA/interface-github/blob/11.0/github_connector_odoo/models/github_repository_branch.py#L91

so it is losing the connection from Product.product to odoo module version and at the end, we lose the Module information.

Not sure what is the best way to solve the problem,
IMO we should change the code in interface GitHub so it will not delete and just update the already created Odoo module version.
New PR is created for the same. OCA/interface-github#30

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

cc @elicoidal @pedrobaeza

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

cc @legalsylvain

from apps-store.

legalsylvain avatar legalsylvain commented on June 30, 2024

Hi @sbidoul. I answered in OCA/interface-github#30

from apps-store.

elicoidal avatar elicoidal commented on June 30, 2024

Normally this issue should be fixed when the code is updated in the ERP

from apps-store.

elicoidal avatar elicoidal commented on June 30, 2024

@bizzappdev @sbidoul it seems that thisis not yet fixed.
Could you have a look?

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul can we arrange screen sharing session or somehow to solve the problem as I have to check. Let me know your convenient time so I can make myself available.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

@bizzappdev @elicoidal I'll make some time for this today. Can you point me to a page that shows the problem? For instance https://odoo-community.org/shop/product/mis-builder-budget-1639 looks good to me (except the rendering of the readme, but that's another story).

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul yes you are right. Seems like mostly all modules are proper now.
I have checked different 10 modules are looks Perfect for me also.

from apps-store.

legalsylvain avatar legalsylvain commented on June 30, 2024

except the rendering of the readme, but that's another story

Weird, the description is well displayed in the back office.

https://odoo-community.org/web#id=1305&view_type=form&model=odoo.module&menu_id=567&action=793

Seems like mostly all modules are proper now.

Nice ! Well done.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

Great, thanks for the work!

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul can you please check https://odoo-community.org/shop/product/management-system-audits-audit-trail-tracking-953?search=audit

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

What should I check? The product is there in the backend with the 7.0 attribute.
image

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

@bizzappdev the odoo.module is linked to the product template:

# select id,technical_name,product_template_id from odoo_module where technical_name like '%audittrail%';
  id  |        technical_name        | product_template_id 
------+------------------------------+---------------------
 1963 | mgmtsystem_action_audittrail |                1622

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul yes. that is proper.
what about the product.product's odoo_module_version_id field value for that particular product variant.
Also, make sure that there is a odoo module version for the 1963 id in the database.
if you need to trace this quickly then we can do from anydesk. and skype call.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

Module version is present:

# select id,name from odoo_module_version where module_id=1963;
   id   |                       name                       
--------+--------------------------------------------------
 233554 | Management System - Actions Audit Trail tracking
(1 row)

But odoo_module_version_id is empty for that variant:

select id,product_tmpl_id,odoo_module_version_id from product_product where product_tmpl_id=1963;
  id   | product_tmpl_id | odoo_module_version_id 
-------+-----------------+------------------------
 16504 |            1963 |                       
(1 row)

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

I doubt that you have mixed the module_id and product_tmpl_id
product_tmpl_id is 1622
can you fire this query and check the result.

select id,product_tmpl_id,odoo_module_version_id from product_product where product_tmpl_id=1622;

if there is a record then try to execute the Same server action on the product template with id = 1622
and check after that the https://odoo-community.org/shop/product/management-system-actions-audit-trail-tracking-1622.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

Hm, indeed, I mixed the ids.

# select id,product_tmpl_id,odoo_module_version_id from product_product where product_tmpl_id=1622;
  id   | product_tmpl_id | odoo_module_version_id 
-------+-----------------+------------------------
 15353 |            1622 |                       
(1 row)

Running the action on product template 1622 does not change anything.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

I deleted the product and recreated it using the cron. It looks ok now: https://odoo-community.org/shop/product/management-system-actions-audit-trail-tracking-2909?search=audit

Shall I do that for all products with variants not linked to an odoo_module_version?

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul yes sure if it works then sure. in any case from the server action also it is creating product.product again. so it is not a problem IMO.

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

Ok then, I'll do this, ok for you?

env['product.product']
.search([('product_tmpl_id.odoo_module_id', '!=', False),('odoo_module_version_id','=',False)])
.mapped('product_tmpl_id')
.unlink()

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

These crash the app store, btw: https://odoo-community.org/shop/product/medical-prescription-sale-stock-4202

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul can you provide the error log/trceback from backend ?

from apps-store.

sbidoul avatar sbidoul commented on June 30, 2024

@bizzappdev sure:

max() arg is an empty sequence
Traceback (most recent call last):
  File "odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 343, in _compiled_fn
    return compiled(self, append, new, options, log)
  File "<template>", line 1, in template_760_4274
  File "<template>", line 2, in body_call_content_4273
  File "apps-store/website_apps_store/models/product.py", line 23, in get_version_info
    version = max([x for x in versions])
ValueError: max() arg is an empty sequence

Error to render compiling AST
ValueError: max() arg is an empty sequence
Template: 760
Path: /templates/t/t/div/section/div[2]/t/t
Node: <t t-set="product_var_id" t-value="product.get_version_info()"/>

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul seems like that product does not have any version/attributes configured.
definitely, it needs to be fixed so that there will be no error, but we also have to check right now what is wrong with that product.

from apps-store.

bizzappdev avatar bizzappdev commented on June 30, 2024

@sbidoul Fix has been added at PR but you still have to find a reason why there were no attribute lines for that product.

from apps-store.

elicoidal avatar elicoidal commented on June 30, 2024

This is solved. Thanks all

from apps-store.

Related Issues (20)

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.