The purpose of this commit is to handle code execution only in server
action and delegate schedule management to ir_cron model.
ir.cron model now inherits from ir.actions.server. Fields model, function
and args are removed as well as the logic to handle them. There is no
more code manipulation and evaluation in ir_cron, only a call to the run
method of ir.actions.server.
Cron form view use server action form view as primary view. This way
automated actions use the same base form as server actions with
cron details added.
Thanks to @fpodoo for the original idea and preliminary work. Thanks to
@jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
Originally written by Nicolas Seinlet <nse@odoo.com>. Provides
pos.config with a product.product cache.
This adds a ported and refactored pos_cache from odoo-extra:
- Adapt to changes in web and point_of_sale since 8.0
- Refactor the load_server_data function, so it isn't copy pasted but
cleanly patched into the load_server_data super.
- Make the cron inactive by default.
- Also remove retrying the write 5 times, when it fails we'll just have
to wait until the cron triggers again (an hour from then).
- Store the product.product fields and domain on pos_cache. When cache
is requested from the pos with a different field or domain it'll
automatically recompute. Necessary for when someone would install a
module that modifies these things in the pos after a cache has been
generated.
- Have multiple caches per pos_config per user
- Make the module adhere to the Odoo Coding Guidelines.