[MERGE] Forward-port of 7.0 bugfixes up to 4d3a5df
authorOlivier Dony <odo@openerp.com>
Thu, 12 Jun 2014 11:49:32 +0000 (13:49 +0200)
committerOlivier Dony <odo@openerp.com>
Thu, 12 Jun 2014 11:49:32 +0000 (13:49 +0200)
1  2 
addons/account/account.py
addons/account/account_move_line.py
addons/account/partner.py
addons/base_action_rule/base_action_rule.py
addons/delivery/__openerp__.py
addons/delivery/stock.py
addons/l10n_multilang/account.py
addons/sale_stock/sale_stock.py

Simple merge
Simple merge
Simple merge
@@@ -266,10 -235,13 +268,13 @@@ class base_action_rule(osv.osv)
          action_ids = self.search(cr, uid, action_dom, context=context)
          for action in self.browse(cr, uid, action_ids, context=context):
              now = datetime.now()
-             last_run = get_datetime(action.last_run) if action.last_run else False
+             if action.last_run:
+                 last_run = get_datetime(action.last_run)
+             else:
+                 last_run = datetime.utcfromtimestamp(0)
  
              # retrieve all the records that satisfy the action's condition
 -            model = self.pool.get(action.model_id.model)
 +            model = self.pool[action.model_id.model]
              domain = []
              ctx = dict(context)
              if action.filter_id:
                  record_dt = get_record_dt(record)
                  if not record_dt:
                      continue
 -                action_dt = get_datetime(record_dt) + delay
 +                action_dt = self._check_delay(cr, uid, action, record, record_dt, context=context)
-                 if last_run and (last_run <= action_dt < now) or (action_dt < now):
+                 if last_run <= action_dt < now:
                      try:
+                         context = dict(context or {}, action=True)
                          self._process(cr, uid, action, [record.id], context=context)
                      except Exception:
                          import traceback
Simple merge
Simple merge
@@@ -72,14 -78,18 +72,16 @@@ class account_fiscal_position(osv.osv)
      _inherit = 'account.fiscal.position'
      _columns = {
          'name': fields.char('Fiscal Position', size=64, required=True, translate=True),
+         'note': fields.text('Notes', translate=True),
      }
 -account_fiscal_position()
  
  
  class account_fiscal_position_template(osv.osv):
      _inherit = 'account.fiscal.position.template'
      _columns = {
          'name': fields.char('Fiscal Position Template', size=64, required=True, translate=True),
+         'note': fields.text('Notes', translate=True),
      }
 -account_fiscal_position_template()
  
  
  class account_journal(osv.osv):
Simple merge