[7.0 & trunk] [base] customization format_address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP Publisher's Warranty Team |
Bug Description
1.-Steps to reproduce the issue you have observed
to inherit new fields of address to res.partner
example: street3, street4, city2
to fill field format_address of res.country with fields of example
to create a new invoice
to choose customer
2.- The result you observed
send the follow error:
File "/home/
name = name + "\n" + self._display_
File "/home/
return address_format % args
KeyError: u'street3'
This happens because there is not any function that allows me customize the fields that shows or return the function _display_address()
3.-The result you expected
it should have any function that allows customize the fields to show by the function _display_address() even when this fields have been inherited.
4.-
Ubuntu. 12.04, Python 2.7.2+
openerp- server : 4828
Related branches
- OpenERP R&D Team: Pending requested
- Moisés López - http://www.vauxoo.com: Pending requested
-
Diff: 61 lines (+16/-7)1 file modifiedopenerp/addons/base/res/res_partner.py (+16/-7)
- Moisés López - http://www.vauxoo.com: Pending requested
-
Diff: 62 lines (+16/-8)1 file modifiedopenerp/addons/base/res/res_partner.py (+16/-8)
- Joël Grand-Guillaume @ camptocamp (community): Needs Fixing (test, no code review)
- hbto [Vauxoo] http://www.vauxoo.com (community): Needs Fixing
- Moisés López - http://www.vauxoo.com (community): Needs Fixing
- Nhomar - Vauxoo (community): Needs Fixing
- Stefan Rijnhart (Opener) (community): Disapprove
- Yannick Vaucher @ Camptocamp (community): Needs Fixing (code, test)
- OpenERP Core Team: Pending requested
-
Diff: 727 lines (+465/-95)4 files modifiedopenerp/addons/base/res/res_partner.py (+209/-76)
openerp/addons/base/res/res_partner_view.xml (+45/-18)
openerp/addons/base/tests/test_base.py (+210/-0)
openerp/addons/base/tests/test_expression.py (+1/-1)
description: | updated |
summary: |
- customization format_address + [7.0 & trunk] [base] customization format_address |
Changed in openobject-server: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
Hi Julio,
You're right, there should be an easier way to include extra/custom fields in the display address format. It's always possible to override _display_address(), but it would be better to use a shared list of address fields.
Your merge proposal looks quite correct, however we are in the process of updating/reviewing several things related to address fields in the context of bug 1160365, so I'd like to fix everything in one go.
I've updated the current merge proposal for bug 1160365 to cover your case as well.
Could you double-check and see if that solves your problem?
Thanks for reporting and for providing a very good patch!