When using easypost, it could exist more than one tracking
link. In this case they are stored as a json and the method
open_url try to load it as a list of url. Then it checks if there is
more than one url or not. However in a single case, there is only one
string and the lenght of a string is the number of chracter inside that
is often more than one.
When coming from the project overview throught the sale orders, or
invoices stat buttons, creating the object will not linked it to
the project. This might confuse the users. The CRUD operation should
be prevent from there, as this is reporting.
When reinvoice an expensable product at cost, it should
takes the amount on the analytic lines created when posting
expenses, instead of the cost on the product.
For instance, you create an expense with the generic expense
product (for a lunch, for instance). The cost of the generic
product is zero, but you don't want to see that amount in
your project plan, and we don't want to create a product
per "lunch expense".
Since https://github.com/odoo/odoo/commit/a473453b3166a381130d9bd6ec4851b9e1ecab26,
a newly cropped image gets a base64 src until the user choose to save
the page (where we create an attachment for the cropped picture). The
problem is that when reentering the crop edition at once... it was not
able to be performed because we did not handle base64 images there.
This commit solves this and accidentally adds a feature: allow cropping
base64 images.
This reverts commit bf64efb5a0.
Indeed, it was in fact necessary as more complex bugs of the library
can appear if we do not reset before. They even do that themself in
their library demo: https://fengyuanchen.github.io/cropperjs/
Let's assume a one2many list with two fields A and B, and an
onchange on A that sets B. Before this rev., on new records, the
onchange was only triggered if the one2many list was defined
inline.
Rev. 13c885195 was an attempt to fix the onchange issue in x2manys
with non inline views, but it only worked on existing records. This
rev. fixes the problem for both cases (existing and new records),
and thus reverts the fix of 13c885195.
The idea of this fix is to make both cases behave similarly, w.r.t.
fields and viewFields stuff in the fieldsView. In the inline case
(like in the main view case), fields and viewFields are the same.
In the non inline case, viewFields contained more information than
fields. As fields is used everywhere in BasicModel (and viewFields
is basically ignored), the fix is to set fields to viewFields.
Previous implementation was wrong as it did not care about the ability
to discard a crop edition. Indeed, whenever a crop dialog was saved,
a crop attachment was created or updated at once. Discarding the editor
would then either:
- Seem to discard a first-time cropped image but would have created an
attachment for nothing (just the image src was reset)
OR
- Fail to discard a second-time cropped image as the cropped attachment
would have been directly updated and the image src would not have
changed
This commit changes the way it works:
- On crop dialog save, the image is marked with required data for a
potential future save of the cropped image (as a DB attachment) and
the src is set to the base64 cropped image directly.
Note that the code ends up being clearer and efficient that way too.
* website, website_mail_channel
Before this commit, when using the 'number of columns' option from a
column's snippet editor, the snippet overlay remained floating in the
void if the current column was removed by the option. This was because
the option did a simple "destroy" on the column without caring about
the snippet editors.
This commit introduces a new event which can be trigger_up'ed to ask
the editor to properly remove a DOM portion (destroy related editors,
call the 'onRemove' callbacks, ...).
As indicated in a code comment, destroying and rebuilding all snippet
editors when a snippet is moved is more accurate as the snippet options
may depend on the new locations in a way the 'onMove' callback cannot
handle. That operation seemed however too costly for no visual benefit
at the time. Now, not implementing it is a source of bugs and redundant
code (as with the new "number of columns" option which is not properly
updated once a column is moved in another row), so this commit
implements the feature.
This also allows for some improvement: the 'cleanForSave' part of
snippet editors is always performed when they are destroyed.
If this proves to be ok and safe, we might want to backport this in
previous versions.
Since d5359cfcf4, it's no longer possible to install the
l10n_es chart templates. Indeed, the transfer account template is generated twice with
the same code due to the addition of a domain in the previous commit:
('chart_template_id', '=', self.id)
...that doesn't take care about the hierarchy of chart template (through the parent_id field).
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.
Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.
Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify
Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
In LESS, 'fadeOut' function is used to make a color more transparent.
In SCSS, that function is called 'fade-out'.
Closes https://github.com/odoo/odoo/pull/25233
When manually registering a time on a Work Order, an error is raised
because of an incorrect value for `workcenter_id`.
The field is added in the view.
opw-1851766
- Stripe.js was limited to only a few pages, which means, if you tried to
implement a new payment route it would never work without modifying
stripe.js to support the new case.
This commit allows stripe.js to be generic and work with any page.
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.
Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.
Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify
Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.