summaryrefslogtreecommitdiff
path: root/addons/pos_cache/data
diff options
context:
space:
mode:
authorJoren Van Onder <jov@odoo.com>2015-02-11 10:18:10 +0100
committerJoren Van Onder <jov@odoo.com>2015-09-25 12:47:29 +0200
commit97b0723722d8ebd3cbf5828c871da19f3d471187 (patch)
tree1622fdda7f53e0e4a22d771a478a96d176dc289d /addons/pos_cache/data
parent9a42baa7e21f52a7d3879d6427b68a82e37f96bb (diff)
[ADD] pos_cache: add pos_cache ported to v9 from odoo-extra
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.
Diffstat (limited to 'addons/pos_cache/data')
-rw-r--r--addons/pos_cache/data/pos_cache_data.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/addons/pos_cache/data/pos_cache_data.xml b/addons/pos_cache/data/pos_cache_data.xml
new file mode 100644
index 00000000000..709e6edea35
--- /dev/null
+++ b/addons/pos_cache/data/pos_cache_data.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <record model="ir.cron" id="refresh_pos_cache_cron">
+ <field name="name">Refresh POS Cache</field>
+ <field name="active" eval="False"/>
+ <field name="interval_number">1</field>
+ <field name="interval_type">hours</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False"/>
+ <field name="model" eval="'pos.cache'"/>
+ <field name="function" eval="'refresh_all_caches'"/>
+ <field name="args" eval="'()'"/>
+ </record>
+ </data>
+</odoo>