trytond: incorrect message when a required field is missing
Version: 2.4.0
Step to reproduce:
1) Add this method to the class Event of calendar module (file calendar.patch
attached):
def copy(self, ids, default=None):
int_id = isinstance(ids, (int, long))
if int_id:
ids = [ids]
if default is None:
default = {}
new_ids = []
for event in self.browse(ids):
current_default = default.copy()
current_default['uuid'] = None
new_id = super(Event, self).copy(event.id, default=current_default)
new_ids.append(new_id)
if int_id:
return new_ids[0]
return new_ids
2) Restart tryton server and enable calendar module
3) create a calendar and create an event
4) duplicate the event
A popup appears with the following warning:
"The field "Sequence" on "Event" is required."
The "uuid" field is not set, the warning reference another field ("Sequence") so
the warning is incorrect.
Files
Download | Creator | Timestamp | Type |
---|---|---|---|
issue2657.patch | @pilou_2 | 2012-10-09 09:11:02.221000 UTC | text/plain |