Trunk : Total Injustice to the company 'name' !
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP's Framework R&D |
Bug Description
Guys,
I am not sure how critical this would be, but we faced this live on an implementation and was really a shocker.
There seems to be 2 issues, both the issues have same root!
Case 1. Try to duplicate the company record, although this should never go as a real case I guess. System would give you an error of not null constrain for the field 'name'. The field name is a fields.related and can usually fail in this case.
Proposed solution : copy() should be overridden and it can manage the rest.
Case 2. Keeping the field as related is fine, but injustice happens when the same name(from Partner model,feeling like a rich) when goes to name of the company, feels like filthy. In technical terms, the size of the name for partner_id appears to be 128 chars and name for company stands as 64 chars long. This results in "DataError: value too long for type character varying(64)" when the name of the partner doesn't really fit company name.
Proposed Solution : size for name field of company should be reset to 128.
Attached merges would pave the way for the solution.
Hope this helps.
Thanks,
Serpent Consulting Services.
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedopenerp/addons/base/res/res_company.py (+1/-1)
summary: |
- Trunk : Total Injustice to the company name + Trunk : Total Injustice to the company 'name' ! |
To update, applying this proposal, would solve both the issues!