Review: Needs Fixing
Please have a look again on the last comment, this is not what I expect to do,
"I DON'T WANT ANY EXTRA CODE EXCEPT USUAL ORM METHODS"

33      + I update the contract to "My Yesterday's Contract" at the date of 
yesterday.
34      +-
35      + !python {model: base.temporal.test}: |
36      + from datetime import datetime, timedelta
37      + date_from = datetime.today() - timedelta(days=1)
38      + record = self.browse(cr, uid, ref("base_temporal_my_contract"), 
context=context)
39      + ids = self.search(cr, uid, 
[('temporal_parent_id','=',record.id),('temporal_date_from','=',record.temporal_date_from)])
40      + self.write(cr, uid, ids, {'name': 'My Yesterday Contract'})
41      + self.write(cr, uid, ids, {'temporal_date_from': date_from}, 
context=context)


just call a write on the record "base_temporal_my_contract", why you need to 
browse and search, if you really need to take care about all this stuff here, 
what is the use of the functions improved in the code?

Please improve code, 
thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-temporal-db-intermediate-branch-rpa-ksa-yml-ksa/+merge/65932
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-temporal-db-intermediate-branch-rpa-ksa.

_______________________________________________
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

Reply via email to