Bharat Devnani (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-800767-bde into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #800767 in OpenERP Addons: "wrong dates in recurring entries"
https://bugs.launchpad.net/openobject-addons/+bug/800767
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-800767-bde/+merge/68379
Hello Sir,
I have improved the dates in recurring entries.
Thanks & Regards,
Devnani Bharat R.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-800767-bde/+merge/68379
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-800767-bde.
=== modified file 'account/account.py'
--- account/account.py 2011-07-11 22:23:50 +0000
+++ account/account.py 2011-07-19 13:18:34 +0000
@@ -1331,7 +1331,7 @@
def _centralise(self, cr, uid, move, mode, context=None):
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
- currency_obj = self.pool.get('res.currency')
+ currency_obj = self.pool.get('res.currency')
if context is None:
context = {}
@@ -1593,7 +1593,7 @@
(parent_ids,) + where_params)
res=dict(cr.fetchall())
obj_precision = self.pool.get('decimal.precision')
- res2 = {}
+ res2 = {}
for record in self.browse(cr, uid, ids, context=context):
def _rec_get(record):
amount = res.get(record.id, 0.0)
@@ -2120,7 +2120,7 @@
period_id = period_id[0]
for model in self.browse(cr, uid, ids, context=context):
- entry['name'] = model.name%{'year':time.strftime('%Y'), 'month':time.strftime('%m'), 'date':time.strftime('%Y-%m')}
+ entry['name'] = model.name%{'year':context.get('date',time.strftime('%Y')), 'month':context.get('date',time.strftime('%m')), 'date':context.get('date',time.strftime('%d'))}
move_id = account_move_obj.create(cr, uid, {
'ref': entry['name'],
'period_id': period_id,
@@ -2141,7 +2141,7 @@
'analytic_account_id': analytic_account_id
}
- date_maturity = time.strftime('%Y-%m-%d')
+ date_maturity = context.get('date',time.strftime('%Y-%m-%d'))
if line.date_maturity == 'partner':
if not line.partner_id:
raise osv.except_osv(_('Error !'), _("Maturity date of entry line generated by model line '%s' of model '%s' is based on partner payment term!" \
_______________________________________________
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