diff --git a/addons/account/account.py b/addons/account/account.py
index 729037102b3..fee6d951e9a 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -1953,8 +1953,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
for key,value in todo_dict.items():
if value['account_collected_id'] or value['account_paid_id']:
obj_acc_tax.write(cr, uid, [key], vals={
- 'account_collected_id': value['account_collected_id'],
- 'account_paid_id': value['account_paid_id'],
+ 'account_collected_id': acc_template_ref[value['account_collected_id']],
+ 'account_paid_id': acc_template_ref[value['account_paid_id']],
})
# Creating Journals
diff --git a/addons/account/account_menuitem.xml b/addons/account/account_menuitem.xml
index 9b3726b5c40..a9500a37187 100644
--- a/addons/account/account_menuitem.xml
+++ b/addons/account/account_menuitem.xml
@@ -10,12 +10,13 @@
+
-
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index b81c624ded4..611ebf7fe84 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -171,7 +171,7 @@ class account_invoice(osv.osv):
('cancel','Canceled')
],'State', select=True, readonly=True),
- 'date_invoice': fields.date('Date Invoiced', required=True, states={'open':[('readonly',True)],'close':[('readonly',True)]}),
+ 'date_invoice': fields.date('Date Invoiced', states={'open':[('readonly',True)],'close':[('readonly',True)]}),
'date_due': fields.date('Due Date', states={'open':[('readonly',True)],'close':[('readonly',True)]}),
'partner_id': fields.many2one('res.partner', 'Partner', change_default=True, readonly=True, required=True, states={'draft':[('readonly',False)]}),
@@ -203,7 +203,7 @@ class account_invoice(osv.osv):
}
_defaults = {
'type': _get_type,
- 'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
+ #'date_invoice': lambda *a: time.strftime('%Y-%m-%d'),
'state': lambda *a: 'draft',
'journal_id': _get_journal,
'currency_id': _get_currency,
@@ -332,9 +332,9 @@ class account_invoice(osv.osv):
if default is None:
default = {}
default = default.copy()
- default.update({'state':'draft', 'number':False, 'move_id':False,})
+ default.update({'state':'draft', 'number':False, 'move_id':False})
if 'date_invoice' not in default:
- default['date_invoice'] = time.strftime('%Y-%m-%d')
+ default['date_invoice'] = False
if 'date_due' not in default:
default['date_due'] = False
return super(account_invoice, self).copy(cr, uid, id, default, context)
@@ -428,6 +428,8 @@ class account_invoice(osv.osv):
continue
if inv.type in ('in_invoice', 'in_refund') and abs(inv.check_total - inv.amount_total) >= (inv.currency_id.rounding/2.0):
raise osv.except_osv(_('Bad total !'), _('Please verify the price of the invoice !\nThe real total does not match the computed total.'))
+ if not inv.date_invoice:
+ self.write(cr, uid, [inv.id], {'date_invoice':time.strftime('%Y-%m-%d')})
company_currency = inv.company_id.currency_id.id
# create the analytical lines
line_ids = self.read(cr, uid, [inv.id], ['invoice_line'])[0]['invoice_line']
@@ -473,7 +475,7 @@ class account_invoice(osv.osv):
i['amount_currency'] = i['price']
i['price'] = cur_obj.compute(cr, uid, inv.currency_id.id,
company_currency, i['price'],
- context={'date': inv.date_invoice})
+ context={'date': inv.date_invoice or time.strftime('%Y-%m-%d')})
else:
i['amount_currency'] = False
i['currency_id'] = False
@@ -534,7 +536,7 @@ class account_invoice(osv.osv):
'ref': ref
})
- date = inv.date_invoice
+ date = inv.date_invoice or time.strftime('%Y-%m-%d')
part = inv.partner_id.id
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})) ,iml)
@@ -549,7 +551,7 @@ class account_invoice(osv.osv):
move = {'name': name, 'line_id': line, 'journal_id': journal_id}
period_id=inv.period_id and inv.period_id.id or False
if not period_id:
- period_ids= self.pool.get('account.period').search(cr,uid,[('date_start','<=',inv.date_invoice),('date_stop','>=',inv.date_invoice)])
+ period_ids= self.pool.get('account.period').search(cr,uid,[('date_start','<=',inv.date_invoice or time.strftime('%Y-%m-%d')),('date_stop','>=',inv.date_invoice or time.strftime('%Y-%m-%d'))])
if len(period_ids):
period_id=period_ids[0]
if period_id:
diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py
index 2c89a522620..9f2604e73bf 100644
--- a/addons/l10n_lu/__terp__.py
+++ b/addons/l10n_lu/__terp__.py
@@ -10,7 +10,7 @@ This module install:
*the KLUWER Chart of Accounts,
*the Tax Code Chart for Luxembourg
*the main taxes used in Luxembourg""",
- "depends" : ["account","account_report"],
+ "depends" : ["account","account_report","base_vat","base_iban"],
"init_xml" : [ ],
"demo_xml" : [ "account.report.report.csv" ],
"update_xml" : [
diff --git a/addons/l10n_lu/l10n_lu_wizard.xml b/addons/l10n_lu/l10n_lu_wizard.xml
index 127ff4a0ce1..dd16b17d429 100644
--- a/addons/l10n_lu/l10n_lu_wizard.xml
+++ b/addons/l10n_lu/l10n_lu_wizard.xml
@@ -19,7 +19,7 @@ This is the same wizard that runs from Financial Managament/Configuration/Financ
id="wizard_print_vat"
menu="False"
model="account.tax.code"
- name="l10n_lu.tax.report.wizard" string="Luxemburg VAT Declaration"/>
+ name="l10n_lu.tax.report.wizard" string="VAT Declaration"/>