[MERGE] forward port of branch 7.0 up to revid 9236 mat@openerp.com-20130613160953...
authorChristophe Simonis <chs@openerp.com>
Thu, 13 Jun 2013 18:15:03 +0000 (20:15 +0200)
committerChristophe Simonis <chs@openerp.com>
Thu, 13 Jun 2013 18:15:03 +0000 (20:15 +0200)
bzr revid: chs@openerp.com-20130613181503-82234mo34wxb0oap

54 files changed:
1  2 
addons/account/account.py
addons/account/account_bank_statement.py
addons/account/account_cash_statement.py
addons/account/account_invoice.py
addons/account/account_move_line.py
addons/account/account_view.xml
addons/account/installer.py
addons/account/project/project_view.xml
addons/account/wizard/account_fiscalyear_close.py
addons/account/wizard/account_validate_account_move.py
addons/account_analytic_default/account_analytic_default.py
addons/account_analytic_plans/account_analytic_plans.py
addons/account_payment/wizard/account_payment_order.py
addons/account_voucher/account_voucher.py
addons/anonymization/anonymization.py
addons/base_report_designer/static/base-report-designer-plugin/openerp_report_designer.zip
addons/delivery/sale.py
addons/edi/models/edi.py
addons/hr_attendance/wizard/hr_attendance_error.py
addons/hr_expense/hr_expense_view.xml
addons/hr_holidays/hr_holidays_view.xml
addons/hr_payroll/wizard/hr_payroll_payslips_by_employees.py
addons/hr_timesheet_invoice/hr_timesheet_invoice.py
addons/l10n_be/wizard/l10n_be_account_vat_declaration.py
addons/l10n_be/wizard/l10n_be_partner_vat_listing.py
addons/l10n_be/wizard/l10n_be_vat_intra.py
addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py
addons/l10n_lu/wizard/print_vat.py
addons/mail/mail_thread.py
addons/mail/static/src/js/mail.js
addons/mrp_operations/mrp_operations.py
addons/mrp_repair/mrp_repair.py
addons/point_of_sale/point_of_sale.py
addons/point_of_sale/wizard/pos_open_statement.py
addons/portal/wizard/portal_wizard.py
addons/procurement/procurement.py
addons/procurement/procurement_view.xml
addons/product_visible_discount/product_visible_discount.py
addons/project/project.py
addons/project/res_partner.py
addons/project_gtd/wizard/project_gtd_empty.py
addons/project_timesheet/project_timesheet.py
addons/purchase/stock_view.xml
addons/report_webkit/webkit_report.py
addons/sale/sale.py
addons/sale_crm/wizard/crm_make_sale.py
addons/sale_stock/sale_stock.py
addons/share/wizard/share_wizard.py
addons/stock/stock.py
addons/stock/wizard/stock_return_picking.py
addons/subscription/subscription.py
addons/survey/survey.py
addons/survey/wizard/survey_answer.py
addons/warning/warning.py

Simple merge
@@@ -577,7 -579,11 +580,11 @@@ class account_invoice(osv.osv)
      def onchange_partner_bank(self, cursor, user, ids, partner_bank_id=False):
          return {'value': {}}
  
 -    def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id):
 +    def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id, context=None):
+         #TODO: add the missing context parameter when forward-porting in trunk so we can remove
+         #      this hack!
+         context = self.pool['res.users'].context_get(cr, uid)
          val = {}
          dom = {}
          obj_journal = self.pool.get('account.journal')
Simple merge
Simple merge
@@@ -111,11 -112,11 +111,11 @@@ class account_installer(osv.osv_memory)
      def check_unconfigured_cmp(self, cr, uid, context=None):
          """ check if there are still unconfigured companies """
          if not self.get_unconfigured_cmp(cr, uid, context=context):
-             raise osv.except_osv(_('No unconfigured company !'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
+             raise osv.except_osv(_('No unconfigured company!'), _("There is currently no company without chart of account. The wizard will therefore not be executed."))
 -    
 +
      def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
 -        if context is None:context = {}
 -        res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
 +        if context is None: context = {}
 +        res = super(account_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
          cmp_select = []
          # display in the widget selection only the companies that haven't been configured yet
          unconfigured_cmp = self.get_unconfigured_cmp(cr, uid, context=context)
@@@ -57,9 -58,10 +57,9 @@@ class validate_account_move_lines(osv.o
                  move_ids.append(line.move_id.id)
          move_ids = list(set(move_ids))
          if not move_ids:
-             raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
+             raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move entries in draft state.'))
          obj_move.button_validate(cr, uid, move_ids, context)
          return {'type': 'ir.actions.act_window_close'}
 -validate_account_move_lines()
  
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
  
@@@ -1622,9 -1638,10 +1622,9 @@@ class account_bank_statement(osv.osv)
          for bk_st in self.browse(cr, uid, ids, context=context):
              if vals.get('journal_id') and bk_st.line_ids:
                  if any([x.voucher_id and True or False for x in bk_st.line_ids]):
-                     raise osv.except_osv(_('Unable to change journal !'), _('You can not change the journal as you already reconciled some statement lines!'))
+                     raise osv.except_osv(_('Unable to Change Journal!'), _('You can not change the journal as you already reconciled some statement lines!'))
          return super(account_bank_statement, self).write(cr, uid, ids, vals, context=context)
  
 -account_bank_statement()
  
  class account_bank_statement_line(osv.osv):
      _inherit = 'account.bank.statement.line'
Simple merge
index 7d03f45,0000000..238f9d1
mode 100644,000000..100644
Binary files differ
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -494,8 -435,8 +494,8 @@@ class mail_thread(osv.AbstractModel)
          """ Used by the plugin addon, based for plugin_outlook and others. """
          ret_dict = {}
          for model_name in self.pool.obj_list():
 -            model = self.pool.get(model_name)
 +            model = self.pool[model_name]
-             if 'mail.thread' in getattr(model, '_inherit', []):
+             if hasattr(model, "message_process") and hasattr(model, "message_post"):
                  ret_dict[model_name] = model._description
          return ret_dict
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
              <field name="search_view_id" ref="warehouse_orderpoint_search" />
              <field name="help" type="html">
                <p class="oe_view_nocontent_create">
-                 Click to add a reordering rules.
 -              You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or purchase quotations according to the stock level.Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.
 -              </p>
++                Click to add a reordering rule.
 +              </p><p>You can define your minimum stock rules, so that OpenERP will automatically create draft manufacturing orders or request for quotations according to the stock level. Once the virtual stock of a product (= stock on hand minus all confirmed orders and reservations) is below the minimum quantity, OpenERP will generate a procurement request to increase the stock up to the maximum quantity.</p>
              </field>
          </record>
  
Simple merge
@@@ -29,6 -29,15 +29,14 @@@ class res_partner(osv.osv)
          'task_ids': fields.one2many('project.task', 'partner_id', 'Tasks'),
      }
  
+     def copy(self, cr, uid, record_id, default=None, context=None):
+         if default is None:
+             default = {}
+         default['task_ids'] = []
+         return super(res_partner, self).copy(
+                 cr, uid, record_id, default=default, context=context)
 -res_partner()
  
  
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@@ -286,8 -291,9 +286,8 @@@ class account_analytic_line(osv.osv)
         st = acc.to_invoice.id
         res['value']['to_invoice'] = st or False
         if acc.state == 'close' or acc.state == 'cancelled':
-            raise osv.except_osv(_('Invalid Analytic Account !'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
+            raise osv.except_osv(_('Invalid Analytic Account!'), _('You cannot select a Analytic Account which is in Close or Cancelled state.'))
         return res
  
 -account_analytic_line()
  
  # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Simple merge
@@@ -241,9 -190,14 +241,14 @@@ class WebKitParser(report_sxw)
  
      def translate_call(self, src):
          """Translate String."""
 -        ir_translation = self.pool.get('ir.translation')
 +        ir_translation = self.pool['ir.translation']
+         name = self.tmpl and 'addons/' + self.tmpl or None
          res = ir_translation._get_source(self.parser_instance.cr, self.parser_instance.uid,
-                                          None, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
+                                          name, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
+         if res == src:
+             # no translation defined, fallback on None (backward compatibility)
+             res = ir_translation._get_source(self.parser_instance.cr, self.parser_instance.uid,
+                                              None, 'report', self.parser_instance.localcontext.get('lang', 'en_US'), src)
          if not res :
              return src
          return res
Simple merge
Simple merge
Simple merge
@@@ -2192,8 -2201,9 +2192,8 @@@ class stock_move(osv.osv)
                  if move.picking_id:
                      pickings.add(move.picking_id.id)
              if move.move_dest_id and move.move_dest_id.state == 'waiting':
-                 self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'})
+                 self.write(cr, uid, [move.move_dest_id.id], {'state': 'confirmed'})
                  if context.get('call_unlink',False) and move.move_dest_id.picking_id:
 -                    wf_service = netsvc.LocalService("workflow")
                      wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
          self.write(cr, uid, ids, {'state': 'cancel', 'move_dest_id': False})
          if not context.get('call_unlink',False):
@@@ -113,9 -115,9 +113,9 @@@ class subscription_subscription(osv.osv
              try:
                  (model_name, id) = row['doc_source'].split(',')
                  id = int(id)
 -                model = self.pool.get(model_name)
 +                model = self.pool[model_name]
              except:
-                 raise osv.except_osv(_('Wrong Source Document !'), _('Please provide another source document.\nThis one does not exist !'))
+                 raise osv.except_osv(_('Wrong Source Document!'), _('Please provide another source document.\nThis one does not exist!'))
  
              default = {'state':'draft'}
              doc_obj = self.pool.get('subscription.document')
Simple merge
Simple merge
Simple merge