This allows to detect barcode scans while the focus is in such a field.
It is not the default behaviour because buffering keystrokes to see if
they are a barcode then releasing them if they aren't isn't trivial
(it is impossible to trigger a native keyboard event).
For a model to use it, it must :
- Inherit barcodes.barcode_events_mixin and override on_barcode_scanned(self, barcode)
- Add <field name=barcode_scanned widget=barcode_handler/> to each form view that
should listen to barcode events and trigger on_barcode_scanned.
The method on_barcode_scanned works just like an onchange.
A 'display: none' rule on hover has been added for boolean buttons, on each
'o_stat_button o_stat_text' that hasn't classname o_hover. This applies on
every stat button that isn't a boolean button, so their content is always
hidden on hover.
* migration to new API
* removed delivery.grid object, has been merged with delivery.carrier
* change view of delivery.carrier (price rules, etc.)
* tests from yml to py
* website : restrict the list of countries for delivery address in the shop
Old code was searching at the same time the xmlid with and without the module
name. But if a file contains a template for his module (without prefix module
name) and a template with the same name for an other template, the node which
are returned canbe the bad template.
Eg: in the same file from an other module than website
<template id="test">
...
</template>
<template id="website.test">
...
</template>
If you are looking for template website.test, the old code was returning the first
"test" instead of "website.test".
Now we look for the more precise xml_id (website.test), before to fallback on the
implicit name (test = without module name).
The onchange for location zones in picking takes into account
partner locations on partner of the picking. (e.g. Suppliers/IT Vendors instead of Suppliers)
This is only the case when the default location of the picking type is empty.
If a partner is assigned to a warehouse, its default supplier/customer location becomes
the Transit location of the company.
That way, when you set a partner on a picking that is the address of a warehouse,
the default source/destination location (depending if it in/out) will be automatically
set to the Transit Location.
The risk was introduced by b7f1b9c.
IF _store_set_values() recall another _create() or _write(),
the recomputation mechanism enter in an infinite recursion
trying to reevaluate for each call exactly the same fields
for the same records than the previous one
This revision replaces the loop of _store_set_values()
by 2 nested loops:
- that not breaks the entire consumption
of recompute_old queue
(Tested thanks to revision a922d39),
- that allows to clear the queue
before each recomputations bundle fixing thereby the recursion
Closes#7558
Disabling all warning coming from listview editable broke tests
because they relied on this behaviour.
The problem that was to be solved is that warnings coming from
listview editable were useless for the user in a form view. Another
solution must be found.
`hr_timesheet_invoice.py` overrides `on_change_account_id`
of model `hr.analytic.timesheet`.
The super call wasn't done, probably because this on_change
method in the base model was trivial:
`return {'value':{}}`
Nevertheless, if another module overrides this on_change,
according to the module dependences,
this method could have been called first in the calling chain,
discarding the changes from the other overriden
`on_change_account_id` methods, preventing
any customization in this on_change according to the
current database state.
Closes#8248