[product_gtin] check_ean_key method is not overriden

Bug #697969 reported by invitu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Won't Fix
Undecided
Unassigned

Bug Description

Here are steps to reproduce :
- install new database from scratch
- install product_gtin from extra-addons
- in product view, enter 555555555 in EAN UPC JPC GTIN field and save --> we have 2 error messages :
Error occurred while validating the field(s) ean13: Error: Invaid ean code
Error occurred while validating the field(s) ean13: Error: Invalid EAN,UPC,JPC,GTIN code

- Enter a real UPC bar code in the field and save --> we have 1 error message :
Error occurred while validating the field(s) ean13: Error: Invaid ean code

it seems that the check_ean_key method is called twice and that check_ean_key from product.product is not overriden

that bug occurs both in 5.0 an 6.0

invitu (invitu)
description: updated
description: updated
Revision history for this message
Jamin Shah(OpenERP) (jamin-openerp) wrote :

Hello,

product_gtin module is of extra-addons. Our R&D Teams are focused
on the latest OpenERP version, and this issue does not affect it. Let's
close this bug now, for the sake of clarity in Launchpad.

Thank you for your understanding!

Changed in openobject-addons:
status: New → Won't Fix
Revision history for this message
invitu (invitu) wrote :

Extra-addons need to be improved too.
It would be a good thing to create a new branch for extra-addons in order to keep it separated from OpenERP SA's priorities (that we understand)

Revision history for this message
invitu (invitu) wrote :

I meant "project" instead of "branch"

Revision history for this message
Ferdinand (office-chricar) wrote :

Here is the fixed module
have currently problems committing to lp

Revision history for this message
invitu (invitu) wrote :

Thanks Ferdinand

I have problem with install on last trunk revision
    if not len(eancode) in [8,12,13,14]:
   ^
IndentationError: unexpected indent

at the end, after the indentation fixed, I had other messages about unknown _check_ean_key (it was not defined before _constraints) and finally had this error :

    res = check_ean(product.ean13)
TypeError: 'NoneType' object is not callable

Revision history for this message
Ferdinand (office-chricar) wrote :

sorry for the inconvenience - an editor placed wrong tabs and some other problems...

the module is fixed now in extra addons, BUT read description
you have to comment the constraint in product/product.py manualy
see also
https://bugs.launchpad.net/openobject-server/+bug/300510

I have checked with these numbers 0012345678912 96385074 90114007 0001234560001

Revision history for this message
invitu (invitu) wrote :

__openerp__.py is missing

It appears than the contraint is not overriden
https://bugs.launchpad.net/openobject-server/+bug/700451

Revision history for this message
Ferdinand (office-chricar) wrote :

now it works with 6.0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.