summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-06-11 11:52:29 +0200
committerOlivier Dony <odo@openerp.com>2014-06-11 18:42:18 +0200
commit5ccfeaaeda425a3efe7311bab447e8bdfd36d56e (patch)
tree45dd4ec13e700d6f2c1b832bc6941aa470863cef /addons
parentcf0be50f04ee5bdec25d45c630ecc601065ccc2d (diff)
[FIX] base_action_rule: automatic commit during background processing of rules
This will make sure already processed rules are persisted in case a timeout occurs while processing the next ones, ensuring that *some* progress can be made in most cases.
Diffstat (limited to 'addons')
-rw-r--r--addons/base_action_rule/base_action_rule.py4
-rw-r--r--addons/base_action_rule/base_action_rule_data.xml2
2 files changed, 5 insertions, 1 deletions
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index a6793e9bac5..1b80f9f36c3 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -280,3 +280,7 @@ class base_action_rule(osv.osv):
_logger.error(traceback.format_exc())
action.write({'last_run': now.strftime(DEFAULT_SERVER_DATETIME_FORMAT)})
+
+ if automatic:
+ # auto-commit for batch processing
+ cr.commit()
diff --git a/addons/base_action_rule/base_action_rule_data.xml b/addons/base_action_rule/base_action_rule_data.xml
index 7a9aabedf5f..d4b12f5d4a3 100644
--- a/addons/base_action_rule/base_action_rule_data.xml
+++ b/addons/base_action_rule/base_action_rule_data.xml
@@ -10,7 +10,7 @@
<field eval="False" name="doall"/>
<field eval="'base.action.rule'" name="model"/>
<field eval="'_check'" name="function"/>
- <field eval="'()'" name="args"/>
+ <field eval="'(True,)'" name="args"/>
</record>
</data>