Arnaud Pineux (OpenERP) has proposed merging
lp:~openerp-dev/openobject-server/trunk-base-action-rule-api into
lp:openobject-server.
Requested reviews:
qdp (OpenERP) (qdp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-base-action-rule-api/+merge/136604
Base Action Rule has been changed.
- The conditions can only be done by precondition filter and postcondition
filter.
- Base action rule catch every write and create so:
- Precondition filter is tested before the write
- Postcondition filter is tested after the write or create.
There are also tests for that module
--
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-base-action-rule-api/+merge/136604
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/trunk-base-action-rule-api.
=== modified file 'openerp/modules/loading.py'
--- openerp/modules/loading.py 2012-11-15 16:06:11 +0000
+++ openerp/modules/loading.py 2012-11-28 09:48:27 +0000
@@ -413,6 +413,12 @@
_logger.error('At least one test failed when loading the modules.')
else:
_logger.info('Modules loaded.')
+
+ # STEP 7: for every model call _register_hook
+ for models in pool.models:
+ pool_mod = pool.get(models)
+ pool_mod._register_hook(cr)
+
finally:
cr.close()
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py 2012-11-21 13:07:36 +0000
+++ openerp/osv/orm.py 2012-11-28 09:48:27 +0000
@@ -5155,6 +5155,10 @@
# for backward compatibility
resolve_o2m_commands_to_record_dicts = resolve_2many_commands
+ def _register_hook(self, cr):
+ """ This method is called right after the registry is filled """
+ pass
+
# keep this import here, at top it will cause dependency cycle errors
import expression
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp