openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #00982
[Bug 889989] [NEW] sequence prefix year must not be used with fiscal year sequences
Public bug reported:
account/ir_sequence.py
def _next(self, cr, uid, seq_ids, context=None):
for seq in self.browse(cr, uid, seq_ids, context):
for line in seq.fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id'):
return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
if
SAJ/%(year)s/
is used
the number will have a prefix from the current year while the seuence is taken from the fiscal year in the context.
this will always happen at years end if invoices for the "old" fiscal
year are issued which is at least unusual and not allowd in Austria,
especially if no GAP is used.
IMHO OpenERP need a placeholder %(fy)s which uses the year of the fiscal
year selected by context.get('fiscalyear_id')
only work around now is to hard code the Prefix. like SAL/2011/ ,
SAJ/2012, ...
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/889989
Title:
sequence prefix year must not be used with fiscal year sequences
Status in OpenERP Addons (modules):
New
Bug description:
account/ir_sequence.py
def _next(self, cr, uid, seq_ids, context=None):
for seq in self.browse(cr, uid, seq_ids, context):
for line in seq.fiscal_ids:
if line.fiscalyear_id.id == context.get('fiscalyear_id'):
return super(ir_sequence, self)._next(cr, uid, [line.sequence_id.id], context)
return super(ir_sequence, self)._next(cr, uid, seq_ids, context)
if
SAJ/%(year)s/
is used
the number will have a prefix from the current year while the seuence is taken from the fiscal year in the context.
this will always happen at years end if invoices for the "old" fiscal
year are issued which is at least unusual and not allowd in Austria,
especially if no GAP is used.
IMHO OpenERP need a placeholder %(fy)s which uses the year of the
fiscal year selected by context.get('fiscalyear_id')
only work around now is to hard code the Prefix. like SAL/2011/ ,
SAJ/2012, ...
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/889989/+subscriptions
Follow ups
References