Steps to reproduce:
- go to e-commerce;
- add two products (A and B) to the cart;
- apply an eWallet;
- apply a coupons which allows a 100% discount on product A.
Issue:
A traceback appears (Internal Server Error).
Cause:
We are trying to access a dictionary value
a key which does not exist.
Solution:
Correct the distribution of the amount of payment programs.
opw-3115066
closesodoo/odoo#110036
X-original-commit: 0654d87211d9d9319e94b87a8bc6469778633f02
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
before this commit, the index_content field in attachment form view, is not taking full available space.
after this commit, the colspan="2" is added and field will be shown in full width
closesodoo/odoo#110037
X-original-commit: c11dcf88abe2d1e15d174d71e80ff48f50faa3c2
Signed-off-by: Julien Castiaux <juc@odoo.com>
Fix an issue in the form view of the ir ui view where,
in the edit view dialog, the right group labels would be
all squished up if the xml_id of the view is long.
E.g. the bank reconciliation view.
This is fixed by adding the text-break class to the field.
Task id # 3133662
closesodoo/odoo#110039
X-original-commit: cd1a75f6e9349d8a9ff59c4e65e1d52403e531e9
Signed-off-by: Julien Castiaux <juc@odoo.com>
Use the `fragment_to_query_string` decorator before the `route`
decorator on a controller endpoint. Traceback when the endpoint is
called as a `str` object is not a `Response` object.
Since httpocalypse it is advised that all decorators used with http-type
controllers return a Response. This makes it possible to decorate the
endpoint in any order, even before `@route`.
# Preferred
@route(...)
@fragment_to_query_string
def endpoint(...):
...
# This work
@fragment_to_query_string
@route(...)
def endpoint(...):
...
X-original-commit: 4a879cb4a395ad5ef47384937fcc383acdb3e431
Part-of: odoo/odoo#110034
In this commit, added the list of error codes with messages, and use them when
an error message is empty. If we don't find the message from the defined error
codes then we call API to get the latest code and message.
closesodoo/odoo#110059
X-original-commit: e845e458548534acbac55bd355cdcdd295b4ae2f
Signed-off-by: Josse Colpaert <jco@odoo.com>
to solve issue: wrong display of the field "Reference" on journal entries.
closesodoo/odoo#110062
X-original-commit: 84f52ab08515336158dfa4b72a0573cf9500ce39
Signed-off-by: Josse Colpaert <jco@odoo.com>
When overriding an existing controller route, developers can
easily c/p the route definition and call super() in the overridden method
when the route attributes are automatically deducted by odoo from the parent route.
Removing those redefined attributes simplifies the routes definition,
clearly highlighting what's changed by the override.
Also reduces unexpected behavior when modifying the base route without
noticing/considering the redefined attributes in a overridden route,
which overrides the changes made to the base route when the sub-module is installed.
This commit adds a test to catch routes attributes redefinition, and clean existing routes.
closesodoo/odoo#108512
Related: odoo/enterprise#35176
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
EEU is missing KZ among the member countries, this commit fixes this omission.
closesodoo/odoo#109936
Signed-off-by: William André (wan) <wan@odoo.com>
Aim :
Allow customer from Switzerland to emit an invoice with a QR code to a SEPA customer.
Context:
In Switzerland, adding an extra page containing a QR Bill is mandatory in many cases, mainly when the customer is also from Switzerland (although there are other conditions).
However, activating the option 'QR Codes' in the settings (which is not linked to the QR Bill) can cause problem.
For instance, it will be impossible to bill a foreign customer, because we check that the conditions are right to emit a swiss QR (which is a bug).
After this commit :
The new behaviour is :
- Swiss user --> swiss customer: don't change the invoice, allow to create a QR Bill
- SEPA option activated, swiss user --> SEPA customer : join the SEPA QR to the invoice
- SEPA option activated, swiss user --> swiss customer : raise error
task-3062570
Manual fw-port of https://github.com/odoo/odoo/pull/109808closesodoo/odoo#109935
X-original-commit: a9980477048e4adffda4a71a72ff1cc8490637f9
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Improve the bank statement report by reducing the amount of
blank lines in it, as well as adding more information about
the partner and bank account when we have it.
Task id #2860753closesodoo/odoo#93162
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Following f3a3e34150, the l10n tests were failing due to the main
currency changing to a currency not available for the test provider.
closesodoo/odoo#109916
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
The function remove_domain_leaf is currently used for project burdown
chart. Due to an increasing need of such a function in multiple modules
for various functional cases, it has been decided to:
- Move this function in 'resource' that is imported in all the modules
where this function is needed.
- Implement extensive unit test to ensure that it address corner cases.
- Refactor the function to address the corner cases it was not
addressing until now.
The refactored function 'filter_domain_leaf' is used to transform a
given domain to a new domain using only the leaves that verify a given
check (more precisely, the leaves whose first element verify this check). To perform this transformation, the leaves that do not verify
this check are considered as undetermined. All the logical operators
dealing with undetermined leaves are ignored, which means:
- AND(leaf, ?) = leaf
- OR(leaf, ?) = leaf
- AND(? , ?) = ?
- OR(?, ?) = ?
- NOT(?) = ?
If the result of the operation is undetermined, it is returned as an
empty domain ([]).
closesodoo/odoo#105470
Related: odoo/enterprise#33657
Related: odoo/upgrade#4221
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- Impacted modules:
- sale_service (new module - installed only if sale
AND (project OR planning) are installed)
- sale
- sale_project
- Description: When looking for a SOL in services apps, the displayed
name is of the form "SO ref - SOL name - unit price (partner
ref/name)". The presence of some of those elements may vary:
- unit price is only displayed if it allows to clarify an
ambiguity (i.e. two SOL with identical name but different unit
price in the same SO).
- partner name is only used if the partner ref does not exist.
- partner name/ref is hidden in the name of planning slots to avoid
duplicates.
- Implementation: The behavior currently existing in sale needed to be
extended for services apps. This has been done with the following
changes:
- sale:
- sale.order.line: Current behavior for the name_get (display
partner ref) has been extended (display parnter name if has no
ref) and split a additional method that is extended in a new
module called..
- .. sale_service:
- sale.order.line: The additional behavior is extended to
display the unit price of the SOL when it avoids ambiguity. A
context parameter is used to keep this behavior inside
services apps.
task-3052812
Part-of: odoo/odoo#105470
before this commit, the documentation link was missing for shipping connectors in the sales and website settings.
after this commit, the documentation link will be shown for each connectors as it is currently displayed in the inventory settings.
closesodoo/odoo#109885
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
_* = project_timesheet_holidays
Before this commit checking validation for creating and writing
on timesheet done in create and write method which makes
customization difficult for user.
So, in this commit check validation for creating and writing on
timesheet done in separate method _check_can_create and
_check_can_write respectively for timesheet.
task-2928942
closesodoo/odoo#100943
Related: odoo/enterprise#31689
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
In this commit, the following points are covered
- using the `partner_shipping_id` field instead of `_l10n_in_get_shipping_partner` method
- form realignment in the e-waybill settings.
Part-of: odoo/odoo#109717
Currently, the e-invoice settings form view is not proper.
So in this commit, we did the form realignment in the e-invoice settings.
Also, updated the e-invoice report.
Part-of: odoo/odoo#109717
Currently, the Place of supply value is set from the partner state for all journal types.
So in this commit, we set the partner state in `Place of supply` only when
the journal type is a sale. Also added the country domain in XML view.
Part-of: odoo/odoo#109717
Steps to reproduce:
- We need to have eLearning and Survey installed.
- Then we go to Demo or any other users and we remove the access to
eLearning and we give it administrator rights to Surveys.
- We connect with Demo and we go to the survey app.
Issue:
We are getting a traceback when trying to access Survey app, because
we load the inherited view that calls for the `slide_channel_count`
field which is restricted for elearning officers only.
Solution:
Added proper access rights groups to the inherited views so we won't
try to access it without the proper rights.
opw-3059128
closesodoo/odoo#109620
X-original-commit: ee0290b90d109fd26724548d7f68c7ff2f6531e9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
The goal of this commit is to fix the problem introduced by the PR 106519.
How to reproduce the problem:
- Go to the "Email Marketing" app
- Go to the "Mailing Lists" menu
- Click on a "Mailing List"
- Click on the "Recipients" stat button
- Click on the "Import" button
Before this commit:
A dialog opens and no mailing list is selected.
After this commit:
A dialog opens and the mailing list we are in is selected.
closesodoo/odoo#106732
Related: odoo/enterprise#34453
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In this commit, we will convert all the customisations of the kanban view
consist in adding an always present button in the control panel that
performs an action/calls a model's method.
To do this, we will use the new display="always" parameter applicable
to buttons in the header of kanban views. This allows us to define a
button that is always visible in a kanban view.
Taskid: 3082390
Part-of: odoo/odoo#106732
This commit adds the possibility to define buttons that are always
present in the arch of a kanban view.
Purpose:
Several customisations of the kanban view consist in adding an always
present button in the control panel that performs an action/calls a
model's method.
We want to support this feature directly in the framework to remove
these customisations.
The task 3082303 has added the same functionality to the list view.
Solution:
Add a "display" option that lets you know when to display a button.
The different values that can be assigned to "display":
- "selection": the button is only displayed if at least one record is selected.
- "always": the button is always displayed.
The default value of "display" is "selection".
Currently, only the value "always" is implemented because it is not
possible to select a record in a kanban. The selection of a record in a
kanban view will be implemented soon, so we decided to use the same API
as in the list view.
Exemple:
<kanban>
<header>
<button name="to_do" type="object" string="Do" display="always"/>
</header>
...
</kaban>
Taskid: 3082390
Part-of: odoo/odoo#106732
Before this commit placeholder images were generated in multiple
different ways in website_slide. This commit makes use of
_get_placeholder_filename function and standardizes the way
these placeholder images are generated for website_slide.
Task-2908029
closesodoo/odoo#100587
Related: odoo/upgrade#4050
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Warn when constrains name combine with table name will be more than
63 characters.
This is to avoid case like the one fixed in #103148
Unlike index, since constrains name are defined in the code, we prefer
to avoid automatic truncate and add a warning since devs can chose
an appropriate short-enough name.
The linked fixes will just truncate the name to the max length
to match the name in existing databases. Renaming could be done in other
pull requests with upgrade scripts to avoid constrains re-computation.
Part-of: odoo/odoo#109065
Current behavior before PR:
(In the case when Multi-languages are set up for the website.)
The translation button does not work well with the e-learning fullscreen view.
It completely closes the fullscreen view and opens the edition on a blank page.
Desired behavior after PR:
To avoid this, we intercept the click on the 'translate' button and redirect to
the non-fullscreen view of this slide with the translation mode enabled.
Task-3087792
closesodoo/odoo#109815
X-original-commit: 9b5c3eb21139a60ae2374d9f7614508e31bac492
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
This module creates E-waybill in two types
1) Based on E-invoice API:
Generates the E-waybill using the Invoice Registration Number (IRN) that create by the E-invoice service
2) Direct using E-waybill API:
Generates the E-waybill using E-waybill API
X-original-commit: 2374d127792b3412e0ffe62515499d5b8f8ba434
Part-of: odoo/odoo#109390
need to filter service product from invoice for E-waybill so add this optional parameter
X-original-commit: cb01d94ab249a45ec31983573179a68284698896
Part-of: odoo/odoo#109390
Before this commit:
Selecting some text and changing its size will never allow you to select 13 and
selecting default will make the text bigger than the surrounding text.
Example in project: the default size is 13px (the editor parses that info and
display 13px as the font-size), but if you want to set any text to that value
you can't. Users could set any text to that value by selecting
"default" font-size instead of 13
After this commit:
"default" sets to "font-size: medium", which is often not correct. It should
instead, do a "font-size: inherit" so that it's the default for the current
context. Hence, removed that medium font-size rule and let the cascade do it.
Task-3095887
closesodoo/odoo#109835
X-original-commit: 9878579f62b493958bb6a98e2cdc466bfc2954d8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the string with the phone number sent to Stripe for the request is not checked and we got this error on the checkout page
---------------------
We are not able to process your payment.
Stripe: The communication with the API failed. Stripe gave us the following info about the problem: 'Invalid string: +1 555-555...5678456789; must be at most 20 characters'
-----------------------
The stripe API does not accept phone numbers with more than 20 characters
The problematic phone number are mostly the one with extention: +1 780-459-5656 ext. 725
But the customer can put anything in the phone field when he buys some product via eCommerce
Now I just limit the phone string to 20 characters, this doesn't affect the res.partner
If the customer had a phone with more than 20 characaters in the res.partner form, it will stay that way. It's only for the stripe request
closesodoo/odoo#109834
X-original-commit: d24cc320854f180989949328396dbbd8ac69bdc9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Since it's first implementation at [1], a new cursor is created to then
build a new environment after the website's `authenticate` overide with
the new `uid` of the logged in user.
Since the new visitor SQL upsert refactoring done at [2], it seems to be
introducing a SQL deadlock sometimes.
It has been detected on odoo.com while monitoring the logs. Despite
being quite rare, it still happens too often due to our heavy trafic.
Step to reproduce (among others):
- Install website_livechat
- Login as admin on 127.0.0.1
- On 127.0.0.2, load the website
- Open the livechat
- Type something in the discussion
- Directly try to login as admin
- It will load for a certain time then crash on a 502 timeout due to the
SQL deadlock
- You may need to repeat the process to actually face the bug
[1]: https://github.com/odoo/odoo/commit/6bec0e4d29e6b33b74962b2893a7a405667ef58c
[2]: https://github.com/odoo/odoo/commit/d348bed1ad9d3d16b295f013f015706be6c07820closesodoo/odoo#109830
X-original-commit: b241cf7de9329af1410b9dd45b161aa41926effb
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
before this commit, there is no form view defined for the mail.guest model and on accessing these record from Guests menu under the settings, is returning odoo generated form view.
after this commit, clean form view will be displayed on accessing the Guest menu.
closesodoo/odoo#109826
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When modifying the template of an already configured line (e.g. Customizable Desk)
and replacing it with another configurable template (e.g. Conference Chair),
the attributes chosen for the Customizable Desk were given to the server,
but no variant could be found for the Conference chair matching the given
attributes values, leading to a crash server-side. The expected configurator
wasn't opened, and the SOline was left in an incoherent/invalid state.
This commit makes sure that invalid attributes data are filtered out since
they should only be reset when the chosen template is changed on the line.
Fixes#109604closesodoo/odoo#109820
X-original-commit: 55d37baabb4ee9911a1a33daf412e42d2c9f7d6d
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Version 16.0 removed the price different account following this pull
request #99411
This decision has been made because it was only used anymore by
standard cost method and real time valuation. We thought that standard
was not a valid accounting method and we didn't want to maintain
code for it. But:
- Standard could be valid if you manualy complete the accounting entries
by yourself (e.g. employees/machines cost in mrp).
- It's also accepted as legal inventory valuation if you record the
difference between invoice and standard price + regular update of
the standard price to match the reality
- If you want to have an estimation of your cogs (benefits and loss)
during an accounting period. People just do a manual correction at
the end but they have a real time reporting on the situation.
Since delivery/receipt interim accounts already exists we could say
that user could simply reconcile them by himself. It could be but
it would be a pain to know what part of the account is already invoiced
and need a correction vs the part not yet invoiced.
It's a too big regression to be acceptable. We apologize and
reintroduce it for 16.0
This module is a fix module and will not be there anymore in 16.1
closesodoo/odoo#108513closesodoo/odoo#109814
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This reverts commit f1d8f7b43c29342aecb69f233fdd7702b4e4d913.
The previous commit shouldn't been merged to maintain the integrity
of runbot testing. It will be merge soon in the same time than the
migration script
Part-of: odoo/odoo#109814
This basically reverts [1].
After discussion with the related team, [1]'s purpose was to prevent
merging two links together if backspace was hit at the beginning of one
mega menu item. [1] however made mega menu creation impossible as it
prevented removing any mega menu item (well, you had one possibility if
you used Chrome which was to unlink the mega menu item and then remove
it via backspace but...).
After some more discussion, we decided that allowing to merge mega menu
items seems not bad (it is the same behavior as the rest of the editor
when two links are next to each other). In any case, being able to
remove default mega menu items is more important.
[1]: https://github.com/odoo/odoo/commit/9779145d9157e9687c36d2caa0ecea2862a2ac5a
opw-3109946
opw-3120070
closesodoo/odoo#109804
X-original-commit: 7de359470fb4d8eb81f018262a5e4c66a71c7043
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
VAT in New Zealand is called GST. New Zealand entities are issued IRD numbers and when registered for tax their IRD number is used as GST number.
> from: https://www.business.govt.nz/tax-and-accounting/basic-tax-types/gst
> For sole traders, your GST number will be the same as your IRD number.
> For partnerships and companies, it’s the same as your partnership or company IRD number.
GST number is legally required on all tax invoices (https://www.ird.govt.nz/gst/tax-invoices-for-gst/how-tax-invoices-for-gst-work)
I have added the VAT label as IRD/GST so that it's clear wherever else VAT label is used that the same number fits both contexts (rather than introducing a second field for identical data through NZ l10n).
closesodoo/odoo#109800
X-original-commit: 8ac78c222ae93e000a43c71ac9e359a8542f8cff
Signed-off-by: Josse Colpaert <jco@odoo.com>
When the same text appears several times inside a translated field but
nested in different HTMLs, the matching for each one is done
independently if various spacing appear in the HTML.
This commit strips the spaces around the matched texts so that texts
that are synchronized on purpose do not become desynchronized.
Doing this leads to collisions on the keys of `text2term`, it therefore
also has to replace it with a dictionary of text to list of terms.
opw-3098819
closesodoo/odoo#109798
X-original-commit: 6cec590a2dad43063d3bb747838393a8df13aa04
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Before this commit: if the number of order lines exceeds the size of the
order container, it wouldn't scroll to the newly added order line.
The solution is to scroll to the newly selected order line.
opw-3120034
closesodoo/odoo#109548
X-original-commit: bc9302b105a6e53bbfe8efc65c8a36b7a547b1d9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
At present the invoice can only be sent to the device from the form
view. The functions involved in posting the invoice expect just one
invoice.
This commit adapts the functions involved in posting the invoice in such
a way that multiple moves can be processed. In order for this to happen:
The validation check function now creates a list of errors per move, and
the error message provided lists the errors under the name of each move.
The post function has been adapted to iterate over the moves provided,
and construct the params passed to the javascript action as a list of
dictionaries, rather than a flat dictionary.
The javascript action that forwards the data to the device is adapted to
iterate over the params provided to it, instead of sending just the one
invoice.
A sever action has been added on the account move (tree view) to allow a
user to select multiple entries from the invoice tree view and send all
of them to the fiscal device.
closesodoo/odoo#109520
Task-id: 2950308
X-original-commit: 2b590e69310bdce9201ad54a1b14f22007098173
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>