- Create a product with -4.0 Units in stock
- Set the Buy and MTO routes, assign a vendor
- Create a SO for 25 Units
- A PO of 25 Units is created => validate and receive products
- Check availability on the picking linked to the SO
Nothing is reserved, while 21 Units could be reserved.
opw-1850688
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
This sets the field country_enforce_cities readonly in order to skip inverse field's write on contact creation.
Was PR #24686. Courtesy of Carlos Lopez
The lower-level widget itself supports passing options to the underlying
datepicker library. However this is not exposed to higher-level view
declaration. With this patch, one can declare a field in a view such as:
```xml
<field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/>
```
That option would land in the widget and disable those weekdays.
Documentation has been updated accordingly.
Closes#25044.
- When receiving a S2S payment feedback from Ogone server, we call the method '_ogone_form_get_tx_from_data' which does a "pre-process" of the data to retrieve the payment.transaction linked to this payment.
It also checks the hash signature of the data to be sure it comes from Ogone.
Right after, we call "_ogone_s2s_validate" which make a HTTP call to ogone, to retrieve the data related to the transaction which were already sent by Ogone (maybe to be sure the data comes from Ogone?).
So instead of calling "_ogone_s2s_validate" we now call "_ogone_s2s_validate_tree" which processes the data from Ogone.
We are sure they come from Ogone, since they passed the hash signature when calling "_ogone_form_get_tx_from_data".
- Each time we check if a session is valid we create a new cursor.
This could lead to issues with db_maxconn that limits the number of
connections to the postgresql server.
In a perfect world, a worker should use a single connection to
postgres to process the request.
The only known side effect is that the cursor is created earlier in
the execution of the code.
- This commit fixes issues with the longpolling raising
Psycopg2.PoolError exceptions on databases with a lot of clients.
Creation date is a datetime field. However code is giving a date value.
as create date is a magic field with a default value there is actually
no need to override it.
Closes#22447.
Chatter suggests to include recipients on several objects, notably on
registrations. When a registration is done through a public interface
like website in website_event associated partner is the public user.
In that case proposing to mail the public user does not make sense.
It should propose the real email stored on the registration record.
To fix that we filter the partner if it is linked to the pubic groups.
The fix includes a sudo + context switch in a loop. As this method is
called only on a recordset of one element this has no impact on real use
case. Purpose is to keep the diff minimal.
Closes#23187 .
Before this commit some rpc was blocked and we didn't see
lost connection notifications.
Steps to reproduce:
1) Go to any form view
2) Force disconnected from the network
-> The "Connection lost" notification appears
3) Get connection back
-> The "Connection restored" notification appears
3) Close the connection again
-> No notification appears and the user aren't notify
that the internet connection is lost.
Related commit: @47cf31b53
Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and let the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
There was a difference in the tax codes Import Buiten EU (2), some had the tag
'5B Voorbelasting' and other had the tag 'Voorbelasting BTW Bis'.
Link all the codes to '5B Voorbelasting' instead.
This is more consistent with the rest.
Closes#23119
With saas-11.2's 3fbd86b some trigger towards other fields are improved
but this caused an issue when a inherited field towards a custom
computed field had no depends.
When we created a computed field x_custo on res.partner, we have a
inherited x_custo on res.users automatically created.
Both these fields have a depends computed to `('',)`, this caused an
error for the one on res.partner: but this was ignored with dd048ae7.
Since saas-11.2's 3fbd86b this also caused an error on the inherited
field but since an inherited field is not "manual" the error was not
ignored. Thus it was not possible to create custom field on a model
inheriting of another model if the fields had no depends.
opw-1854786
closes#25146
Co-authored-by: Raphael Collet <rco@odoo.com>
by moving child values to a separate method. This way, other modules can
properly add or remove fields to the report without overriding it
completely and breaking the inheritance
When updating the qty on a confirmed sale order line,
we want the system to add new procurement qty
for the cancelled procurements. That way you can
leave the cancelled procurements for what they are.
As for consumables stock levels are not that important,
it should be ok to scrap a consumable at all times,
even if the stock becomes negative.
Tests were added to check what happens with a consumable/stockable
product if stays positive/goes negative.
Purpose
=======
Currently, if we remove the salesman on the lead, the sales team will
be replace by either the sales team of the current user or the default
sales team.
That way, by removing the salesman, we loose information about the sales
team, and that way we loose information about the origin of the lead.
Specification
=============
Don't overwrite the sales team when removing the salesman on the
the lead.
Before this fix, we can create a Bom with both product_id and
product_tmpl_id filled where the product_id is not a variant of the
product_tmpl_id. This is unlogical and will be even trickier when the
user is not able to see the variant field on the BOM.
This fix puts the product_id back to False when the product_tmpl_id
is changed.
Before this commit, if a SyntaxError or any other exception occurs in a
qweb attribute, and the path to the node contains at least one
namespaced tag, e.g.:
<mynode:node xmlns:mynode="http://example.com/mynode">
<field t-att-value="'This is a TypeError' + []"/>
</mynode:node>
the following exception is raised, instead of the actual one:
lxml.etree.XPathEvalError: Undefined namespace prefix
After this commit, if the path to the failing node contains a namespaced
tag, the node is not retrieved, to avoid the above exception, So this
one will be raised:
Error to render compiling AST
TypeError: Can't convert 'list' object to str implicitly
Template: module.template_name
Path: /templates/mynode:node/field
In addition, a test case was included, to ensure this works as expected
Closes#24824
opw-1853232
We are looping twice on docs. To have a minimal diff we just try to reuse
existing variable but with loops correctly taken into account.
Closes#25008 .
Steps to reproduce the bug:
- Create a stockable product P tracked by serial number with route BUY
- Create PO with 5 P and validate the PO
- On the picking, just set one serial number and create a backorder
- Go on the backorder
Bug:
8 lines were created:
- 4 lines with one reserved quantity
- 4 lines with no reserved quantity
Now only 4 lines with one reserved quantity are created.
opw:1847714