In the portal, when the client signature is asked (for a SO for example).
Before this commit, the client could send the form without really signing
the document.
Now, a warning is shown if the form is not signed.
opw-1943702
closesodoo/odoo#31768
Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Suppose that a payment transaction cannot be reconciled for any reason.
Then _cron_post_process_after_done will try to process it every 10 minutes until
the end of time.
Moreover, if the user takes some manual action before
_cron_post_process_after_done,
even if in principle it would have been able to go through,
then it is likely to fail, e.g. on invoice_open.
Meaning that a transaction that could have been processed will become
an undead transaction.
To avoid that situation we set an arbitrary retry_limit_date set to 2 days,
which seems a reasonnable compromise.
It gives some time for the transaction to go through, but not exaggeratedly so.
opw 1945953
closesodoo/odoo#31791
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
This makes the assets to be recomputed everytime somebody with a different
language load the page.
closesodoo/odoo#31782
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
When there is an optional product for which the quantity is set to 0 because
there is no stock available, the cart update would raise because it tried to
read the order line even though it was deleted above.
Now we apply the logic only if the order_line actually exists.
Part of task 1950712
closesodoo/odoo#31779
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Sequentially previewing and paying two sale orders was causing a
redirection issue. Instead of being redirect to the SO preview
(/my/orders/<:order_id>), the user was redirected to /payment/process.
The issue was due to processed transactions not being removed from the
session.
opw-1948288
Closes#31741
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
When journals of type bank are created, default accounts are also
created, and an account code is automatically generated. However, the
number of possible automatic account codes is very limited, because only
100 different codes may be generated, and the error message "Cannot
generate an unused account code" is shown.
To solve the above, the number of possible account codes is raised up to
10,000 different possibilities.
closesodoo/odoo#31681
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
When register a payment, and choosing a payment acquired.
Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).
Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.
Co-authored-by: Toufik Benjaa <tbe@odoo.com>
opw-1928834
closesodoo/odoo#31732
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
vals may be an empty dict
This may happen a write is done on a computed field, the call to _write will
be empty (still needed to update write_uid/date).
Before this commit, all fields were read in the read call.
This was unecessary and may produce acess-rights errors or other side effect
(e.g. in odoo/enterprise#3778 the technical field ticket_count was read, even
if not present in the view or the write call)
Only compute old_values on the fields that are modified
Fixesodoo/enterprise#3778
opw-1949911
closesodoo/odoo#31737
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
If the content is too long, it overflows badly.
Since the height is fixed, the flex doesn't work well.
opw 1924145
closesodoo/odoo#31717
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In case company is not set on the model related to the template,
we should not try to retrieve it when creating the associated partner.
Fine-tuning of a46138cb01
opw-1947334
closesodoo/odoo#31607
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Install Invoicing (account) and uninstall it. It results to a an error
because some views required by `payment.acquirer` are deleted before
the acquirers.
The problem is due to the way copied views are deleted, since 1388b7f
they are removed before the module uninstallation. The related commit
faced a similar problem where copied views were deleted too late
during a module uninstallation.
The two problems are revealing that the copied views have to be removed
as part of the module uninstallation, more precisely after all records
refering to them has been deleted but before the schemas has been
cleaned.
opw-1943286
closesodoo/odoo#31443
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before this commit:
The `if` condition doing a `View._views_get` was supposed to be a sort of
'hack' for when the error occured in a child view (as the template raised would
be the parent, not the broken child).
But since we refactored that part to use etree, it was actually going into that
condition for every error even if the error was in the called template.
Proof is, we only set `editable` in that if condition, meaning going in the
else would actually prevent to show reset template.
Indeed the following code would always be true:
et = etree.fromstring(view.with_context(inherit_branding=False).read_combined(['arch'])['arch'])
node = et.find(exception.path.replace('/templates/t/', './'))
as read_combined returns all the view hierarchy DOM
Note: We could not fix this by checking exception.path against `arch` as we
could have false positive (eg the child view replace the <p> element by another
<p> element which is broken, then the path would be found in the parent view
even if the error was in the child view).
closesodoo/odoo#31515
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In saas-11.3 "Is a Landed Cost" (landed_cost_ok) was moved from the
product accounting tab, to the inventory tab.
The inventory tab is only shown for product not of type service, but the
field should be shown when product is of type service, consu or product.
With this changeset, "Is a Landed Cost" is displayed in the top and
"Split Method" is hidden: to specify the split method, this needs to be
done from products in Inventory > Configuration > Landed Cost Types, or
by the list view of cost lines when creating a landed cost.
opw-1949329
closes#31714
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The filter parent_res_name was already in the original search view so
the duplicated one was not needed and caused to have two times the
filter in the search view with possible different behavior.
opw-1949559
closes#31707
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Commit 6af6da5c5 introduced a duplicated term to the file .pot, which
causes the following error when trying to re-load translations:
```
ON CONFLICT DO UPDATE command cannot affect row a second time
HINT: Ensure that no rows proposed for insertion within the same
command have duplicate constrained values.
```
This commit removes on eof the duplicates, leaving only the valid one.
```
```
closesodoo/odoo#31683
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Reverts 2b1d3ff82d introduced in 10.0 via
It was relatively useful in Odoo 10.0 because in Python 2 the exception
was missing a root cause traceback. But Python 3 includes exception
chaining by default, so it comes for free.
See [PEP3134](https://legacy.python.org/dev/peps/pep-3134/)
On top of being redundant in P3, it can also break some testcases
by causing an extra ERROR log entry, even when the final exception is
expected and caught. So it's simpler to remove it.
closesodoo/odoo#31699
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
When creating a cart on the website, the website company was not
considered which could end up with the selection of a fiscal position
linked to a wrong company since the method is called in sudo.
closesodoo/odoo#31673
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This widget does not exist anymore since the merge between the all widgets
(new view refactoring).
closesodoo/odoo#31643
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before 11.0 the kanban view used to have its own widget registry. It is not the
case anymore, but there are still leftovers from the past. For example, the
widget `kanban_label_selection` is still used in many views, even though it is
now called `label_selection`.
As we are in a stable version, a fallback has been added for it in the field
registry.
Similar to odoo/odoo@5401c15Closesodoo/odoo#30904Closesodoo/odoo#25928
To avoid exception:
TypeError: Mixing apples and oranges: gamification.badge() - gamification.badge.user(1,)
when rule_auth of a badge is set to `having`.
opw-1945440
closes#31436closes#31595
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Inline (base64) embedded images are not supported by most mail
clients (gmail on top of them), this fix save those images as
attachments and replace the src tag with the url of the
generated image so the image correctly renders.
opw-1929940
closesodoo/odoo#31532
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
This commit introduced a regression in web_studio, discovered at opw-1947380
A fix in web_studio will be integrated too but the regression is the proof this
commit should not have been integrated in 11.0.
While the new behaviour introduced at d855e3911f makes more sense, it is still
a change of behaviour that should not target a stable version.
For the problem raised at opw-1887162 that d855e3911f was trying to fix, a
workaround should be used instead.
For instance, setting a widget='html_frame' allows to translate in the website
editor that handles this correctly.
In master, the new behaviour can be maintained and eventual regressions will be
investigated there.
closesodoo/odoo#31585
Signed-off-by: "Martin Trigaux (mat)" <mat@odoo.com>
Since https://github.com/odoo/odoo/commit/5a030db3eb77b6d80187f8ae1a64303b2f50391d
the HTML editor displayed the translated versions of the templates it
allows to customize. So if the user edited and saved such a template,
the non-translated version was saved with translated-version content.
The behavior before the mentioned commit was:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, re-make a RPC to load the view again
The mentioned commit made this simpler by making:
1) Load all views the HTML editor allows to edit
2) Each time a view is displayed, simply show the previously loaded view
... the problem was that the step (2) of the old behavior was
explicitly saying (client-side) to load the view's untranslated content.
This commit makes step (1) always load the untranslated versions of the
views (server-side).
It seems that our beloved administration is not happy with the FEC file
ending with an empty new line
Hence, this commit makes the FEC file last line end without \r\n characters
and there is no empty new line
OPW 1943302