An issue occurs in the following use case:
- Enable "Bring goods to output location before shipping (Pick + Ship)"
- Create a SO with 2 lines. 2 Deliveries are created, Pack and Ship.
- Go to "Procurement Exceptions", and cancel one of the 2 lines
- Go to the OUTgoing shipping, "Force Availability", and "Validate"
An error occurs: "Cannot unreserve a done move". The system tries to
unreserve a move which is actually cancelled.
Actually, it should not be necessary to unreserve this move, since no
quants were actually reserved in a first place. The fix ensures that, in
this situation, we don't try to unreserve a move with no quant reserved.
This should be safe to do it in all cases, but better be safe by adding
the condition `if 'no_state_change' in context` to impact only this
specific use case.
opw-685650
Before rendering the radio button, the radio button must be unchecked
to ensure to take the last value checked.
Step to reproduce:
-From main menu, click on 'Contacts'
-Click on 'Create'
-Select 'Company' value on company_type field
-Save or not the contact
-Return in the main contact view (click on breadcrumbs)
-Click on 'Create'
Bug:
The default value on company_type field is 'Company'
but the fields that should be hidden are visible (example : parent_id field)
After the fix:
The value of company_type field is 'individual'
opw:684847
An issue occurs in the following use case:
- Create an automated action
- Choose a Related Document Model
- Select records to filter (click on "Select Records")
- Do not save, but cancel instead
- Create an automated action once again
The filter domain keeps the same value than previously, forcing the user
to refresh the page to get rid of it.
opw-683214
The db_name parameter passed in command-line (-d) or in configuration file,
supports a list of database names separated by commas, in order to
preload them. The WorkerCron processes will also respect this list and only
connect to the specified database(s).
As of Odoo 9 the server also automatically initializes a new database
if the one passed via `db_name` does not exist or is not initialized.
This code did not properly handle multiple comma-separated value,
and created an unitialized database named `a,b` when db_name was set
to `a,b`.
Fixes#13079Closes#13094
At the bottom of each blog post there is a link to the next blog post
of the blog. If the current blog post is the last, the next blog post
which appears is the first one, which is ok. However, if there is only
one blog post in the blog, when viewing it, the next blog post which
was proposed was the current one (now nothing is proposed as next blog
post anymore).
Use copysign to take into account the sign of the base amount which includes the sign
of the quantity and the sign of the price_unit
Amount is the fixed price for the tax, it can be negative
Base amount included the sign of the quantity and the sign of the unit price and when
a product is returned, it can be done either by changing the sign of quantity or by changing the
sign of the price unit.
When the price unit is equal to 0, the sign of the quantity is absorbed in base_amount then
a "else" case is needed.
opw:684459
This test is ran in the backend and, if we do not mark it as post
install, the dependencies of the web module are not installed.
The webclient will then errors like "View type 'kanban' is not present
in the view registry".
The _constaints definition is done at server load, not when a user is triggering
the check. The constrains are already translated, no need to try translating it
again.
In the dashboard view, it's possible to use the "Group By" feature.
However, when clicking on a link on any dashboard, a traceback might
show up.
This is because the context key `group_by` is kept when clicking on an
action. If the destination view is a list/kanban, and the destination
model doesn't have the field, the system will try to make a grouping by
a field which doesn't exist.
The solution is to remove the `group_by` key from the context, since it
doesn't make sense to send it the the destination model.
opw-684568
A traceback can occur since we build labels for 6 periods but we get
data for 7 periods.
This reverts commit 48fa0a5f6c and fix the
unreachable condition.
Steps to reproduce:
- Enable advanced routes on the Warehouse config
- Set the route "Pick+Pack+Ship" on the YourCompany Warehouse
- Set the route "Pick+Pack+Ship" to be selectable on the SO-Line
- Create a SO with the SO-Lines containing this routes, confirm, 3
pickings are created
- Force the availability of the Picking to the customer, transfer.
The Picking is set to draft, a backorder is created containing all
products which should have been transferred. It is not possible to
transfer this newly backorder neither, the same thing happens on the
backorder.
When rereserving while doing the transfer, it should not change the
state of the move as it would forget when availability was forced.
opw-683740
/!\ This is a backport from saas-10
When duplicating a question in the FAQ Roller snippet, the cloned
question was opening the original answer instead of its own answer.
_get_asset_method returns None as it sets a value on a recordset. What we do
here is simply copying the computation directly in the default get to have a
correct value instead of None. This has probably been introduced when
migrating the module at the new API at commit 6120babb45.
The sidebar on the left of the quotation previews was placed with
position fixed in a col-md-3. Position fixed elements have their
width computed according to the window dimensions which is why it
cannot be 100% to fit the col-md-3. To achieve that, the old solution
was to set the width in pixel according to the viewport dimension (and
the size a col-md-3 has in each of this dimension). This was too easily
breakable. Indeed in the avantgarde theme, the .container is set to
smaller dimensions. So the col-md-3 is smaller too and then the fixed
width sidebar overflows.
To achieve the desired behaviour, javascript is needed. In CSS, the
position is set to "relative" and the width to "100%" so that the
sidebar fits the col-md-3 width no matter what. Then on page load and
on window resize, the sidebar is set to position "fixed" and to a
px-based width which equals its current and default 100%-width.
Without this fix, it is possible to confirm a PO which is not in state
'draft' and 'sent'. The issue is that it will create a picking at every
call.
The issue was occurring in Purchase Requisition, which was fixed in
previous commit. However, it makes sense to add a check directly in the
`button_confirm` method.
opw-684347
When gevent is enabled, some arguments are stripped to avodi being retriggered
in the other workers (e.g. update of a module).
The `--i18n-overwrite` was not stripped and the other worker raised an error has
the `overwrite_existing_translations` argument requires the `update` argument
(which is stripped in the `stripped_sys_argv` method.
Fixes#12566Closes#12986
This tries to be the smallest patch possible in order to avoid triggering
another display issues, so we only patch in the ms-hight-contrast section
which only applies on ie 10/11.
* The view-manager weren't displayed correctly; they didn't fit 100% of
the screen width. This is fixed by explicitely seting the top, right,
left, bottom attributes.
* The modals content were not displayed. This was due to 2 issues:
* The rule that we patch in the first point set the position of
`oe-view-manager` as absolute with an importang flag. Because of
this important, the rule that reset the position of the
`oe-view-manager` as static in modals.less was not honored. So
we also patch this rule with an important flag inside the same
file (so that all the fixes related to ie10/11 are in the same
place).
* Now that the modals are displayed, they do not fit 100% of the
screen. It's because the `max-height: 100%` of `.modal-content`
set in modals.less does not work in ie10/11, due to some bug
with the flex displays. We set the height to 450px so that the
modals are kind of correctly displayed on a 1366x768 screen
(their content are still scrollable).
related to rev 1ccd87a037closes#12929
The field symbol is not required on a res.currency (it should and will be
changed in master). In case it is not set, do not display the currency in the
rapport.
Fixes#11346
Change default definitions of funds clearing accounts to be assets
instead of liquidity. Without this fix, reconciling to these
accounts during bank reconciliation is not generating the correct
journal, but is treating the process as a matching step (which it
is not).
For existing data, the accounts will need to be manually changed
from liquidity to current assets.
Closes#12996
The price of the delivery is incorrectly converted to the currency of
the user in the payment template (next to "Total").
Instead, it should be in the currency of the sales order.
opw-682306
Steps to reproduce:
-Create a first journal with a sequence
-Create a second journal with the same sequence
-Create a first SO, create the invoice for the fist journal and validate it
-Create a second SO, create the invoice for the second journal and validate it (the second invoice has the exact same name as the first one)
-Refund the second invoice (linked to the second SO)
-Go to the first SO => In the invoice button, you see 2 linked invoices (there is normally only one)
When searching the refunds corresponding to the invoices in function
_get_invoiced, the refund must take the journal of the invoice into account.
opw:684144
If you create a picking, with an owner, for qty x, and confirm it.
Next transfer x+1, it will raise a traceback 'cannot adapt res.partner'
Now, we pass the id, and not the browse record.
This commit closes#12978
In case of event not all day, the timezone has an impact.
So if we search for date >= 2016-01-31 (00:00:00) and that the current timezone
is +5, we should search for date >= 2016-01-30 19:00:00.
date_to_str will drop the time.
This commit closes#12878
This commit closes#12971