This commit changes the url formatting of the `services.navigate` in
the attachment viewer. Before this commit, the resulting URL was
erroneous which prevented download and lead to a 404 error.
part of task-2171884
closesodoo/odoo#60003
X-original-commit: b11535bb26ad9a1fd96ec616201eb67c89597cdc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Problem
-------
_search_is_mail_thread_sms is looking for ir.model
in the database and then fetch them from the registry
without verification. This can lead to key error
when a model is present in the database but not in
the python anymore. This situation can happen
after a migration.
Solution
--------
Check the model is present in the registry
closesodoo/odoo#60001
X-original-commit: 448626d86a1f06b9f8a7a88111f7cb01600488cd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Do not set a default `account_id` for section and note lines. Indeed,
when set the constraint `check_non_accountable_fields_null` will raise.
fine-tuning of c22f99dd09
opw-2357415
opw-2355559
opw-2359283
closesodoo/odoo#59988
X-original-commit: b6791a5183ef1015b47312785501a99ed68e5718
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Consider move uom different from serial product uom
to set up move lines with product uom
closesodoo/odoo#59986
X-original-commit: ee966998fa986936a0407676bb4d54f61c7fce1f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Before this commit it was possible to activate the overlay of the
arrows of the gallery snippet (with themes because of animation
options)
task-2312878
closesodoo/odoo#59973
X-original-commit: 81a00e3469f93cb4686c92db5695316db92eb84c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, Button to Send Sample reminder was always visible which doesn't makes sense as It would work on saved record only.
Now Button will be hidden on unsaved record.
Fixes#58744closesodoo/odoo#59972
X-original-commit: 3cb26da782042ee391777ed15bcca4eef4a10677
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
- Activate debug mode
- Go to Settings > Translations > Languages
- Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
- Go to a POS session
- Select a Product, edit the price with a decimal via the Numpad widget
The decimal is not taken into account.
This is due to the fact that the entered input ('.') is not considered as the decimal point
in this language (i.e. ',') and is skipped.
The same issue happens for quantity and discount.
The dot in the Numpad widget has been replaced by the decimal separator of the language.
Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
an error if its parameter is not a string or if the parsed result is not a number.
opw-2357848
closesodoo/odoo#59971
X-original-commit: a1543d2a283000e2955df5f8131bae5e25e110c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Since a refactoring of the handling of the color system and the way the text
muted is handled, the text-muted isn't visible on the full-screen mode of a
course. That is becuase text-muted is based on the font color set for the body,
which in this case is quite similar to the background of left panel in
full-screen course content.
This commit fixes the issue by using `text-600` class that is suited for this
scenario (the background color is fixed here irrespective of the color-palette,
and so should be muted text-color) instead of `text-muted` for the left panel
of full-screen course content.
taskId - 2346013
closes#59390closesodoo/odoo#59970
X-original-commit: 7f7f9c6c9165fc6697e90ed6616466d9684e28f2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the bug:
- Set the timezone of the user to Australia/Melbourne
- Set the country of the company to Australia
- Set the time of the system to 20:00 UTC
- Have Project and Sales installed
- Enable Timesheet and Timesheet Timer on project (A)
- Create a task in project (A)
- Click Start and then Stop
- Confirm the wizard
Bug:
The date of the new timesheet line is set to yesterday.
opw:2351204
Original PR: odoo/enterprise#14023closesodoo/odoo#59966
X-original-commit: b85a5fc39887660992b5dd0f49ca331e38dd6030
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
TLDR: after installation accounting app, invoices paid online get status "In Payment" until
reconciliation; this commit allows to download digital content without waiting
reconciliation which may take days or week
Steps:
* Install Accounting app
* Install website_sale_digital
* Create Digital product (Product Type: Service + use Digital Files smart button
to upload a file)
* Setup payment acquirer (e.g. Paypal)
* Buy digital product online and pay
* Open the Sale Order in Portal
Before:
* No "Downloads" button near to product name
After
* User can download files after purchasing
Notes
* In Odoo 13.0 it worked via "post_at" option, which is removed in Odoo 14. See
https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074:
> - Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
> With invoicing, the payment will do that so the "in_payment" state should never be shown up.
> With accounting, only the statement lines have the power to move an invoice to the "paid" state.
---
opw-2353064
closesodoo/odoo#59959
X-original-commit: 103abd3284cea1723adc0e4b90e57961a4fac2a0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Previously, dimensionless SVGs (SVGs with no intrinsic width or height)
were rendered with a width of 0 in the media-dialog on firefox. This is
caused by the fact that firefox reports a naturalWidth and naturalHeight
of 0 for dimensionless images, which we were relying on to compute the
image's aspect ratio. See:
https://github.com/whatwg/html/issues/3510#issuecomment-369982529
for more details on the way browsers handle dimensionless images.
This commit fixes that by giving the image a width, letting the browser
render the image, and reading the height of the rendered image to
compute the aspect ratio in the cases where the naturalHeight of the
image is 0.
task-2345120
closesodoo/odoo#59958
X-original-commit: 616c78e00e6d2760e1cf3425fc7247792f2ceb61
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Problem
-------
Sales people can have restriction on partner they can see
Private addresses, multi company, ....
When they convert a lead to opportunity, it's currently possible
that the wizard will find and link a partner that the current user
cannot see.
Solution
--------
Field that are now computed store field, that were previously
normal field with onchange, should not be computed as sudo
to respect the record rule
closesodoo/odoo#59957
X-original-commit: 182fa38d7f28a92e7171c4ee3a42c8f73217b765
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit fix the "Unsupported M2M command 1" raised `Form` helper.
The `onchange()` method will in fact emit UPDATE command for many2many
fields when the value submitted an the one in database has changed
(this is the case for example for nested m2m in form views)
OPW-2044631
closesodoo/odoo#59943
X-original-commit: 76bd8208a416cefab6becff9f2d7204c7d196201
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Xavier ALT <xavieralt@users.noreply.github.com>
Made the website_id non mandatory on website snippet filters and adapted
the fetching route so that it interprets an unspecified website_id as
the filter being available on any website.
Before this commit website snippet filters had to be limited to one
single website.
After this commit website snippet filters can be made available on all
websites by setting their website_id to no value (this is the new
default of the pre-defined filters).
https://github.com/odoo/odoo/pull/59831
task-2355369
closesodoo/odoo#59831
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Steps:
* Create a delivery method (1) restricted to Spain (any country would do)
* Create a delivery method (2) restricted to Madagascar (same)
* Create a partner, main company, whose country is Spain and the default
delivery method is the first one.
* Create a delivery address for that customer with Madagascar as country and the
default delivery method as the second one.
* Now place a new quotation with such partner and set the delivery address to
the one of Madagascar (multiple addresses setting must be on).
Before:
* The delivery method for the quotation is set to the one restricted to Spain
although we're sending it to Madagascar.
After:
* The delivery method for the quotation is set to the one restricted to
Madagascar.
---
opw-2348336
closesodoo/odoo#59890
X-original-commit: 535d429960a0347d01c528c2440c2b8e9ff2fb51
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Revert commit
"[FIX] base: clearer message in case of conflict for no_gap sequences"
This commit changed the error returned in case of SQL conflict for no_gap
sequences, wrongly disabling the automatic retry (service/model.py) in case
of such errors.
Also adds a comment in the dedicated test to ensure the behavior is explained
and the automatic retry isn't broken once again by the same kind of change.
closesodoo/odoo#59928
X-original-commit: 811cd40fe427c28f9eb244f78ae23c4d3fb42cc8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- The Adyen sync cron didn't call the function to sync terminals
- Do not specify the merchantAccount when creating a store, the proxy
will add it itself.
closesodoo/odoo#59868
X-original-commit: d5b456a1f75320c8fdf1e989afad91fc74ec9ef3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
When select a BOM in the field, now we only search by the finished
product name. In this commit, we will also match the reference of the
BOM.
Task 2326786
PR #57945
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Since the editor panel is placed on the right, the content was not
possible to scroll when in a iframe, like for mass mailing. This was
because of some strange code introduced with [1]. As the problem the
mentioned commit says fixing is still fixed without that code, I see
no reason to keep this... especially since it may introduce difference
between readonly and editmode content.
[1]: https://github.com/odoo/odoo/commit/f9bf408a827fa86323bc2d1891cb5173b4781e7bclosesodoo/odoo#59927
X-original-commit: 58ade8c0e17be14fb5bf9cef592c9b9225d21b6d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The assignment of a binary field on a new record with origin did
actually modify the attachment storing the value of the field on the
origin record! The fix is simply to avoid messing up with attachments
when updating new records.
closesodoo/odoo#59919
X-original-commit: 6778c4c10fa68c46bde6fae176f547f905e9c02f
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Upon onchange, the web client sends unchanged image fields on one2many
lines as "bin size" values, while changed image fields are sent as their
full value. As the value is not base64-encoded, the assignment of that
value crashes.
Fix it by making assignment on new records not crash when decoding the
image: the value is simply not assigned to the field. In the situation
described above, the record being assigned is a new record with a real
record as origin. Because the field is actually not assigned, its value
is implicitly the value of the field on the origin record, which is
consistent with the fact that the field was not modified in the form.
X-original-commit: 4442d6f0f29a2bf6e992515cd535c88215855a36
On safari with apple device in belgium timezone, this code:
```
x = new Date(2020, 2, 28, 2)
x.setDate(29)
```
returns:
> Sat Mar 28 2020 02:00:00 GMT+0100 (CET)
> Sun Mar 29 2020 01:00:00 GMT+0100 (CET)
This is not consistent with any other combination of OS and browser
tested, where this code would return eg. for chrome on macOS:
> Sat Mar 28 2020 02:00:00 GMT+0100 (Central European Standard Time)
> Sun Mar 29 2020 03:00:00 GMT+0200 (Central European Summer Time)
In most instance, this is not an issue, but for country with midnight as
Daylight Saving Time (DST) change, this is an issue, because the Tempus
Dominus calendar widget will have a duplicated day which might eg. make
a month totally not usable.
This issue can eg. be reproduced in Lebanon timezone at this address:
https://tempusdominus.github.io/bootstrap-4/Usage/
Going to the month of April 2020, an error happen because to get the
first day of the week of 1st April, we do:
```
this._viewDate.clone().startOf('M').startOf('w').startOf('d');
// .startOf('M') => Apr 01 00:00:00
// .startOf('w') => Mar 28 23:00:00 (safari bug)
// .startOf('d') => Mar 28 00:00:00
```
which gives us the wrong day (28 instead of 29) which causes an error.
Other report of the issue:
- https://www.donedone.com/timezone-specific-browser-specific-datetime-bug-2014/
- https://github.com/date-fns/date-fns : issue 571
- https://forum.mobiscroll.com/t/issue-with-invalid-dates-range-script/108
opw-2271482
closes#59786closesodoo/odoo#59908
X-original-commit: 112267d62544c56acfdcef96727c32c314c15f16
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit fix the fw port https://github.com/odoo/odoo/pull/58149
which does not work in all scenario
Create a sale order
Put an optional product with long description (no line break)
Save and confirm
Log in the portal with the receiving user, add the optional product to
the order.
The customer can't see the quantity of the optional product.
The number is not showing in the quantity adjustment widet.
opw-2350879
closesodoo/odoo#59801
X-original-commit: 9a91fe7d6064475bc949a5c2aee883ea2f419930
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit e10fd34682 introduced batched reference fields name_gets
across groups but was also buggy as follows:
Have a grouped list view showing at least 2 groups
Have a reference field with different values showed in the list for each record
Before this commit, the name_get of those reference fiels were fetched only for the last group
After this commit, the name_get are fetched in a batched fashion (by model) for each group
and display correctly
closesodoo/odoo#59910
X-original-commit: bbb608a1eff638040f0fc7b951fedf1579cc15b2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Issue
- Install "Elearning" module
- Activate "Drive" credidentials in settings
- Go to any course and edit it.
- In "Content" tab, click on "Add Content"
- Select `Video` as 'Type'
- Copy/Paste the Google Drive video link in "Document URL" field
- Wait for other field to be computed then "Save & Close"
- Save the course
- Go to the website to watch this new content
Youtube error message
Cause
'mime_type' field is readonly. When saving the course (slide.channel),
the slide is not saved yet, and therefore drop the 'mime_type' value.
When generating the `embed url`, it verify if a mime_type is set: if not,
it will generate an iframe with youtube.com as domain, else,
a drive.google.com domain.
Solution
Add `force_save="1"` on `mime_type` field.
opw-2294344
closesodoo/odoo#59917
X-original-commit: 987b9bf408cf5ba2deded7e2015caa6faeb65a87
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
The goal of this commit is to prevent the theme install/update
loader from inheriting the opacity property from container by
setting a background-color with level of transparency.
task-2312878
closesodoo/odoo#59887
X-original-commit: 1e7424579ba7b59c9bc7a4972b10403610f720cb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The problem here is before this changes, the fiscal position only take into account if them has "auto_apply" True, and for the cases that the partner has their property fiscal position configurate for a company this is not taking into account.
After this changes we evaluate for the property fiscal position for the partner and then if non result we seek a fiscal position with the auto apply and the responsability of afip.
So this the same as the original method do.
closesodoo/odoo#59875
X-original-commit: 5ddcad3cb1d6063b7be89e4f0bd35b89885f746b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Make sure to assign a value to the computed fields
`mobile_blacklisted` and `phone_blacklisted`
in their compute method for all record included in `self`
Otherwise, not assigning a value for one record included
in `self` can result in a cache missing error.
```
Traceback (most recent call last):
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 143, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 212, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 238, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3001, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3021, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5620, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 980, in __get__
raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
ValueError: Compute method failed to assign crm.lead(974,).phone_blacklisted
```
closesodoo/odoo#59870
X-original-commit: 55d7b9d3304f75aa2089c32c4a907066da4dc4b8
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
To investigate a bit. Sometimes a few extra queries are generated.
Task ID-2359847
closesodoo/odoo#59869
X-original-commit: 36bb56a5e9704c76e84960ec84588524b52406f8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To reproduce the issue before this fix:
1. Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other
2. Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%
3. Create invoice B, account_id = Tax B, unit_price = 1000, Valide invoice,
4. Register a payment of 600 for invoice B (so, that's half the invoice, when including the taxes). The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.
5. Create a mis operation MISC TVA, like this:
line 1 : account_id = ACC TAX A, credit = 100
line 2 : account_id = 401100, debit = 100
6. Reconcile the following move lines:
line of MISC A with account ACC TAX A (100)
line of MISC TVA with account ACC TAX A (100)
==> The lines should be fully reconciled
To solve that without breaking the fix made here https://github.com/odoo/odoo/commit/c43acc34b873dc70cf792675fe1d58d8b0e116b1 , we rely on the tax_exigible field of account move lines. When all the reconcile lines are exigible, it means we're not reconciling the transition line of a cash basis entry, and so we can directly full reconcile.
Fixes https://github.com/odoo/odoo/issues/58996
OPW 2350494
X-original-commit: b8ab3c78ff9354091f5154bb03a716c32a609de2
Issue
- Install "Point of Sale"
- Enable "Qr Code" in Invoicing
- Open new POS session
- Set random customer
- Try to send the invoice by email
Cause
The 'qr_code_urls' doesnt exist in the dictionary.
Solution
Add 'qr_code_urls' with all generated qr code urls to the dictionary in report.point_of_sale.report_invoice
EDIT:
use `_get_report_values` function of report.account.report_invoice instead of generate all qr code urls
opw-2357088
closesodoo/odoo#59847
X-original-commit: 4bc17f78f46ac2c9bc0bc97bc1a29b3da3f26563
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the menu direction of header dropdowns was
related to the window width but it was wrong because of the right
panel. We also enable it in editor mode.
task-2312878
closesodoo/odoo#59846
X-original-commit: ced500e9bcbb5c84033463689d135ad4c7dc4f39
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
We want to send the digest tips 2 hours after the database creation.
It can not be done directly on the digest itself because its field
is a date and not a datetime.
So we change the "Next Run Date" of the digest to now, and we run
the digest CRON 2 hours after its creation.
LINKS
Task 2351561
Internal odoo/internal/pull/1051
closesodoo/odoo#59844
X-original-commit: d2e3c03f89c6c62dc06e05f5fe06104205245e20
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Issue
- Install `Manufacture` and `Purchase`
- Go to `Manufacture`
- Enable Studio
- Create new rules
- Select `Purchase Order` model
- Try to select autocomplete proposition with `Deliver to` field
Traceback raised.
Cause
The _search function does not return indexable value.
Solution
Cast _search to a list.
PS: search can be used (instead of _search) to get iterable value.
opw-2357391
closesodoo/odoo#59832
X-original-commit: 8af2dbb06723213163ee3ad617e5c9309099b4bc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Steps to reproduce the bug:
- Enable Multi-Currencies and Multi-Companies
- Create a vendor bill
- Remove the default journal
- Set an other currencies
Bug:
A traceback was raised
opw:2350490
closesodoo/odoo#59546
X-original-commit: d9f8efcc330bc7454411aad3546de663424724f7
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
When a product is set on a line and we change product with the product
configurator wizard, we will use the attributes values of the previous
product.
But then since the attributes are the ones of wrong product, not
attribute is selected and if eg. we have radio button with one option
and custom value, it will never be selectable (because the radio button
is hidden and unselected).
In this commit, we do not use the current variant values when we change
product in the product configurator wizard.
note: this commit also increases the limit of (custom values) inside the
product configurator wizard, for an arbitrary 10000 limit. Without this
change, each opening of the wizard would only keep 40 customs values and
discard the other ones.
opw-2333091
closes#59016closesodoo/odoo#59803
X-original-commit: e9c54f6b3d5c36b658308e1900ab68dcc9de0357
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
While individual addons paths are normalised, module and resource
paths are not.
As a result, when symlinking modules into directories on the
addons path, the path of test modules is only half-normalized: it's
normalised up to the addon path (which likely did not need it in that
setup) but not above that.
This is an issue when using `--test-file`, because that path is fully
normalised, and so the path of the provided test file and that of the
corresponding test module will not match, leading to the tests
unexpectedly not getting run.
Normalize the test module's path before the comparison, using the same
routing used for --test-file.
closesodoo/odoo#59822
X-original-commit: 536809662e542994451be793cd09e87adbf31776
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Because the barcode app bypasses the detailed operations for receipts
(with default settings set), an error was being thrown when doing "put
in pack" when a carrier is set (saving during the delivery package
wizard) because the picking move lines are incorrectly selected. This
commit adds in a check for when the wizard is accessed via the barcode
app so that the error does not occur and the same behavior as when no
carrier is assigned is followed.
Related Enterprise PR: odoo/enterprise#9808closesodoo/odoo#59792
Task: 2039720
X-original-commit: 945b5f6791ae890498ef9a34828eaf91dc1457e2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit
- If Google Calendar and Outlook Calendar are installed, there are two
'Calendar' tabs displayed on the user form view which is confusing
and they both share very similar fields.
- Also, in calendar the 'Sync with Google' and 'Sync with Microsoft'
buttons were not having the same size.
After Commit :
- Now only one 'Calendar tab is there which contains two groups, one
for 'Google Calendar' and one for 'Office 365 Calendar'.
- Top margin is added on 'Reset Account' button for both Google and
Microsoft groups for better UI.
- In calendar, 'Sync with Google' and 'Sync with Microsoft' buttons are
having the same size.
Note - The scss files are not much needed anymore and thus were removed.
Also to avoid a bridge module just for the sake of empty container,
we add it in calendar itself.
Task Id-2323205
PR #56551
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Current ordering is Access Rights - Oauth - Preferences. However we think
that preferences has an higher priority than Oauth. We therefore switch
both tabs so that Preferences is displayed before Oauth.
Task Id-2323205
PR #56551