When not logged in the webstie on Safari and clicking on "Have a Question? Chat with us",
it creates a mail.channel from get_mail_channel and it also creates a translation.
But with Safari, the accept_languages is set with the value 'fr-fr', and this value was set
in the context as the lang='fr_fr'. So when the translation was created, a bad insert query was
raised in sql because the lang didn't exist in the res.lang table. When a translation is created,
the function _get_languages checked that the language is in the table.
So it was impossible to use the chatter when the user is not logged.
NB: interseting functions to see:
-setup_lang in odoo/http.py
-_dispatch in addons/website/models/ir_http.py
-get_mail_channel in addons/im_livechat/models/im_livechat_channel.py
opw:716519
This adds the hw_screen module which is responsible for receiving
rendered HTML from a POS client and sending it to a running Chromium
browser. This is done by sending Remote Debugging Protocol messages over
a WebSocket provided by Chromium. This allows hw_screen to evaluate
arbitrary JS. This is used to seamlessly (without flickering) update the
browser.
This also includes changes to the POSBox. X, Chromium and some
miscellaneous other programs were added. Functionality was added that
automatically displays a fullscreen, UI-less Chromium browser when the
POSBox starts up. This is accomplished through x_application.sh, which
gets executed only when a display is detected. After the browser starts,
it will display a specific screen until it receives the first order update
from a POS client.
Creates a public controller to be able to display the interface on an external
device not connected to the posbox (e.g. tablet)
Courtesy of JOV, LPE, ODO and MAT
In some cases, the description fails (unknow printer, udev issues,...) and while
the printer works fine, the description fails.
This is a cherry pick of 994d45f4 to 8.0 (as the posbox is built on top of it)
In case an exception (programming, out of memory or any other unexpected
failure), the cron_thread would crash and not recover until server restart.
Issue #15666 was an example of failure.
Courtesy of Nils Hamerlinck
If postgresql database is temporarly down, the cron thread may fail.
The cursor creation fails when trying to connect to the server which leads to
the cron thread to die (uncatched exception) and will not restart when postgres
is back.
Fixes#15666
If amount = 1 and the category amount = -1, the sum is 0 and the returned
value was amount instead of zero (`0 or amount`)
Avoid this evalution error by splitting on multiple lines
Closes#15470
The previous code (`parent.field_widget.string`) was returning the untranslated
action name (and why use parent anyway?)
Use the action name instead.
Closes#15207
opw-705938
With a sale order with:
- a stockable product
- the `Create Invoice` policy set to `Before Delivery`
After the quotation validation and the invoice validation,
if the user:
- cancelled the invoice,
- then validated it again,
- then hit `ignore exception` on the sale order
- then registered the payment on the invoice
The picking of the sale order was not created automatically,
and the sale order was therefore stuck.
Actually, it was just a write trigger that was missing:
The condition for the sale order workflow to go to the next state
is that the `invoiced` boolean is set to True.
It was, when the invoice of the sale order was paid
(after having registered the payment), but since
this is a computed field, not stored, no write operation
was actually performed on the sale order, and the workflow
wasn't "notified" that a change occured for the `invoiced` boolean.
A simple write on the sale order (e.g. in its notes) would
have unblock the situation, though.
This trigger ensures the worfklow to be notified when
the invoice of the sale order is paid, and therefore
when the `invoiced` boolean is set to `True`.
opw-706591
In SQL, if there is no quote around the table/field, the result will
be returned as case insensitive.
This was causing a bug in the kanban view which was not displaying
the records because x_AA_count was named x_aa_count.
The POS uses FastClick to circumvent the 300ms touch delay implemented
by browsers before a click event is fired. (Although this has since been
removed, probably we can get rid of this in the POS at some point as
well [1]).
The way FastClick works is simple: immediately fire a synthetic event
and block the one fired by the browser 300ms later.
Recently, browsers have started to only trust native events to trigger
default actions [2][3]. Chrome in particular has started not trusting
synthetic events since v53.
FastClick provides a solution for this with the needsclick class. It
will not interfere with events triggered on elements with this class.
[1] https://developers.google.com/web/updates/2013/12/300ms-tap-delay-gone-away
[2] https://w3c.github.io/uievents/#trusted-events
[3] https://www.chromestatus.com/features/5718803933560832Fixes#14886
A byproduct is a produced when producing another product (the targetted
product).
A move can be linked to another move. eg: we could have a manufacturing
order of 3 units linked to a move of a delivery order of these 3 units.
If we produce 2 units, the manufacturing order is split in 2 units and
1 units, and the delivery order is split similarily because of the link
1. [T manufacturing move split] -> [T delivery move split]
(T is the targetted product, B is the byproduct)
But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted
product delivery move, thus in some situation the move of the delivery
order of the byproduct would erroneously be split 2 times instead of one.
1. [B manufacturing move split] -> [T delivery move split]
2. [T manufacturing move split] -> [T delivery move split]
This could also be the source of other issue, and since the byproduct
and targetted product are different, the link should anyway not be done.
opw-697151
note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53)
When the quantity on hand is updated from the wizard, it may result in
completely inconsistent results.
This happens for example in the following case:
- 10 Units in Stock/WH
- 18 Units in Stock/WH/Shelf 1
The "New Quantity on Hand" suggests a theoretical quantity by taking
into account the location and its sub-locations. It the example, that
would mean 28 Units in location 'Stock/WH'.
However, the `_get_quants` method of the `stock.inventory.line` model
doesn't take into account the children locations. Therefore, the
theoretical quantity would be 10 Units in location 'Stock/WH'.
This inconsistency confuses the user, and the new quantity added might
introduce unexpected results.
opw-703886
Complements the patch in 15583a4813
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
Some printers (e.g. matrix/impact printers) may have a hard time
keeping up with the text output, and may trigger timeout errors
because of this, even though they would otherwise produce a correct
result.
Increasing the default timeout to 5s (from the default 1s) should
take care of most slow printers out there.
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.
1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
Store are safe. And it is a security risk to let end-users deploy Python
code on their Odoo servers without requiring any review/deployment by a
competent system administrator.
We will work on improving the validation process of the Store, but this
will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
non-technical users install Apps, as long as the feature has been
explicitly allowed by the system administrator. This is a common feature
in other software suites as well. So we'd like to keep it as an opt-in
feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
understandably expect to be able to turn off the feature for
security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
we keep it *discoverable* for users. The error message should be
helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
off the feature, we avoid introducing an extra server parameter.
The folder is still created (read-only) by default, for the sole purpose
of making it easier to locate.
Fixes#15225
The reverse field of a one2many could be originating from an
inherits'd field, this was solved in some instance with f5e5bbda.
The issue could still happen in some instances when doing a comparison
of:
- the one2many field to a False value,
- the one2many with a negative operator and an empty set to negate,
With this change, the ORM is used in such a situation.
closes#15234
opw-704962
The test wizard will be dropped eventually but it is not possible to delete
the mass-mailing before the transient is cleaned too due to the required field.
To make it faster, add a ondelete cascade on the field.
Closes#15217
Since `model` is not a required field, the invalidation may crash when one is
missing.
It should never happen than a mail.message has a res_id but not a model as it
makes no business sence.
However it is possible than a message temporarly misses one of the two, e.g:
```
self.model = False
self.res_id = False
```
will trigger two writes and will crash at the first.
Above code should probably be refactored to have only one write but this commit
fixes a regression introduced at 8f1c2bfc (the above code did not crash).
Closes#15199
template contains the mail template to render and is the result of the call to
`self.env.ref('account.email_template_edi_invoice', False)`
If the template does not exists (deleted), template is `None` and the action
rendering crashes.
While it is not recommended to delete master data, it is still possible to use
custom mail templates.
Closes#15204
Introduced by python-pillow/Pillow@c3fe5d43 and integrated into pillow 4.0
The size of the image is ignored and must be set using an image or a mask.
This patch is retrocompatible with the previous versions as the changed code was
in the box size computation. With this patch a 4 points box size is given so the
modified code is not executed.
Fixes#14927
The VAT declaration produces an error when uploaded to the official
website. Although the structure is correct, the "Representative" and the
"Declarant" contain the same information, which is not consistent.
opw-702066
Both store triggers on reconcile_ref are triggered by the same condition,
but seen on 2 tables different, but they always happen together, so no
need for both.
On regular Odoo, the only problem is the performance: the write operation
is performed twice, but on a system with connector or other parallelization
technology, this provokes lot of concurrency problems.