When the statusbar is clicked, a `debounce` function prevents a
doucle-click, and therefore making several `write` calls. On some status
bars, clicking doesn't work anymore.
The reason is because, in some mysterious cases, the event is propagated
to the parent. The `currentTarget` is not the `li` element, but the
parent `ul`. By setting the `immediate` argument to `true` (execute the
first function instead of the last), this solves the issue.
When removing the "Save as Attachment Prefix" field
of the Invoice report (`account.report_invoice`),
it was no longer possible to reset the invoice to draft
opw-687130
Since 85bcd6fdd8, the field `paypal_account`
has been removed. The field `paypal_url` cannot be computed correctly
anymore.
This reverts commit 2ab68047c1.
As you open the lots in a raw material move in a production order,
you should not see the temporary stock move lots from the work order.
Also the quantity_done should not take into account those. They will
when they press 'Done' on the workorder.
When posting inventory, the temporary stock move lots on the workorder,
should be transferred to the split move.
For splitting and unreserving, some optimizations are done.
Since 85bcd6fdd8, the field `paypal_account`
has been removed. The field `paypal_url` cannot be computed correctly
anymore. Convert it to a dummy field.
When a database is created, we are not auto-logged in to the new
database anymore because the login passed to the authentication request
is 'admin' instead of the one set in the creation form.
To fix this issue, we used the login parameter from the creation form
in the authentication request. We also set the login field to
required in the create database form view.
This bug comes from rev https://github.com/odoo/odoo/commit/903733a32
When anglo-saxon accounting is enabled and the valuation of a product is
'real_time', rounding errors might occur in the price difference between
the invoice price and the product price. It occurs when the product
price precision is larger than the accounting precision.
To avoid these rounding errors, we calculate the difference as the
difference between the price before update and the price after update.
opw-686730
- Activate the option "Track Lots or Serial Numbers".
- Set the outgoing process as 3-step one.
- Create a stockable product for which the tracking is "By Unique Serial
Number".
- Go to Sales > Sales > Sales Orders.
- Create a Quotation for the created product and confirm it. A picking
is generated but it is waiting availability.
- You are sure to have this product in stock so you force the
availability and assign the serial number (001) you want to transfer
in the operation lot details.
- Validate the picking. By doing this, it creates a negative quant in
the origin location (WH/Stock) and it creates a positive quant in the
destination location (WH/Packing Zone). The two quants are linked to
each other.
- Go to Inventory > Inventory Control > Inventory Adjustments.
- Create an inventory in WH/Stock for all products and set it in
progress.
- You want to correct the negative quantity you have so set the real
quantity of product B to 0.
- Validate the inventory and you get the following warning: "The serial
number 001 is already in stock.Otherwise make sure the right
stock/owner is set".
We should allow a quantity larger than 1.0 temporary, so it allows the
system to reconcile the quants.
opw-685825
category was changed to "Website" so it'd appear under the website
category in the store, but it needs to be "Theme" otherwise it doesn't
appear in the "Choose your theme" menu after installing website.
background and color snippet options
The background and color snippet options communicate so that if a
color is set while a background is already set, the backgrond is
removed. The problem is that the event propagation was not stop
so if a snippet had a background and one of its child set a color,
the background was removed.
Since 5a9e1af64 our guess_mimetype accepted a `default` named argument.
This commit fix the use of library used instead of our implementation, so
we don't get an error from an unexpected argument when having python-magic
installed on a given server.
Since python-magic functions always return a default mimetype:
- empty content: application/x-empty
- text content: text/plain
- binary content: application/octet-stream
the guess_mimetype default argument is not used with python-magic
implementations.
closes#13343
opw-687354
When an owner is defined on a quant, the current behavior is to to allow
only the owner to use it. This is restrictive for internal transfers:
when a quant is owned by Partner A, only a picking with owner Partner A
can select it.
The fix is to make things a bit less restrictive: when a quant is owned
by Partner A, a picking without owner or with Partner A as owner can
select it.
opw-687207
2 rules were defined with the same id thus only one was loaded in
database, resulting in missing read access on model
'project.task.history.cumulative'.
This patch fixes the ids of these rules and clarify their names
In the new API, default calls are supposed to return recordset
(even empty recordset), not bool values for relationnal fields.
If the table for this model was already present and if no l10n_x
was installed, no default value could be computed correctly for
existing entries. This caused a crash on install.
opw-683470
When we were trying to delete a stage in project where there were
some tasks, an error was raised because of the 'project.task.history.cumulative'
records that inherit 'project.task.history' which have a compute method on
on end_date.
To fix this, we set the 'compute' attribute to 'None' and the readonly
'attribute' to 'True'.
If you create an issue when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.
Also, the stage_id was not correctly cleared if you remove the project.
If you create an issue directly, the key `default_project_id` is not set
in the context. This key is used to compute the default stage of the
created issue. It is done by creating a domain. Unfortunately, the
domain is always filled with `[('fold', '=', False)]` and thus it
always returns a result that makes no sense when `default_project_id`
is not set. Worse, if you actually create the issue, the found stage
that was not in your project is now a part of it.
The fix is to return no result if the `default_project_id` is not set
in the context.
If you create a task when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.
Also, the stage_id was not correctly cleared if you remove the project.
If you create a task directly, the key `default_project_id` is not set
in the context. This key is used to compute the default stage of the
created task. It is done by creating a domain. Unfortunately, the
domain is always filled with `[('fold', '=', False)]` and thus it
always returns a result that makes no sense when `default_project_id`
is not set. Worse, if you actually create the task, the found stage
that was not in your project is now a part of it.
The fix is to return no result if the `default_project_id` is not set
in the context.
When the routing of the phantom bom is the same as the parent BoM,
the phantom BoM should not recreate the work orders, but use the same
work orders as the parent BoM. That way, you can create one master
routing and the "consumed in operation" of the phantom bom can be used
linking to the master routing.
If the phantom bom has no routing or the same, it can also use
the "consumed in operation" of his parent bom line if none is defined.
[FIX] website_project: override get_access_action to redirect to my/tasks,projects
[FIX] project_issue: Don't send notif template to portal customers if no website
[FIX] website_project: Portal users can receive notif template
[FIX] sale: Don't display 'View quotation' button on email if no website
If the website module is not installed, the button 'View Quotation' will lead to the backend chatter page, which is not very useful in our case.
As the quotation is already attached in the mail as a pdf, just don't display the button if the website module is not installed
[FIX] account,sale: Don't send notif template to portal customers if no website
[FIX] account: Don't display 'View Invoice' button on email if no website
If the website module is not installed, the button 'View Invoice' will lead to the backend chatter page, which is not very useful in our case.
As the invoice is already attached in the mail as a pdf, just don't display the button if the website module is not installed
[FIX] website_sale: override get_access_action to redirect to my/invoices
Currently as no portal backend view exists anymore, the method 'get_access_action' will return a url to the backend.
For example, if you have only sale installed (with portal_sale in auto install mode), you'll get access rights to sales orders in read mode in backend. The correct way to handle this is to return an access error and give the access rights to these documents only in website_portal_sale is installed, i.e. when the portal view is accessible in frontend under my/orders/ controller.
Before this commit, the focus point the user can move on the image in
the background position configuration dialog was only following the
mouse as we want if the image original width was larger than the dialog
one. This is because the javascript relies on the fact the image takes
100% width of its container. To fix this, the container now does not
take 100% of modal width but the size of its internal image (with a
max-width of 100%).
It might happen that a price is strike through in the shopping cart
although it has the same value than the discounted price. This can be
due to differences in decimals smaller than 0.01.
The fix is to apply the same logic than in other places: strike through
if the difference is larger than 0.1.
opw-685109
This is needed to avoid the scheduler to stop suddenly as the scheduler
takes a bunch of moves to reserve without looking if all moves of
a picking are taken. That way, it is possible that a certain key
is not there in this dictionary and the solution is to simply
filter them out.
Closes#13286
In some snippets, the parent hierarchy has many elements. So, when
selecting a deep child of one of those, the customize dropdown had
many dropdown headers showing the parent hierarchy but without any
option for many of them.
Commit de0d9fd666 already fixed the case
where the dropdown only contains dropdown headers. This commit is an
adaptation to hide these headers one by one.
In psql, use LIMIT and OFFSET together without a fully specified and uniq sort order
will generate unexpected behaviour.
Eg:
> id id_dept name
> -------------------
> 1 1 Tom
> 2 1 Mike
> 3 2 Meggie
> 4 2 Marge
> 5 3 Bart
> 6 3 Lisa
> using LIMITed selects like:
> SELECT * FROM employee ORDER BY id_dept LIMIT 3
> SELECT * FROM employee ORDER BY id_dept LIMIT 3 OFFSET 3
> SELECT * FROM employee ORDER BY id_dept LIMIT 3 OFFSET 6
> You can have some result missings from the 3 requests, and others duplicated.
> Because id_dept is not a uniq order.
opw-686639
note: backport of saas-12 4dce8616