- Create a product named 'toto'
- Perform a call to `name_search`:
`self.env['product.product'].name_search('pouet', [], 'not ilike')`
Product 'toto' doesn't show up in the result list.
The domain should take into account that `default_code` can be `False`.
Note: the bug also occurs if the product is called 'trululu'.
opw-1837957
Remove behaviour introduced by [1], if there's a price difference the
price difference account will be used. This code block did not take into
account the fact that out move have a negative price unit, resulting in
inverted debit/credit. Furthermore, there's no special case for return
of standard and fifo.
[1] 1df16a189e
opw-1828196
- Set a default value for the field 'Activity Type'
- Schedule an activity
The default value doesn't appear.
The default value is taken into account, but the onchange override the
value.
opw-1838066
This commit adds the auto-creation journal for installed acquirers.
This is not easy because:
- The acquirers are created on the 'payment' module but are enabled only when the specific module
is installed. E.g. Paypal is enabled with 'payment_paypal'.
- To create a journal, a chart of accounts is required. However, the post_init_hook on the
'account' module makes the installation order harder. E.g install payment_paypal directly:
The module are installed in the order: account -> payment -> payment_paypal -> l10n_generic_coa.
To fix the problem, the journals are created at two moments:
- During the installation of the chart of accounts.
- At the installation of an acquirer module. E.g. payment_paypal.
Was PR #23904
Was task: 1831620
Steps to reproduce the bug:
- Create a stockable product P
- Create PO and confirm it
- Cancel the PO
- Reset the PO to Draft and reconfirm it
- Validate shipment order
Bug:
- The "Receive product" button is still displayed but every shipment orders of the
PO have been treated.
NB: The field is_shipped is only used to display the button "Received product".
opw:1838539
It was possible to change manually the company of an asset, although its category would be belonging to another company and thus its depreciation lines and journal items also.
To tackle this problem, we set the company_id field of an asset as related to its category
Was PR #23498. Courtesy of Miquel Raïch
When in Python 3, then function `open` defaults to open the file in text mode
with and the encoding (if not passed) is taken from
`locale.getpreferredencoding`.
Using `getpreferredencoding` is not necessarily a good practice. Because
files might no be encoded that way.
When testing Odoo not in runbot (which has LANG set to C.UTF-8) you may get:
Traceback (most recent call last):
File "/home/gitlab-runner/src/odoo11/addons/web/tests/test_js.py", line 24, in test_check_suite
self._check_only_call('web.qunit_suite')
File "/home/gitlab-runner/src/odoo11/addons/web/tests/test_js.py", line 37, in _check_only_call
if RE_ONLY.search(fp.read()):
File "/home/gitlab-runner/virtualenvs/odoo11-MlnlRiTaP2/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4757: ordinal not in range(128)
The proposed solution is to read the file in binary mode, and decode to
unicode/str ourselves using utf-8. We don't use the encoding argument of
`open`, so that the code works in both Python 3 and Python 2.
PR #24434
Before this, the progressbar values were not updated (both count and progress)
after archiving all the records of a column.
Multiple things have been done here to update it.
Firstly, a optimization had been done to avoid reloading the progressbar when
updating a column ; this optimization was not correct due to this precise use
case. This will update the progressbar.
Secondly, the `aggregateValues` are reset when putting empty groups back in the
datapoint. This attribute is used to compute the counter if a `sum_field` is set
on the progressbar widget. It needs to be reset because the loop that computes
it won't iterate on empty groups.
Eventually, the mockRPC of the progressbar route was not taking the `group_by`
argument into account (probably a typo).
Use case fixed: manual reconciliation through the account.move.line list of items with several currencies, that will create a full reconcilation with several exchange rate entries to balance the amounts in all foreign currencies. Unreconciling these lines was wrongly creating an account.move with a lot of lines with debit = credit = amount_currency = 0.
Usecase to reproduce:
- Create a product A with a qty on hand 5.5
- Create a delivery order with an initial demand of 5.5
- Validate it with a qty equals to 5.95
The initial demand is updated to 5.951 then reduced to 5.95
and a backorder is created with an initial demand of 0.001.
That should not happen since I process extra quantities.
It python 5.95 - 5.5 = 0.4500000000000002 and the float_compare
use a round UP method thus it returns 0.451 and the following
flow is based on a wrong value.
In this case a float compare is used before the float round, so an
HALF-UP rounding should be okay since a very small quantity diff should
be filter by the compare.
Fixes#24401
- Company currency in EUR
- Create 2 rates for USD:
1.0 on 2018-01-01
0.5 on 2018-02-01
- Create an invoice on 2018-01-02 of 111 USD
- Register a payment on 2018-02-02 of 111 USD
- Unreconcile the payment
An error occurs: 'You are trying to reconcile some entries that are
already reconciled!'
In this specific case where the rate decreases, the exchange rate entry
is reconciled with the payment, so we need to keep the payment entries.
When a scrapped move is part of an open picking, it was not possible to
unreserve the picking. A scrapped move is done and scrapped ; this
combination should be allowed.
opw-1835186
- Create the following reconciliation model:
Line 1 is 50% of amount, tax is 20%
Line 2 is 50% of amount, tax is 0%
- Use this reconciliation model to reconcile an amount of 1000.
4 lines are created:
- 2 lines for base amount (500)
- 1 line for the 20% tax (100)
- 1 line for the 0% tax (1000)
Obviously, the last line is incorrect, and should be 0.
opw-1837049
The calculation of the delivery cost for a sale order / invoice was not correct when
free over a limit had been satisfied.
Steps to reproduce the bug:
- Set a delivery method DM with a fixed price = 10.0 and free when the amount of the order exceeds 100
- Create a SO for an amount of 150 and set on it DM
- Confirm the SO and deliver it
Bug:
A SO line with DM was created with a fixed price of 10.0 instead of 0.0
opw:1838070
When doing several grouping quickly (or if the system is slow) on the
pivot view, we may try to display data that now doesn't corresponds to
the current selected groupBys.
This commit ensures that when we load data of the pivot view, we drop
the previous data loading that are currently being carried out.
Without the fix, the added test failed with:
TypeError: Cannot read property 'length' of undefined
because the test does:
- select one level of group by
- select two levels of group by
- resolve the first level of group by
- resolve the second level of group by
Without the fix, we would try to display the data for one level of group
by when the pivot view had two levels selected.
With the fix, displaying the first level of group by was discarded once
a second one was being requested.
opw-1825892
closes#24396
If the user has limited_access, download_security field was not read due to the
override of check_field_access_rights and so the field not set.
When you try to access/read it, you got: Selection is not iterable.
Now we check in sudo the download_security.
We also add the **kw that should be present in all routes.
Avoid: "slide_download() got an unexpected keyword argument 'debug'"
We also remove this controller from the sitemap.
Use case fixed: manual reconciliation through the account.move.line list of items with several currencies, that will create a full reconcilation with several exchange rate entries to balance the amounts in all foreign currencies. Unreconciling these lines was wrongly creating an account.move with a lot of lines with debit = credit = amount_currency = 0.
When a user creates a new column in a kanban view, leave the action and
comes back, the order is not preserved. With this commit, we force a
call to resequence to ensure that the order does not change.
The initial rev. odoo/odoo@2d3ecf2 that was supposed to handle this use case
was in fact only dealing with one command as default value for nested x2m, not
more.
The basic model can now handle multiple commands.
Closes#24241
The css generates all the attributes separately and not in simplified form.
In order to have a better compatibility we simplify the css tags.
e.g. border-left-style: none; border-bottom-s .... will be simplified in border-style = none
We convert the link.btn into a table to have a good rendering in outlook, and revert the
change when the user edit the content.
- Stripe needs to have the amount in integer, so we have to multiply by 100 the amount.
Which sometimes create float representation errors and remove/add ~1 cent on some transactions (i.e 72.60€)
- Stripe needs to have the amount in integer, so we have to multiply by 100 the amount.
Which sometimes create float representation errors and remove/add ~1 cent on some transactions (i.e 72.60€)
When you pay multiple invoice with one payment, you need the write
permission on account.journal, this had been solved when registering a
payment for one invoice in 91ca84644
In this commit, the same logic is applied on account.register.payments
opw-1835888
opw-1834343
closes#24369
Steps to reproduce:
- Go to the Contact
- Create a new contact with an email address with an ascii character
Bug:
A traceback was raised.
Closes#19852
opw:1837714
In 41ffb503 the "Invoice Notification Email" and "Sale Order
Notification Email" were modified so the company used was the one of
the object if available or the sender otherwise.
This had not been done for the "Purchase Order Notification Email" which
was added in saas-14 which might be unexpected.
Also as in 7a03f9ce9 specify the company when displaying the logo.
opw-1838112
closes#24344
ConnectionError is raised when there is no internet connection
if case of timeout a ConnectTimeout or ReadTimeout is raised.
It was not catched.
requests.exceptions.Timeout catches both
- Create a user A with group `group_sale_salesman` but no Accounting &
Finance group set
- Create and validate a SO, create the invoice
- With another user B, pay the invoice
- Print the "Invoices" with A
An access error occurs.
The error is due to user A not having the rights to see the payments.
We set a group on the corresponding report to avoid a user without
proper rights to print it.
opw-1837845
Since 11.0, reports could not be edited at all anymore. This is due to
the fact the editor files were refactored but the report feature is not
correctly organized since it was merged with the 'web' app. Indeed, the
'web' app is still calling files and assets of the 'web_editor' app which
is not a dependency (but it is working as 'web_editor' is auto-installed
with 'web').
opw-1826599
opw-1834971
Closes https://github.com/odoo/odoo/issues/24034
The editor is performing text selection check when clicking on the
window. However, when clicking outside the iframe an editor is running
in, a crash may occur as the editor was trying to check a range outside
of its environment (the iframe).
Related to opw-1837818
Since new-api migration of `ir.ui.view`, the method that check views
raises exceptions instead of returning a boolean. Show them as warning.
Related to #14521
- Create a simple module, set version to 2.0
- Import the zip file
The 'Latest Version' (field `installed_version`) is set to 11.0.1.0,
while one would expect 11.0.2.0.
There are several reasons for this. First, the method
`get_values_from_terp` doesn't return the version, so at this point the
information is already lost. Then, the field `installed_version` is a
computed field which retrieves the version from the `__manifest__.py`
file. In the case of an imported module, there is no such file in which
we can look up for the value (even though the imported module contained
one).
To avoid this, we explicitly set the 'Installed Version' (field
`latest_version`) to the version retrieved at import. Since this field
refers to the version installed in the database, it makes sense to use
it this way. Moreover, in the case of imported modules, we use the value
of `latest_version` for `installed_version`.
Fixes#23988
opw-1833522
Steps to reproduce the bug:
- Set a multi company environment with two company A and B
- Set user admin in company A
- Set user demo in company B
- Create a PO with user demo
- Send a RFQ
Bug:
The company of the admin user was displayed in the footer of the email.
The function _notify called on res.parter model is called in sudo by
the function _notify on mail.message model.
The function render_template on mail.template model uses the user defined
on self.env to render the template. So the user admin was always used.
opw:1835647