[account][model hr.expense.expense][def action_receipt_create] ref should be trimmed to 64 chars

Bug #1208074 reported by hbto [Vauxoo] http://www.vauxoo.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

[account][model hr.expense.expense][def action_receipt_create] ref should be trimmed to 64 chars

http://bazaar.launchpad.net/~openerp/openobject-addons/7.0/view/head:/hr_expense/hr_expense.py#L261

instead of:

                    'ref': exp.name

it should be:

                    'ref': exp.name[64:]

not doing so will cause errors when creating the account.move.line records to account.move.

Regards.

Tags: maintenance

Related branches

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Ok, Tested in runbot, works Fine.

Regards.

Revision history for this message
Foram Katharotiya (OpenERP) (fka-openerp) wrote :

Hello,

  - It has been Fixed in this branch https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-596206-fka.
    revno: 9347
    revid: <email address hidden>

  -It will be available in 7.0 soon.

Thanks,
FKA

Changed in openobject-addons:
status: New → Fix Committed
Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

Hello Foram Katharotiya,

When is this going to be released onto stable branch.?

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hi,

It seems to me that the right fix is to correct fields.function to properly apply the size limit that was set on it when the type is "char". In this case the ref is a fields.related which is also a fields.function that is stored, so this is the source of the bug. It will also avoid hardcoding a limit in the code while the one of the model should be used.

Changed in openobject-addons:
importance: Undecided → Low
Revision history for this message
Martin Trigaux (OpenERP) (mat-openerp) wrote :

Hello,

We have merged the change in the orm. Now related and function fields of type char will use the attribute size to truncate the text.

Regards

revno: 5094 [merge]
revision-id: <email address hidden>

Changed in openobject-addons:
status: Fix Committed → Fix Released
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.