Merge remote-tracking branch 'odoo/7.0' into 7.0
authorOCA git bot <OCA-git-bot@therp.nl>
Wed, 10 Sep 2014 14:17:14 +0000 (16:17 +0200)
committerOCA git bot <OCA-git-bot@therp.nl>
Wed, 10 Sep 2014 14:17:14 +0000 (16:17 +0200)
Fix conflicts:
addons/account_voucher/account_voucher.py
addons/hr_expense/hr_expense.py
addons/mail/mail_thread.py
addons/web/static/src/js/views.js
openerp/report/report_sxw.py
openerp/tools/translate.py

28 files changed:
1  2 
addons/account/account.py
addons/account/account_analytic_line.py
addons/account/account_invoice.py
addons/account/account_invoice_view.xml
addons/account/account_move_line.py
addons/account_budget/account_budget.py
addons/email_template/email_template.py
addons/hr_expense/hr_expense.py
addons/hr_holidays/hr_holidays.py
addons/mail/mail_thread.py
addons/sale_stock/sale_stock_view.xml
addons/stock/stock.py
addons/stock/stock_view.xml
addons/survey/wizard/survey_answer.py
addons/web/controllers/main.py
addons/web/static/src/css/base.css
addons/web/static/src/css/base.sass
addons/web/static/src/js/data.js
addons/web/static/src/js/view_form.js
addons/web/static/src/js/view_list.js
addons/web/static/src/js/views.js
addons/web_kanban/static/src/js/kanban.js
openerp/addons/base/ir/ir_attachment.py
openerp/addons/base/res/res_partner.py
openerp/osv/orm.py
openerp/report/render/rml2pdf/trml2pdf.py
openerp/tools/translate.py
openerp/tools/yaml_import.py

Simple merge
@@@ -1023,10 -1024,10 +1024,10 @@@ class account_invoice(osv.osv)
              line = self.finalize_invoice_move_lines(cr, uid, inv, line)
  
              move = {
 -                'ref': inv.reference and inv.reference or inv.name,
 +                'ref': inv.reference or inv.supplier_invoice_number or inv.name,
                  'line_id': line,
                  'journal_id': journal_id,
-                 'date': date,
+                 'date': inv.date_invoice,
                  'narration': inv.comment,
                  'company_id': inv.company_id.id,
              }
Simple merge
@@@ -119,29 -118,10 +119,25 @@@ class crossovered_budget_lines(osv.osv)
              acc_ids = [x.id for x in line.general_budget_id.account_ids]
              if not acc_ids:
                  raise osv.except_osv(_('Error!'),_("The Budget '%s' has no accounts!") % ustr(line.general_budget_id.name))
 +            acc_ids = account_obj._get_children_and_consol(cr, uid, acc_ids, context=context)
              date_to = line.date_to
              date_from = line.date_from
-             if context.has_key('wizard_date_from'):
-                 date_from = context['wizard_date_from']
-             if context.has_key('wizard_date_to'):
-                 date_to = context['wizard_date_to']
              if line.analytic_account_id.id:
 -                cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date "
 +                cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id in "
 +                       """(with recursive account_analytic_account_hierarchy(id)
 +                        as 
 +                            (
 +                                select id from account_analytic_account 
 +                                    where id=%s
 +                                union all
 +                                select account_analytic_account.id from 
 +                                    account_analytic_account 
 +                                    join account_analytic_account_hierarchy
 +                                    on account_analytic_account.parent_id=
 +                                        account_analytic_account_hierarchy.id
 +                            )"""
 +                       "select id from account_analytic_account_hierarchy) "
 +                       "AND (date "
                         "between to_date(%s,'yyyy-mm-dd') AND to_date(%s,'yyyy-mm-dd')) AND "
                         "general_account_id=ANY(%s)", (line.analytic_account_id.id, date_from, date_to,acc_ids,))
                  result = cr.fetchone()[0]
@@@ -301,8 -283,6 +301,7 @@@ class hr_expense_expense(osv.osv)
              if not mres:
                  continue
              res.append(mres)
 +            current_product_line_pos = len(res) - 1
-             tax_code_found= False
              
              #Calculate tax according to default tax on product
              taxes = []
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge