Divyesh Makwana(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons_12_event-mdi into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_12_event-mdi/+merge/126421
Hello Sir,
I have fix the following things:
1. Create a new event and in location select partner, it will crash with an
Internal error
TypeError: <openerp.osv.orm.browse_null object at 0xb2e11ec> is not JSON
serializable.
2. Removing partner from m2o 'address_id' field and then focus out from
that field in event form also gives trace-back.
HINT: No operator matches the given name and argument type(s). You might need
to add explicit type casts.
Thanks,
Divyesh
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons_12_event-mdi/+merge/126421
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons_12_event-mdi.
=== modified file 'event/event.py'
--- event/event.py 2012-09-17 16:33:01 +0000
+++ event/event.py 2012-09-26 10:07:28 +0000
@@ -265,25 +265,18 @@
return {'value': dic}
def on_change_address_id(self, cr, uid, ids, address_id, context=None):
- values = {
- 'street' : False,
- 'street2' : False,
- 'city' : False,
- 'zip' : False,
- 'country_id' : False,
- 'state_id' : False,
- }
- if isinstance(address_id, (long, int)):
- address = self.pool.get('res.partner').browse(cr, uid, address_id, context=context)
- values.update({
- 'street' : address.street,
- 'street2' : address.street2,
- 'city' : address.city,
- 'country_id' : address.country_id and address.country_id.id,
- 'state_id' : address.state_id and address.state_id.id,
- 'zip' : address.zip,
- })
-
+ values = {}
+ if not address_id:
+ return values
+ address = self.pool.get('res.partner').browse(cr, uid, address_id, context=context)
+ values.update({
+ 'street' : address.street,
+ 'street2' : address.street2,
+ 'city' : address.city,
+ 'country_id' : address.country_id and address.country_id.id or False,
+ 'state_id' : address.state_id and address.state_id.id or False,
+ 'zip' : address.zip,
+ })
return {'value' : values}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp