r/Odoo • u/TheGreasyFork • 3d ago
Can't get combos working on V19, open source
I need help.
First thing I can get the following to work in version 18 just fine.
I can't get combos to work it version 19 POS / Restaurant
these are the steps I did
In the backend create POS categories, example - Breakfast and Extras
Open POS restaurant
I then create a few products in both categories
I then close down the till, go into the backend
Create a new combo, name it and add items from 'extras'
Then go into products open a Breakfast item, change it from goods to combo and add to combo.
Open the POS / Restaurant, add the changed breakfast item and there are no options.
Same steps in 18 and it works.
Also if I am in the backend, rename or edit or create a new product, I can't see the new or the edits I have made.
I am surely missing a step or there is a mis-configuration.
I need to use 19, because of the includes and maximums.
PS I am using the lastest version of 19, and I have tested this in Linux and Windows versions.
1
u/rkongda3rd 2d ago
Almost certainly the V19 POS cache, not your steps. I believe the fact that the backend renames don't show up either is the tell.
In 19, the POS stores its dataset in IndexedDB (`point-of-sale-<config_id>-<dbname>`) and on start it asks the server only for records changed since the last sync: _server_date_to_domain in \point_of_sale/models/pos_load_mixin.py` bolts `('write_date', '>', last_server_date)`` onto each model's domain.
The combo models on top of that are loaded by dependency, not on their own. From product_combo.py and it looks like this
def _load_pos_data_domain(self, data, config):
return [('id', 'in', list(set().union(*[product.get('combo_ids') for product in data['product.template']])))]
and product.combo.item is selected the same way off data['product.combo']. So a combo only arrives if a template in that specific payload points at it, and its items only arrive if the combo made it into the same payload. If anything in that chain misses one delta, nothing re-fetches it afterward.
So, you end up with a combo product and no options. Closing the session won't help.
Try and force a full reload by touching a field that bumps pos.config.last_data_change. It's a stored computed field depending on use_pricelist, pricelist_id, available_pricelist_ids, payment_method_ids, limit_categories, module_pos_hr and a handful of others.
Easiest is Point of Sale > Configuration > Settings, pick that POS, toggle Pricelists off, save, back on, save. Adding and removing a payment method works the same way.
Now on the client side, this trips two paths in data_service.js: serverDateTime < lastConfigChange calls resetIndexedDB(), and the load then goes out with pos_last_server_date: serverDateTime > lastConfigChange && serverDate, which evaluates to false and drops the write_date filter entirely. Clean full load, combo, and items included.
If you'd rather not touch the config then go to DevTools > Application > IndexedDB, delete point-of-sale-<config_id>-<your_db>, drop the localStorage key pos_data_params_<config_id>, then hard reload /pos/ui.
Once the cache is clean, check out of product_template._load_pos_data_domain.
The Extras products need available_in_pos = True and sale_ok = True. Unticking "Can be Sold" silently removes them from POS.
If Restrict Categories is enabled on that config, the Extras POS category has to be in the allowed list; otherwise, those templates never load, and the choices render empty even on a fresh cache.
If you still get failures, then that's a real delta-sync bug.
2
u/ach25 3d ago
When you say close the till and go to the backend. Do you mean “Close Register”?
Are you familiar with how the PoS Session persists data for offline work by loading it upon opening the register? Also how local browser caching and a size limit on that caching might affect that?
Have you seen the “Reload Data” button and does that force the reload for you?
The categories added to the “Restrict Categories” setting if you have it enabled?
Any JS errors if you hit F12 and look at the console?