- Activate:
'Track lots or serial numbers'
'Manage several Warehouses, each one composed by several stock locations'
'Advanced routing of products using rules'
- In the main warehouse, activate Pick + Ship
- In Stock Locations, create 'WH/Stock/Shelf 3' and 'WH/Stock/Shelf 4'
(1 and 2 already exist, use the same config)
- Create a new product 'Foo', activate Tracking By Lots
- On Foo, use 4 times the "Update Qty on Hand" (order is important):
Add 1 on Shelf 2, create a lot
Add 1 on Shelf 1, use the same lot
Add 3 on Shelf 4, use the same lot
Add 1 on Shelf 3, use the same lot
- Create a SO, set a partner
- Ensure that YourCompany is used as warehouse
- Add several SO lines (order is important)
a line with 1 product Foo
a second line with 1 product Foo
a third line with 4 products Foo
- Confirm the SO, you now have 2 deliveries, 1 Pick, 1 Out
- Open the Pick, all moves should be available, you should have:
4 operations:
Shelf 2, quantity 1
Shelf 4, quantity 3
Shelf 1, quantity 1
Shelf 3, quantity 1
3 moves:
A, quantity 1
B, quantity 1
C, quantity 4
- On each operation, select the lot created before and set the quantity
to be fully done
- Validate the Pick
The moves end up like this:
- Move A with qty 1: is done and linked with a quant of 1
- Move B with qty 1: is done and linked with no quant
- Move C with qty 4: is done and linked with a quant of 1, a quant of 3,
a quant of 1 (sum is 5)
In the Out picking, the move linked with the source move (B) with no
quant stays in "Waiting another move" even if the source move is done.
This outgoing move will never be available.
In the method `recompute_remaining_qty`, we loop on operations, and
match them wih the moves. However, the operation with the largest
quantity (Shelf 4, quantity 3) is processed before the move with the
highest quantity (C, quantity 4). Therefore, when we later loop on move
C, `qty_assign_cmp` is larger than zero, which sets `need_rereserve` and
ultimately triggers `rereserve_quants` in `do_transfer`.
A first part of the fix is to check for the location of the quants when
matching moves and operations. This fixes the original issue, but
inconsistencies can still arise since a quant which is taken partially.
therefore, we make sure to never take more than the quantity on the
link.
opw-1932624
closesodoo/odoo#30857
- Set a cost of 12.34 for product P
- Create manually a new analytic entry
- Choose product P
- Set desired quantity
The analytic amount is set to 12.00.
This is because `move_id` is empty, therefore `currency_id` is empty as
well and `decimal_places` is zero
opw-1924184
closesodoo/odoo#30869
Before this commit, the customer is allowed to change picking type after the
stock.picking record is moved from draft.
But it doesn't make the changes in the stock moves and operations as the
procurements are already created for initial demand.
To avoid confusing the user, it can now only be modified in draft state.
Authored by SodexisTeam
opw 1848252
opw-1934814
closesodoo/odoo#30865
Activate multi-company, deactivate the common contact book.
Create a PO P with user U1 in company A. Switch to company B.
User U2 in company A tries to send P by email.
Rendering of the template fails, because it tries to access object.create_uid,
which breaks multi-company record rules.
The signature was not working because it used user_id, a non-existing field,
instead of create_uid.
opw 1930521
closesodoo/odoo#30868
In stock.picking, in mode show detailed operation, add a product with
unique serial number tracking.
Before this commit, a warning about the qty is raised. This warning,
must be raised only if the qty is different from 1.
However this is not the case,
the warning is raised at each modification of the line.
This issue occurs since the rounding given to the float_compare is 0.0,
because self.move_id.product_id is not set.
Float_compare with a 0.0 rounding always return different, hence the bug.
Now, the warning is only raised when the qty is different from 1.
OPW-1932044
OPW-1931378
closesodoo/odoo#30651closesodoo/odoo#30851
Previously, it was only possible to make a return in
- the location the move was coming
- a return location that is child of the parent_location, actually
meaning a return location in the warehouse
This commit now allows making return in all return location, even one
located in another warehouses.
closesodoo/odoo#30836
Purpose
=======
When a lot of benefits are generated (for Odoo: ~1200 benefits/month), it can be
difficult to manage conflicts and errors.
Specification
=============
Add a filter to display only benefits with errors.
In the list view:
- sort by error,status
- show Name| benefits Type | Beginning | Duration | Status | Error
closesodoo/odoo#30339
Before this commit, the email aliases on hr.jobs did not take into
account the department.
Hence, when receiving an email for an applicant through an alias,
the object applicant was created in the wrong company
after this commit, the alias is created with the right values, and the
applicant is created in the right company and department
OPW 1920085
closesodoo/odoo#30818
Go on the crm activity view
Have your user operate in another language than en_US
Bafore this commit, the activity types were not translated
This was because the context was not passed to the function
After this commit, the terms are translated
OPW 1924232
closesodoo/odoo#30837
This is a regression from: 10f0766b3. In it the visual side was solved,
but unexpectedly the functional side still worked on unescaped content.
Thus visually a @partnèr could be seen as a link, but it was no anymore
added as follower.
Without change, modified test fails with:
mentioned partners are sent to server (expected: [1], result: [])
note: change is partial backport of 12.2 e2f20ffa9
opw-1931247
closes#30846
- Create a SO with 2 lines of the same product (set route as Drop Ship)
- At validation, both lines are merged into a single line in the PO
As a result, one SO line will be over-delivered, and the other
under-delivered.
Two lines should be kept in the PO.
opw-1928702
closesodoo/odoo#30800
The 7d85ab1eac refactor of 'ir.http' introduced changes in `web/image` that
caused the route to no longer return early (to avoid data processing steps)
in the case of redirection and that caused `binary_content` to not set the
mimetype of the `ir.attachment` when it was an URL.
This commit fixes those issues, allowing `web/image` to redirect properly.
closesodoo/odoo#30777
In a multi-company environment, the creation of a purchase requisition
fails in a company with ID != 1 because of an empty name.
This is because the sequence is created for the company with ID = 1
only.
opw-1941552
closesodoo/odoo#31153
When there are lots of lines to be considered, the rpc can come in the wrong order, causing the client to not display the wanted lines. By asking the user to hit enter or leave the input field, we reduce the number of requests and we get rid of the concurency of rpc
closesodoo/odoo#30280
The formatting of very big numbers (like
1.0045e+22) was not handled adequately by
the function 'human_number' in web.utils.
For those numbers, it seems more appropriate
to use the scientific format. The only
difference introduced here is the following.
Beyond a magnitude of e+21, we represent the
numbers by themselves but we keep the
number of decimals provided as parameter
(or zero by default) and we remove useless
zero decimals like in the other cases.
For instance, 1.0045e+22 is replaced by 1e+22
instead of 1.00e+22 if ask 2 decimals of
precision (and by 1.005e+22 for 3 decimals).
We have also fixed a small bug occuring in the
previous version of the function: the symbol
'E' was never used. So by the past the above
number would have be represented as
10045000P and, even worse, 1.01e+45 by
1.012e+28P.
closesodoo/odoo#31140
On a product page on the website, with website_sale_stock there may be
an information about the product being out of stock or not.
This information is loaded on the fly for the current variant (switching
variant will reload it) and so this should not be modified with the
editor because:
- the saved edition would appear on all product (even if those in stock)
- the saved edition is replace quickly with the real state
So if we want to change the content, there is no other way than a custom
change on JS template website_sale_stock.product_availability or
modifying translations.
opw-1936179
closes#31135
* Form would entirely mis-interpret the server's response to some
results: for unmodified o2m records the server sends a (4), which was
un-interpreted by Form, leading to the o2m record being lost entirely
(as it rebuilds the entire o2m on setting)
* on record creation, every field (except id) is considered modified not
just the fields set by default_get
* Form diverged from actual client in that it would send (1, id, {}) for
unmodified o2m records, actual client sends (4, id, False)
* datetimes should be sent stringified
* onchange should not be triggered when none of the modified fields is
flagged as an onchange trigger
* the default value for numerical fields is 0 not False
* convert m2m onchange results to (6, False, ids) instead of (6, 0, ids)
for ease of diffing with actual client's data
There are still a few odd divergences in the actual invocation of
onchange when attempted on an SO, but they look to be of low relevance
/ risk.
Note: making integer fields "required" has pretty much no effect
anymore. This is in line with (my understanding of) the client's
behaviour, but required the alteration of test models as the
specific test on required... was using an integer field.
closesodoo/odoo#31064
The commit 6d3ada1
aimed to solve problems occuring whith (single or
double) quotes when creating new custom filters.
Unfortunately, the point was missed and bugs were
still present. The present commit solves the
orginial problem satisfactorily.
There was also a problem in the management of
backslashes. Type '\\' in the search bar would
lead to a domain like
[('...', 'ilike', '\\\\\\\\\\\\\\\\')].
This has also been fixed. Note that it is
necessary to input "\\" if one is looking for a
backslash in db (as before).
A remark on the _formatAST function (py_utils.js):
We deescape only the chars `'`, `"`, and `\`
because it does not seem possible to produce a
string in the search view that would intend a
search for a line return or a tab for example.
A general remark:
Domains should always be in normalized form.
In that way they could be manipulated and combined
together without a tokenization/parsing!
closesodoo/odoo#31025
1) Configure both an incoming mail server and an outgoing one.
2) Install CRM.
3) Create a sale team, use the incoming mail address as mail alias.
4) Add a user with a valid email as follower of that team in the
chatter.
5) Enable developer mode, become super user via the developer tools.
6) Change the language of the super user to french.
7) You may want to modify the default gather/post time interval.
to receive/post email more regulary in the scheduled action.
8) Using an external mail client, send a mail to the incoming mail
address.
9) Let the two scheduled actions run by themselves.
10) The mail sent to the user has the "Lead/Opportunity" in english
wheras the rest of the email is in french.
opw-1917993
closesodoo/odoo#31034
This is a fixup of:
- original commit: 0d48056d63
Fixed the execution of no-chart tests in sale_timesheet standalone
i.e. launching odoo with `-i sale_timesheet --test-enable`
- commit 6eed6a503b omitted those fixes
This commit put them in the parent class, since it is always useful to have
sale journals
OPW 1939361
closesodoo/odoo#31119
- Set a blocking message on a product
- Buy this product from the eCommerce
A 500 error is raised.
The underlying error is a SQL constrain raised because the `name` field
of the SO line is empty.
It happens because the warning is returned too early.
opw-1934386
closesodoo/odoo#31120
Using chrome, the design was not pixel perfect (letting a white bar
appear around the switch). Replacing the linear gradient color by a
simple color fixes that particular problem. The design is still not
pixel perfect but those are meant to be replaced in master anyway.
Part of https://github.com/odoo/odoo/pull/31117
task-1941156
* web_editor
BS conflicts with our UI again: btn sizes and form controls are
more difficult to force with BS4, this commit adapts the controls to
use less problematic sizes, and adds/adapts some more forcing rules.
Part of https://github.com/odoo/odoo/pull/31117
task-1941156
The graph view displaying a line chart has had some recent changes in
b23a981320. Now it is of the full width of container but when there is
less than 4 labels (thanks to c4937132a3) the first and last labels may
be cut because they are by default aligned on the middle with its tick
(so for the first label, the half left may be missing, and the last the
half right may be missing).
With this change, we align labels as expected. This could be done in CSS
sheet (with `.nv-axisMin-x > text { text-transform: start!important; }`)
but here it is done only in the given instance.
opw-1917560
closes#31116
Commit ec35eca7c6 added the tracking on CRM description field.
However the description field changes frequently, making the tracking generate
too much (noise) messages.
Furthermore, the description field tends to be very long, cluttering the chatter
to the point of unusability.
opw 1936070
closesodoo/odoo#31112
There is an onchange on payments that, when the currency is modified,
sets the journal to the first available one whose currency matches the
selected one. However, if a journal is already set, its value is
overwritten, even if its currency matches the new one.
To replicate:
- Create two banks in EUR
- Create an internal transfer from the second bank
- Set the payment currency to EUR
When you follow the above steps, the payment journal will be incorrectly
set to the first bank.
Other possible ways to replicate the issue are:
- When editing a payment already created whose journal is correct but
whose currency is not
- When creating a payment and the journal is set before the currency
This commit fixes that issue by preventing the onchange from modifying
the journal, when it's already set.
Closesodoo/odoo#30967closesodoo/odoo#30969
Since AST was introduced to compile Qweb templates, the reset templates
functionality is not working anymore.
Actually, it does not even appear anymore as the conditions to trigger and show
the reset view behavior can't be True anymore.
Indeed, the code is still importing the old QWebException from odoo.exceptions
which is now just an empty class.
The QWebException that should now be used is the one from odoo.base.models.qweb
More than just a wrong import, the QWebException properties have completely
changed.
Since its last working version (Odoo 9.0), a lot of changes occured, mostly:
- Odoo 11.0: new model website.page, which completely changed the pages
behavior and changed the models.
- Odoo 12.0: multi-website, which introduced the Copy On Write (COW) that
redefined how we write on view in a website context. We now need to reset
copied/specific views that have no model_data_id.
This fix is for a stable version. There is some flows that can't be fixed
without a refactoring or new fields (mainly because of the arch_fs being
erased when writing on `arch`, plus we can't introduce a module reload in
stable).
The goal of this commit is to fix the basic and standard case of broken views,
which is when non-technical users are breaking the views through HTML editor.
To reset the views, we will read the original arch in the XML file, as the
dev mode is doing.
To be eligible for the reset, the broken view need an `arch_fs` set. If the
view arch has been modified anywhere else than the frontend, the `arch_fs`
will be erased and the view wont be able to be reset.
As the broken views will be specific views, we will simply read the generic
view in the XML file and write it on the specific. We can't simply remove the
specific view as we might be on a specific tree.
Specific case, in case of custom views create dropping a snippet in an oe_struc
we just delete this inehrited view to allow end user to have their page back.
In some case of bad compilation in sub template, we try to guess which inherited
view, t-called view is broken by string matching based on 'last_path_node' xpath.
Add new module test_website to add tests, it will be usefull for futur test of
install/uninstall and ...
Todo in master:
- try to track on QWebException the real template that is broken and not only
the last node from the main template.
Co-authored-by: "Romain Derie <rde@odoo.com>"
Co-authored-by: "Jérémy Kersten <jke@openerp.com>"
closesodoo/odoo#29957
Once `website` module is installed, the `save` method will always write on the
specific view or create it if it does not exist yet.
This means that actually, the generic view will never have his `arch` modified
through the `save` method.
Thus, there is no need to flag it as noupdate as we want to receive update for
that view (that might be used by other website without a specific view).
The access token is automatically generated when calling `_get_share_url` but
for the cart recovery we don't use that standard method because we need to send
the user to a specific route, so we need to generate the access token manually.
Without this fix, the user will receive the link with access_token=False which
would lead to a 404 page.
Also added a test for the cart recovery flow.
PR: #30000
Before this commit, the website selection was not working when a scheme or port
was encoded in the domain field. This was not obvious or natural for the user,
because the easiest way to fill it was to copy/paste the URL from the browser.
Now it works when scheme or port are encoded, it is even strongly recommended to
actually encode them if they don't take a default value because they will be
used when creating full URL to the website (typically when sending emails to
clients where a link back is necessary).
PR: #30000
* = base, auth_signup, mail, portal, sale, website, website_sale
Before this commit, sending an object by email would always link to web.base.url
even if the object was created from a specific website.
Now if the object has a website, we use the URL of that website if it is set.
The fallback will always be on the web.base.url.
opw-1921030
PR: #30000
The sale.order.line model has a 'display_type' field since 762adedece
that specify if the line is a dummy line used for presentation purposes.
These dummy lines are 'section' lines or 'note' lines.
If it is the case, the line does not have a product_id.
The sale_margin module overrides the create method of lines to add the margin
computation, assuming there are no dummy lines since that part of the code
is older than the new feature.
As a result the line creation would crash on a key error on dummy lines.
We now skip the margin computation if the line has a display_type.
opw 1939881
closesodoo/odoo#31035
- Generate e-invoice in xml when validating invoice
- e-invoice is sent via PEC mail and attached to the invoice
- electronic vendor bills and error/receipt messages can
be received through an IMAP incoming pec server
(configured in settings > technical)
We use the pec mail system to send invoices. We don't manage
signed invoices for B2G.
Configuration is done on the company and the receiving partners
should have the correct codice fiscale / TVA. On the taxes,
you might need to configure the exonerations.
You will need to configure the government mail address on the
company. (sdi01...) You might need to modify after the first
incoming message.
closesodoo/odoo#30845
- Set a product barcode to a 8 letters value, e.g. 'AAAAAAAA'
- Print 'Product Barcode (PDF)' (or any other report containing the
barcode)
The barcode doesn't print.
All templates assume that:
- a 13 characters barcode is EAN13
- a 8 characters barcode is EAN8
But this assumption is too restrictive: one could want to generate
barcodes with such length without following the EAN13 or EAN8 structure.
We fall back on Code128 when the barcode generation fails.
opw-1937858
closesodoo/odoo#30912