Use only one call to write() for state and date

This commit is contained in:
Bertrand Chenal committed 2008-11-11 23:35:50 +01:00
1 parent 992b854acb
commit 8586da96fe
1 file changed
+2 -3
+2 -3
View File
@@ -92,10 +92,9 @@ class Inventory(OSV):
line_obj.create_move(cursor, user, line, context=context)
self.write(
cursor, user, inventory_id,
{'date': date_obj.today(cursor, user, context=context)},
{'state': 'done',
'date': date_obj.today(cursor, user, context=context)},
context=context)
self.write(
cursor, user, inventory_id, {'state': 'done',}, context=context)
def copy(self, cursor, user, inventory_id, default=None, context=None):
date_obj = self.pool.get('ir.date')