[IMP] date invoice in sale
bzr revid: fp@tinyerp.com-20121215170559-6qq3xwawj0p1bies
This commit is contained in:
parent
2bcf2bcec0
commit
67bdf29938
|
@ -475,7 +475,7 @@ class sale_order(osv.osv):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_inv = False, context=None):
|
def action_invoice_create(self, cr, uid, ids, grouped=False, states=None, date_invoice = False, context=None):
|
||||||
if states is None:
|
if states is None:
|
||||||
states = ['confirmed', 'done', 'exception']
|
states = ['confirmed', 'done', 'exception']
|
||||||
res = False
|
res = False
|
||||||
|
@ -488,8 +488,8 @@ class sale_order(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
|
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
|
||||||
# last day of the last month as invoice date
|
# last day of the last month as invoice date
|
||||||
if date_inv:
|
if date_invoice:
|
||||||
context['date_inv'] = date_inv
|
context['date_invoice'] = date_invoice
|
||||||
for o in self.browse(cr, uid, ids, context=context):
|
for o in self.browse(cr, uid, ids, context=context):
|
||||||
currency_id = o.pricelist_id.currency_id.id
|
currency_id = o.pricelist_id.currency_id.id
|
||||||
if (o.partner_id.id in partner_currency) and (partner_currency[o.partner_id.id] <> currency_id):
|
if (o.partner_id.id in partner_currency) and (partner_currency[o.partner_id.id] <> currency_id):
|
||||||
|
|
Loading…
Reference in New Issue