Module l10nch: bug with the reference number
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
While printing a BVR with the module l10n_ch, one can encounter a bug, espacially if the invoice number has a slash in it.
When an invoice is created, a small function called '_convert_ref( ... )' removes all occurences of slashes.
Within the l10n_ch module, while printing a BVR, all characters but digits are converted to 0's (the digit), so that the reference number that is printed does not correspond to what is in the database.
Example:
FC00020021/2010 becomes:
printed on the BVR: 000002002102010
After that, importing the BVR's can not do its job because the reference has no chance to find anything.
I suggest the following change in l10n_ch/
-- invoice_number = re.sub('[^0-9]', '0', o.number)
++ invoice_number = re.sub('[^0-9]', '', o.number)
Best regards
affects: | openobject-server → openobject-addons |
Changed in openobject-addons: | |
status: | Invalid → New |
Hello, www.postfinance .ch/pf/ content/ fr/seg/ biz/customer/ download/ doc.html
If you read the BVR manual
http://
You will see that ref numbers are validating using the modulo 10 validation algorithm. So as this algorithm can only check
numeric data, non numeric chars are not allowed in reference numbers.
Regards
Nicolas