Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged from upstream 15 221122 01 #586

Closed
wants to merge 44 commits into from

Conversation

royle-vietnam
Copy link
Collaborator

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

gawa-odoo and others added 30 commits November 15, 2022 14:43
There are specific accounts that should be used for tax groups for
each version of the CoA

t-3059059

closes odoo#105736

X-original-commit: 453cf0b
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Dropdown menus/items were refactored and moved to OWL when migrating to
15.0. Now, the focus is always on the dropdown button, which captures
and handles all keyboard events, to be able to move over the menus.
Currently-selected item is highlighted by toggling classes.

However, since the focus is always on the dropdown button, screen
reader users are  no longer able to know what menu item is being
selected, as it's only a visual change (in previous versions, the focus
actually moved to the selected element).

The above is fixed by making the activeElement follow the visual change.

Part-of: odoo#105163
Co-authored-by: Luis González <lgonzalez@vauxoo.com>
Some missing aria attributes from 14.0 are reintroduced.

They are required for screen reader users to be able to know if menus
are opened and if menuitems are checked (e.g. if a filter is applied).

closes odoo#105163

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Luis González <lgonzalez@vauxoo.com>
Pingen does not support localized country names, as such we need to force English locale.

closes odoo#105176

X-original-commit: 006dcbf
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Before this commit: when `Limited Products Loading` is enabled in
PoS settings, and `Load all remaining products in the background` is
disabled, the search bar only uses `name` to look for products to fetch
from database. This causes problem when for example the user is using
barcodes to identify products.

To fix this, the search domain should be expanded to include all of the
fields which are normally used when searching for products.

opw-3055960

closes odoo#105748

Signed-off-by: Masereel Pierre <pim@odoo.com>
Splitting the method `_get_order_lines` will allow making it
inheritable, this way more order line fields can be added and expand
them easily and avoid having to overwrite it.

closes odoo#105599

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
When returning a dropshipped and subcontracted product to an internal
location, the received quantity of the PO line will be incorrect

To reproduce the issue:
1. In Settings, enable "Storage Locations"
2. Create two storable products P_compo, P_Finished
3. Create a BoM:
    - Product: P_finished
    - Type: Subcontracting
    - Subcontractors: a subcontractor S
    - Components: 1 x P_compo
4. In Locations, edit WH/Stock:
    - Return location: True
5. Create and confirm a PO:
    - Vendor: S
    - Deliver To: Dropship
    - Drop Ship Address: a partner P
    - Products: 1 x P_finished
6. Validate the receipt
7. Create a return with 1 x P_finished:
    - Update SO/PO quantities: True
    - Return Location: WH/Stock
8. Validate the return
9. Go back to the PO

Error: The qty received is 2, it should be 1 (it should not be 0 since
the product has been returned to an internal location)

In `/purchase_stock._compute_qty_received`, there is already a code to
anticipate such a situation (i.e., a user who returns a dropshipped
product to his stock location):
https://github.com/odoo/odoo/blob/bf3c398f0644f690c64815b2b6e298aed7bedd70/addons/purchase_stock/models/purchase.py#L300-L305
However, the methods `_is_dropshipped` and `_is_dropshipped_returned` do
not include the feature subcontracting + dropshipping. This is the
reason why, in `_compute_qty_received`, the above condition is not
respected and why we add the return stock move to the received qty.

OPW-3030895

X-original-commit: 0486e2e
Part-of: odoo#105793
When returning a dropshipped and subcontracted product to the supplier
location, the received quantity of the PO line will be incorrect

To reproduce the issue:
1. Create two storable products P_compo, P_Finished
2. Create a BoM:
    - Product: P_finished
    - Type: Subcontracting
    - Subcontractors: a subcontractor S
    - Components: 1 x P_compo
3. Create and confirm a PO:
    - Vendor: S
    - Deliver To: Dropship
    - Drop Ship Address: a partner P
    - Products: 1 x P_finished
4. Validate the receipt
5. Create a return with 1 x P_finished:
    - Update SO/PO quantities: True
    - Return Location: Partner Locations/Vendors
6. Validate the return
7. Go back to the PO

Error: The qty received is 2, it should be 0

There is currently no code to handle the return of a dropshipped product

OPW-3030895

closes odoo#105793

X-original-commit: 8276a9b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
### Steps to reproduce
* install the *VAT Number Validation `(base_vat)`* and Contacts module.
* Create a new contact from San Marino and set their Tax Id to SM05426
* Save the contact

You should see that the leading zeros have been removed on the Tax Id
(here, SM05426 became SM5426)

opw-3007722

closes odoo#105822

X-original-commit: 2420791
Signed-off-by: Josse Colpaert <jco@odoo.com>
When decreasing the qty of a SOL, if there is already a packaging
defined, a return will be created for the difference

To reproduce the issue:
1. Create a product P
    - Storable
    - With one packaging PK for 10 x P
2. Create and confirm a SO
    - Order Lines:
        - 10 x P with PK
3. On the SO, decrease the quantity of P to 8

Error: a return is created for the difference. Instead, the existing
picking should be updated

At some point, we try to merge the stock moves (`10 x P` and `-2 x P`)
and, to do so, they must have the same `product_packaging_id`:
https://github.com/odoo/odoo/blob/08f53ffa30479cfb452ebaed61b42655eb0e6a95/addons/stock/models/stock_move.py#L808-L813

However, on the SO, when decreasing the quantity, an onchange tries to
find the best packaging. Because the new quantity is not a multiple of
PK, this one is not returned. As a result, the SO has no more packaging
and so does the new stock move (`-2 x P`). Therefore, the stock moves
can not be merged and a new picking (the return) is created.

This commit updates the onchange method so it behaves the same way as
purchase side:
https://github.com/odoo/odoo/blob/20fa7c6f0f5c9cdfae2519ea8d0ff849d7fa3b9e/addons/purchase/models/purchase.py#L1224-L1231
In this onchange, the same diff has recently be added for another reason
(see [1])

[1] 20fa7c6

OPW-3027110

Part-of: odoo#105430
A commit [1] has recently be added to fix an issue. It actually fixes
another issue too:
1. Create a product P
    - Storable
    - With one packaging PK for 10 x P
2. Create and confirm a PO
    - Order Lines:
        - 10 x P with PK
3. On the PO, decrease the quantity of P to 8

Without [1], a return is created for the difference. With [1], the
existing picking is correctly updated.

This commit adds a test to protect the use case.

[1] 20fa7c6

OPW-3027110

closes odoo#105430

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
In rating/controllers/main.py, the method action_submit_rating accepts
only post request. This creates a problem when you're trying to use the
web editor on the template as well as when you just paste the url in
your browser, for those are get request. The current behavior is a crash
with 'method not allowed'. This commit's purpose is to change the method
so it also accept get request. The use case of editing the feedback
rating page is arguable but it schould not crash.

The behavior after this commit is that the web editor is enable for the
page, and relaoding the page does not crash anymore.

task-3047893

closes odoo#105868

X-original-commit: d8f3c94
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce the error:
- Install 'Maintenance'
- Select 'Maintenance' -> 'Request Maintenance'
- Create a maintenance request:
          + TH1: Save > Change stage to Repaired > 'Close date' =
Date.Today()
          + TH2: Don't Save > Change stage to Repaired > Save > 'Close
date' = blank

closes odoo#105741

Problem: App will show 'Close Date' blank
Expected: App will display 'Close Date' as Date.Today()
Solution: When Click on Save button -> Automatically get current date as end date
X-original-commit: badc4ac
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Before this commit, once a user was disconnected from internet (eg.
network failure, laptop screen closed), the code disconnected the user
from the peer to peer network and upon reconnection to the internet
network, the code did not try to reconnect to the peer to peer network.

This created a network partion in the peer to peer network each time
a user disconnected and reconnected to the internet network.

When there is a partition in the peer to peer network, the last subnet
to write to the record erased the changes of another subnet without
notification.

This commit prevent the code to disconnect from the peer to peer network
when there is any disconnection signal triggered.

closes odoo#105857

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When marking a WO as done, if the serial number defined is related to an
unbuilt product, an error will be raised and the user will not be able
to mark the WO as done

To reproduce the issue:
1. Create a BoM for product P with one operation
    - P is tracked by SN
2. Produce one P with serial S
3. Unbuild it
4. Create and confirm a second MO with 1 x P
5. Start the WO
6. On tablet view, set the finished lot to S
7. Mark the WO as done

Error: a UserError is raised because "This serial number [...] has
already been produced". However, this serial number has been unbuilt so
the worker should be able to use it again

When marking the WO as done, we check the uniqueness of the defined
serial number. But:
- The check is not accurate enough, hence the above error
- The lot of the WO is a computed/inverse field based on lot of the MO
- Once the WO closed, we can still change the lot of the MO
- When marking the MO as done, a better method checks the SN uniqueness
(does not fail in the above case)

Therefore, the checking on WO side is useless. We should let the MO side
handle this.

Moreover, let's say that there is already one P in stock with serial S2.
On tablet view, if the worker set the lot to S2, there should be a
warning so he can be aware of the situation. This is already the case on
MO side:
https://github.com/odoo/odoo/blob/45e37b2ad7bdcfd9f9f7e1dabbd0a99c9a0b5cdc/addons/mrp/models/mrp_production.py#L694-L705

(This commit is linked to a similar commit OE side, same opw)

OPW-3002424

closes odoo#105860

X-original-commit: 402dfd0
Related: odoo/enterprise#33999
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
It is not possible to consume a component tracked by serial that comes
back from a scrap location

To reproduce the issue:
1. In Settings, enable "Multi Routes"
2. Create two storable products P_compo, P_finished
    - P_compo is tracked by serial number
3. Update the on-hand qty of P_compo:
    - 1 x P_compo with serial SN
4. Process a manufacturing order MO:
    - Product: P_finished
    - Compo: 1 x P_compo with SN
5. Unbuild P_finished
    - It brings SN back to stock
5. Scrap one P_compo with SN
6. Unscrap it (thanks to an internal transfer)
7. Repeat step 4

Error: a user error is raised: "The serial number SN used for component
P_compo has already been consumed"

When checking the SN uniqueness of a component, we don't consider the
case where a product came back from a srap location

OPW-3055252

closes odoo#105861

X-original-commit: ac11b7e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Steps to reproduce:
- Go to Purchase -> Reporting -> Dashboard
- click on the "expand" arrows of the pivot view
- favorites - add to dashboard

Bug:
adding a view with no actionID causes the dashboard to crash on load
this [commit] prevents adding a view with no actionID

Fix:
added a default value of False to add_to_dashboard actionId
only display the option to add_to_dashboard for views that have actionId

opw-2965036

[commit]:odoo-dev@7180d94

closes odoo#100043

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit:

- When you try to paste text beside a text which is in code formate it
  puts the new text in new line with smaller font.

- When we try to paste text in code formate in new line then it will
  give a blank space below the pasted text

After this commit:

- when you try to paste text beside a text which is in code formate it
  puts the pasted text in new line with original fontsize.

- When we paste the text in code formate in new line then it will not give
  a empty line below it,

Task-2683455

closes odoo#96763

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit:

When we try to copy paste link into another link then url of the old link does
not change and only lable change.

After this commit:

Now when we try to copy paste link into another link then the url of the link
changes with the label.

Task-2768541

closes odoo#99569

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit:

When we try to create link manually and try to press enter cursor gets stuck.

After this commit:

Now when we create link manually and press enter cursor moves to next line.

Task-2745129

closes odoo#100207

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, if the user tried to setup a required selection
field whose first value is empty, it was possible but the empty value
appeared as a 0px-height div in the DOM preview. That empty value also
shows up when trying to use the conditionally-hidden fields feature: if
another field's visibility depends on such selection field, the editor
UI was visually broken as the first choice was an empty option element.

Now, we show "<no value>" in both cases.

Note: this is not done in earlier versions than 15.0 although the
problem exists, but it was decided that the real problem was about the
visibility select being visually broken and that feature only appeared
in 15.0.

Related to opw-3003952

Part-of: odoo#105870
With [1], checkboxes in website forms were wrapped in a <div/> with the
"form-check" bootstrap class (as they should). That forgot to mark the
checkboxes themselves with the class "form-check-input". Without it they
are misaligned.

This fixes the error for newly added checkboxes in forms. Old ones will
stay "broken".

[1]: odoo@9ea276a

Related to opw-3003952

Part-of: odoo#105870
Before this commit, when submitting a website form which has invalid
radio buttons, checkboxes or file upload elements, they had no visual
difference. Now they will have red labels as intended with bootstrap.

For alone checkboxes, a warning label will appear after the checkboxes.
This will only take effects for newly added checkboxes.

Related to opw-3003952

Part-of: odoo#105870
Steps to reproduce the issue (see opw):
- Add a form to a page
- Add a checkbox
- Add a second checkbox that is required and visible only if the first
  checkbox is not checked
- Save
- Do not check anything and try to send => Good, you can't, the required
  checkbox is not set
- Check the second checkbox and try to send => Good, you can, the
  required checkbox is set
- Go back to the empty form, check the first checkbox and try to send
=> Bad, you can't but you should: the required checkbox is hidden, it
   is not supposed to be required anymore.

(Not that arguably, that two checkboxes setup should be replaced by a
required selection field but the issue of the OPW would remain as there
is another required conditionally-hidden field (a file upload) when the
second checkbox is checked.)

Conditionally-hidden fields should not require validation while they are
hidden. Indeed, their purpose is to be able to enter additional data
when some condition is fulfilled. If such a field is required, it is
only required when visible. The problem only occurred with checkboxes,
the other fields were already working in that case. Although there could
be issues with dates too, this commit added a series of FIXME and TODO
comments as well as some things need to be investigated.

opw-3003952

closes odoo#105870

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Fields `product_qty_available` and `product_virtual_available` on
stock_move are related on quantities fields of move's product_id. On
large database, those two fields will slow down every transactions that
updates stock move state (confirmation, validation, ...).

`state` on stock.move is a dependent field of computed field `qty_available` on
product.product which is dependent field of related field
`product_virtual_available` on stock move. This relation tree implies
that updating the state on one particular stock move will mark its
product (qty_available) as 'to be recomputed' and thus **every** stock
moves (product_virtual_available) of this product as to be recomputed.
On database will 100k+ stock move per product. Fetching all stock move
of some products take 90% of a manufacturing order validation time. This
is problematic knowing those two quantity fields are only used in the
stock move tree form so computed anyway at the view rendering.

This commit change the `depends` of those two related field to mark them
as to be recomputed only if the product_id change.

Opw: 3047017
Part-of: odoo#105921
`quantity_svl` and `value_svl` field on product_product are computed from all the stock_valuation_layers
As no `orderby` key is given, the `groupby` keys are used as orderby
ones. In this particular case, the groups are done on `product_id` so
the order is on the name of product_product. This order will add to the
read_group query 3 joins from stock_valuation_layer table.
  - product_product
  - product_template for the name
  - ir_translation for the translation of the name

This is completely useless in the scope of a computed field to get the
sum of values and sum of quantities. As it not possible to ask
read_group to not order the result. This commit call the method with the
simplest order key possible: `id`

closes odoo#105921

Opw: 3047017
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Sending a context when you are closing a `pos.session` will allow you to
make some validations/actions only when the closing is being done from the UI.
For example, sending values for new fields or a message that includes
something from the pos, like the Cashier ID, name, etc.

Also, it will help more when it is necessary to inherit the function in a
simpler way, to avoid having to overwrite it.

closes odoo#97864

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Steps to reproduce:
- Activate debug mode
- Go to Sales and open a quotation (actually any form view from any
  module will do)
- Start Studio
- Select the "Confirm" button (or any of the top buttons)
- Check the "Set approval rules" box
- Edit the domain by clicking the 'filter' icon next to the 'trash' icon
- Add a condition. You can just keep the default one.
- Click save to save the domain.
- Again, click on the 'filter' icon.

You should see that the domain in the text editor is malformed.
Furthermore, should you change the domain in the text editor (let's say,
change 1 to 2) and hit save, an error message will pop saying the domain
is not properly formatted.

opw-3001622

closes odoo#101758

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Steps to reproduce:
    - go to Contacts app;
    - add a reporting view (Graph, Pivot or Dashboard) (with studio for example)
    - tape any character in the search bar;
    - on "search related company for" field either use the arrow keys to go down to this and then click the right arrow key or click on the triangle to the left of this field.

Issue:
    An error occurs.

Cause:
    There is a mismatch between the parameters that are sent by the rpc call and those processed by the logic part.
    Specifically, the domain must be part of the kwargs and not the args of the params key in the rpc call.
    The problem occurs with a filter that looks like: `<field name="parent_id" domain="[('is_company', '=', True)]" operator="child_of"/>`

Solution:
    Move domain in kwargs under key named args in the params of the rpc call.

opw-3031096

closes odoo#103795

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
When the test suit is run in Chrome with zoom level different than
100%, the tests than toggle list checkboxes fail.

This is due to the lack of the "view" option in the simulated MouseClick
event. When not present, it defaults to null and the mouse coordinates
get messed up when the zoom level is not 100%.

This affects only the tests, not the actual application.

task# 3062132

closes odoo#105979

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
gawa-odoo and others added 14 commits November 18, 2022 11:24
Steps to reproduce:
 - Create two orders on a table with some products
 - Go back to the FloorScreen
 - Go back to the table and add a product
 - Go to the TicketScreen and take the other order
 - Go back to the first order and the added product won't appear

This is due to the fact that when setting an order which is different than the
current order through the TicketScreen will indirectly fetch the latest state
of the table and bypass the syncing which happens in the FloorScreen.
This is wrong as the fetching should only happens when going to a table and not
navigating between the orders of the same table.

closes odoo#105962

Signed-off-by: Masereel Pierre <pim@odoo.com>
Stpes to reproduce the bug:
- Install mrp_plm
- Enable by-product option in the mrp settings
- Create a storable product P1 with BoM:
    - Type: manufacture
    - Component: C1
    - By-product: P2
    - save
- Click on the “Structure & cost” button
- Unfold the By-Products section

Problem:
Columns of the byproducts values are placed wrong, because it lacks
two empty <td/> which should be added normally here:
https://github.com/odoo/odoo/blob/10c6f4e8379c4c9c4084dd55d4d7bf1c34524d50/addons/mrp/report/mrp_report_bom_structure.xml#L233-L235

But 'extra_column_count' has a value of 0, so no empty <td/> is added

Solution:
The `_get_extra_column_count` function should be called in the
`get_by_products` function so that the value is set to 2 instead of 0:
https://github.com/odoo/enterprise/blob/26e3c4718ac2baae61ae2c5950adb4cb2251b507/mrp_plm/report/mrp_report_bom_structure.py#L41-L42

opw-3025823

closes odoo#106001

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Current behaviour:
When we are printing a report and then the report fails to generate
(for ex. wkhtmltopdf memory limit/timeout),
the incorrect state is committed to the database.

Expected behaviour:
We should rollback when generating reports fails, since it is an error state.

Steps to reproduce:
To reproduce the behaviour, we need to force an error state.
- In odoo/addons/base/models/ir_actions_report.py:`_run_wkhtmltopdf()`,
raise an exception before spawning the subprocess (for ex. adding a 1/0).
- In addons/web/controllers/main.py:`report_download()`#L2126,
add this little code snippet:
```python
ids = [int(x) for x in docids.split(",")]
report = request.env['ir.actions.report']._get_report_from_name(reportname)
obj = request.env[report.model].browse(ids)
if getattr(obj, 'message_post'):
    obj.message_post(body='This report was committed!')
```
- Install Inventory
- Pick a delivery order and try to print it, there should be an error
(whatever exception you decided to raise in `_run_wkhtmltopdf()`)
- See that in the message board we got a message that the report has been committed,
which isn't the case, it failed to generate.

Reason for the problem:
Controllers are catching the exception when generating reports,
but never reset the state of the database.

Fix:
Raise an InternalServerError with an error code of 500 to trigger
a database rollback.

Affected versions:
- 14.0
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master

opw-3001950

closes odoo#106027

X-original-commit: d7fdcdc
Related: odoo/enterprise#34113
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Steps to reproduce:

  - Install `Expenses` module
  - Go to Settings > Technical > Email > Aliases
  - Edit the `expense` alias
  - Ensure the model is `Expense`
  - Set `Alias Contact Security` to `Everyone`, then save

  - Send an e-mail to the expense alias, using an e-mail address not
    referenced on one of the employees.

Issue:

  Error in logs related to `currency` variable.

Cause:

  Trying to create an expense for a non-existing user, therefore,
  no currency is set.

Solution:

  If no user is found, no need to create the expense and let the orm
  raise the error that a required field is not set (field employee on
  expense).

opw-3027350

closes odoo#106013

X-original-commit: a339caa
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Computing account.move.payment_state relies on this field. When
perfoming payment operations in bulk (like during an upgrade) the field
computation may become too slow.

On recent upgrade cases the abscense of this index caused delays ranging
from 5 hours to whole days in the upgrade of big DBs.

closes odoo#106028

X-original-commit: 8d0a4e5
Signed-off-by: Christophe Simonis <chs@odoo.com>
Steps to reproduce:
    - install a localization which uses the account_edi module;
    - define Lock date for the fiscal period;
    - choose an invoice which was sent before this date;
    - click on the "REQUEST EDI CANCELLATION" button.

Issue:
    We try to cancel the EDI document despite exceeding the fiscal period.

Cause:
	The verification of the fiscal period is done when clicking on the "RESET TO DRAFT" button which, in the flow, is after the request for cancellation of the EDI document.

Solution:
    Make a verification of the fiscal period when clicking on the "REQUEST EDI CANCELLATION" button.

opw-2990873

closes odoo#106073

X-original-commit: fda04e2
Signed-off-by: Josse Colpaert <jco@odoo.com>
RPC call may fail because of error in `base.automation` handler. In this case
the response contains attribute `exception_class=base_automation` to handle
error via custom dialog `BaseAutomationErrorDialog`, which provides extra
buttons (disable/edit Automated Action).

1.

`BaseAutomationErrorDialog` was incorrectly inherited from ErrorDialog, which
cannot extract traceback from `data.debug` value of jsonrpc. Fix it by replacing
it RPCErrorDialog.

RPCErrorDialog: https://github.com/odoo/odoo/blob/a75fcbe03f31fd10a74e609672b64dad165e68d7/addons/web/static/src/core/errors/error_dialogs.js#L62-L70

2.

Button `Edit Action` didn't work, because it tries the same rpc call before
navigating to the action. For example, it would repeat rpc call to create a
record, which doesn't work because of broken automated action.

It happens because form changes are saved automatically since Odoo v15.

Fix it by adding `target: "new"`.

opw-2845893

closes odoo#92344

Signed-off-by: Samuel Degueldre <sad@odoo.com>
Steps to reproduce:
1. Create a membership product for a period of time in the past,
 and one including the current day
2. Create a member, make him non-free
3. Create an invoice for the member for the past membership, cancel
 the invoice
4. Note that membership state is not updated to `cancelled` (Problem 1)
5. Change the `date_cancel` on membership.membership.line
 to a date in the past
6. Add an invoice for the current membership, note that the state is
 updated to `cancelled`
7. confirm the invoice and register payment, note that the state is
 not update to `paid` (Problem 2)

This line in `_compute_membership_state` causes the bug to appear:
```
if partner.membership_cancel and today > partner.membership_cancel:
    partner.membership_state = 'free' if partner.free_member else 'canceled'
    continue
```

To solve the issue, we remove the lines of code that made the state
to be stuck and use the membership lines only to calculate the correct
state.

opw-2978902

closes odoo#105874

X-original-commit: 6d6ff5e
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
closes odoo#106139

X-original-commit: 0ac1fd9
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
The existing code was generating misleading errors for imported Odoo
modules that could not be loaded.  Although there was a specific hack
for module 'studio_customization', imported modules were not handled
properly.  This patch adds the right condition in the SQL query in the
module that introduces imported modules.

closes odoo#106080

X-original-commit: e1cfc1f
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
When creating a record, if a value is related to a monetary field and if
the currency field is a non-stored related one, the value will not be
rounding: when writing the monetary value in the database, we first call
`convert_to_column`. In the parameter, `record` is empty (it is not yet
created) and `values` only contains the stored values (so the currency
value is not present). As a result, `currency` will not be defined and
the value will not be rounded.

OPW-2955202

closes odoo#105779

X-original-commit: 4456480
Related: odoo/enterprise#34091
Signed-off-by: Raphael Collet <rco@odoo.com>
Issue :
- Liechtenstein adapted the same QR-Invoice as Switzerland.
However, Odoo only allows the issuance of QR-Invoices to
swiss customers

https://www.llb.li/en/private/paying-and-saving/payment-services/qr-bill#:~:text=Standing%20orders%20based%20on%20orange%20payment%20slips%20can%20no%20longer%20be%20processed%20after%2030%20September%202022.%20Therefore%2C%20these%20standing%20orders%20need%20to%20be%20newly%20set%20up%20on%20the%20basis%20of%20QR%20bills.

Fix:
- Allow LI users to be issued QR-Invoices

OPW-2977644

closes odoo#106153

X-original-commit: 5ce3584
Related: odoo/enterprise#34185
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
@vietphuong97
Copy link

replace by #592

@royle-vietnam royle-vietnam deleted the merged_from_upstream_15_221122_01 branch June 2, 2023 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.