The goal of this commit is to forward port [the original commit] which
was introduced in 16.4 but, due to an error, has not been forward
ported.
Original commit message:
Since [1] when uploading images from URL the data is downloaded and then
hosted on the Odoo instance. As stated in its task (task-3129360) it
should not have been applied to document URLs.
Because of this, when hitting a CORS issue to fetch binary data, we try
to fetch the data through an `<img>` element by setting its `src` field
- which also fails when the data is not an image.
This commit makes the changes of [1] specific to image uploads and
restores the previous behavior for other files.
Steps to reproduce:
- Drop a "Text - Image" snippet.
- Double-click on the image.
- Go to the Documents tab.
- Click on "Add URL".
- Enter an example PDF URL.
E.g.: https://www.africau.edu/images/default/sample.pdf
- Click on "Add URL".
=> Fails because of a CORS issue.
[the original commit]: https://github.com/odoo/odoo/commit/238566d1dea29fd11353e7e6529d29843c4f658b
[1]: https://github.com/odoo/odoo/commit/943944dd249c15de870d6800d89e48d54a422e5a
task-3493618
closesodoo/odoo#163576
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
`extract_can_show_send_button` is a computed readonly field, providing a default value doesn't do anything.
By setting `is_in_extractable_state` to `False` by default, we can hide the ocr button.
no task, noticed while fixing a traceback in saas-17.1
closesodoo/odoo#163568
X-original-commit: d4b06d49624a1e3c5ecbb4d0c755a165cf213120
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
This commit adapts commits d4abaafa4757ace22010be49bb1f7ce1c4fbfc0d and
7a78839ca6cf45ddec7adb59051da132e0ebceb4
The commits above try to split the origin moves during a split
(backorder). The issues was the split move lost its correct origin move
and the backorder move had all the origin moves linked to it.
HOW TO REPRODUCE:
- Create product FNS (storable)
- Create subcontracted BoM for FNS
- On Operation type 'Receipt', set Show Detailed Operations = True and
Pre-fill Detailed Operations = True
- Create PO for 10 units of FNS -> Confirm
- Go to Receipt > Detailed operation > Set quantity = 1 > Validate (with
backorder)
- Repeat step above on the created backorder
OR
- Create storable product FNS tracked by serial number
- Create subcontracting BoM, with strict consumption
- Create PO for 10 units of FNS -> Confirm
- Open detailed operation, add 2 lines with SN, confirm, Validate &
create backorder
- Redo the same step with backorder receipt
OPW-3838250 OPW-3812937
closesodoo/odoo#163553
X-original-commit: db78c0bdd4a50e094f8867b58b651e06a8822a8a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
Currently, when the `invoice_date` of an invoice is updated (triggering
the recomputation of `date`) and if a system flush occurs before any
line's date is accessed, the invoice lines' dates do not get updated.
The following test illustrates this issue:
```py
move = self.init_invoice(
move_type='in_invoice',
partner=self.partner_a,
amounts=[1000.0],
)
move.invoice_date = fields.Date.from_string('2024-01-01')
self.env.flush_all()
for line in move.line_ids:
self.assertEqual(line.date, move.date) # will fail
```
Cause
-----
The `date` of a move is a computed field dependent on the move's
`invoice_date`. The `date` of a move line is a related field, pointing
to its parent move's `date` (note: related fields are computed fields).
During a flush, the system recomputes all fields that need to be. Here,
the system first processes 'account.move.date' and calls its computation
(`_compute_date`). However, the `_affect_tax_report()` call within
`_compute_date` triggers a recalculation of `account.move.line.date`,
but as this happens within `_compute_date`, the invoice lines' `date` is
recalculated using the old invoice `date`.
Fix
---
Force a recalculation of the invoice lines' dates whenever the invoice's
date is changed.
opw-3759472
opw-3875405
opw-3872006
opw-3884013
closesodoo/odoo#163530
X-original-commit: e9d955c5a52902cdac86c6285204c54876c68eac
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
When the report is updated and `groupby` is updated, we might need to
also update `user_groupby` if it was not compatible.
Followup/fix of 7d54c76aaee325449248fa698adb9e549c486ee
For instance upgrading from before to after
odoo/enterprise@d226977e19 was an issue.
closesodoo/odoo#163526
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Steps to reproduce the problem:
1. Add a many2one field to lines of a model, example: sale.order.line
2. Add it to form view of the lines with a domain
3. Click on Search more... option
4. You will see results out of the scope of the domain
In the getDomain is passed an object that has only the key
fieldName but for knew in what view is the field placed
it needs to be provided the key viewType, this both are placed
on the class object this.recordParams builded at:
https://github.com/odoo/odoo/blob/b8a5175b6c92749bd3bb7b9f869b1ecff78e133f/addons/web/static/src/legacy/js/fields/relational_fields.js#L129
If this key is not provided the viewType is beeing filled
with the element viewType, this element is the record opened placed
in the parent view, so by default if will be kanban or list. So
if the domain is filled just in the form view, the search panel
will get the domain [], so all the entries will be displayed and
they will be able to be selected.
If we see the next line:
https://github.com/odoo/odoo/blob/b8a5175b6c92749bd3bb7b9f869b1ecff78e133f/addons/web/static/src/legacy/js/fields/relational_fields.js#L431
We will see that getContext is getting this.recordParams as
argument, for the same reason that the domain should have it.
With this changes the getDomain method is getting the viewType
to take the domain instead of the viewType of the lines displayed
on the parent view.
closesodoo/odoo#163513
X-original-commit: 1eef2e8711124df9cbe7373ef6056b51f1b2617c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Previously, when receiving a new email to create a job applicant for an
existing partner, the process would inadvertently erase the phone and
mobile numbers on the partner by using the inverse method.
With this commit, the behavior is adjusted so that phone numbers are only
written in the inverse method on the partner if there is a number present on
the applicant. This prevents the inadvertent removal of phone numbers on the
partner when creating new applicants for existing partners.
Additionally, this commit ensures that phone numbers from the partner are
computed on the applicant as if they were related non-stored fields. This
avoids the need for manual re-encoding of numbers later and prevents the
inverse method from being forced again.
Furthermore, to optimize the process, email changes are now only processed
using the inverse method if the normalized version of the email is different.
This prevents unnecessary method calls on the highly used res.partner model
when the email is updated, particularly for cases where the normalized version
remains the same.
Previously, changing the partner's email from `jke@odoo.com` to
`"JKE" jke@odoo.com` would resend all waiting sign requests because the
normalized versions of the email were distinct. While ideally, this check could
be performed within the sign request code itself, this optimization now helps
prevent unnecessary overrides across all modules simultaneously.
closesodoo/odoo#163495
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Steps to reproduce the bug:
- Create a storable product “P1”.
- Update its quantity to 10.
- Create a delivery picking:
- Add the product “P1” with 10 units.
- Mark as to do.
- Scrap 1 quantity of “P1”.
- Try to validate the picking.
Problem:
A wizard asking to create a backorder is triggered. This occurs because
the move of the scrap is created, linked to the picking, and marked as
'done' (so, picked). Therefore, when validating the picking, we will
checks if all the moves are picked (Even if not picked, it will
work because we'll set them all to 'picked'). but as the first move is
not picked and the scrap one is picked, the backorder wizard is raised.
**opw-3821869**
closesodoo/odoo#163395
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
In stock, you would print multiple times the same lot label.
In this scenario, the rendering method get multiple times the same res_id as parameter.
However, the code is loosing track of those duplicated ids before all
streams are indexed by res_id.
closesodoo/odoo#163362
X-original-commit: fb92e991bb98e5945c57c157754ff0eba306b924
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
The COA should be visible, so existing db won't crash.
Indeed, it is used in the Selection field of the config settings.
As the field does not exist, the users get an error.
We instead don't let a user apply the Syscohada template to a
company that does not already have the COA.
opw-3893013
opw-3891587
opw-3891028
closesodoo/odoo#163350
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Steps to Reproduce on Runbot:
- Install MRP
- Create a second warehouse
- Go to Warehouse -> Routes -> Manufacturing.
- Set the "Supplied Warehouse" to the first warehouse.
- In Inventory > Opertaions > Replenishment
- Create a new Replenishment with Manufacturing route
- click on Replenishment information (small "i" button)
- Expected singelton traceback error.
Fix:
get_lead_time in Manufacturing expects a single rule
using _get_rule to deteermine the correct rule as the
comment sugessted
opw-3838099
closesodoo/odoo#163318
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Currently, if the product type is set to 'product' and recurring_invoice is
true, and the product has a bill of materials (BOM) with the type 'kit'
the picking was not created after the first invoice.
Producing steps:
- Create a subscription product with the type set to 'product'
- Create a BOM for that product with the BOM type set to 'kit'
- In the component, add any product with the type 'product'
- Create a sale order with the products that are created and generate an invoice
- Upon creating the next invoice for the subscription product,
the picking was not being generated.
With this commit, we are ensuring that the picking for subscription products
is now correctly created when generating an invoice.
task-3681597
closesodoo/odoo#163243
X-original-commit: ee15fc0c45f08c1fbef9d9062041ea8ff9bb0f59
Related: odoo/enterprise#61415
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Prior to this commit, it was possible to duplicate a PoS order from
the backend.
opw-3839287
closesodoo/odoo#163018
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
This commit add the logging of hash string data. By printing the string
to hash, it becomes easier to investigate issues.
opw-3839287
Part-of: odoo/odoo#163018
Since the introduction of `user_id` field, it makes sense to allow
those users to update/read/delete templates they have been assigned to.
task-3748816
closesodoo/odoo#162400
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently, when requesting time off for multiple employees, the search for the leave type correspond to the search of the current user.
Steps to reproduce:
-------------------
* Go to the **Time Off** app
* Select **Configuration** > **Time Off Type**
* Create a new time off type
* Approval: By Employee's Approver and Time Off Oficcer
* Requires allocation: Yes
* Employee Requests: Extra Days Requests Allowed
* Approval: Approved by Time Off Officer
* Notified Time off officer: Mitchell Admin
* Select **Management** > **Allocations**
* Create a new allocation
* Employees: Mitchell Admin
* Time off time: The one created previously
* Validate the allocation
* Select **Management** > **Time Off**
* create a new time off
* Employees: Any Employee A & Employee B
* Time off type:
> Observation: The new time off time is present in the name search while both employees don't have any allocation for it.
Why the fix:
------------
The name search searches for time off type with
```
['|', ['requires_allocation', '=', 'no'], '&', ['has_valid_allocation', '=', True], '&', ['max_leaves', '>', '0'], '|', ['allows_negative', '=', True], '&', ['virtual_remaining_leaves', '>', 0], ['allows_negative', '=', False]]
```
By configuration, the time off has `requires_allocation = yes` therefore it shouldn't appear here and it does not -> ok
`has_valid_allocation` has a search method `_search_valid`
https://github.com/odoo/odoo/blob/bb0cb2896236ead6b474cd1b3a685ff447716b95/addons/hr_holidays/models/hr_leave_type.py#L109-L138
`max_leaves` has a search method `_search_max_leaves`
https://github.com/odoo/odoo/blob/bb0cb2896236ead6b474cd1b3a685ff447716b95/addons/hr_holidays/models/hr_leave_type.py#L165-L192
Both use the function `_get_contextual_employee` to make their search.
https://github.com/odoo/odoo/blob/bb0cb2896236ead6b474cd1b3a685ff447716b95/addons/hr_holidays/models/hr_employee.py#L386-L388
When there are more than one employee selected on the hr leave form, the context contains `employee_id: False`. Thus here we are making the search using the current user, which is Mitchell Admin.
The search shouldn't be made using the current user in this case since he doesn't correspond to any of the employees we added of the form.
opw-3816442
closesodoo/odoo#161713
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
When bin_size=True is in the context, a computed non-attachment binary
is incorrectly saved to the database. The row is actually updated with
the size of the binary instead of the value itself.
This commit fixes the problem by avoiding setting the cache with the
bin_size value as dirty.
Moreover, the binary size is computed with `pg_size_pretty` for
non-attachment binary fields. Also, method compute_value() calls
b64decode() on the value that was previously encoded in base64 by
_compute_datas(). But _compute_datas() is specific to attachments, and
is not used in this case. Thus b64decode() doesn't make sense.
These 3 bugs are now covered by testing web_save(), where cache
consistency is required. It was first reported for this method.
Closes#156673closesodoo/odoo#160708
Signed-off-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Renaud Thiry <reth@odoo.com>
Non-attachment binary fields need to be flushed before reading their
size, since the latter relies on the database's binary size function.
Part-of: odoo/odoo#160708
After writing or creating on a related Image field, its cache contains
the full-size image instead of the resized one (according to its
attributes max_width and max_height). Fix the cache with the resized
image at the end of the inverse method.
Part-of: odoo/odoo#160708
When invoking create() or write() with a binary field, the cache of the
field was incorrect if bin_size=True was in context. Force context with
bin_size=False when putting a binary value in cache. It is particularly
important to have coherent values in the cache for `web_save`.
Also, because an environment with bin_size=False won't return the same
context cache key as one with bin_size=None, it leads to have a cache
inconstistency when we write with bin_size=False. Change Environment
method cache_key() to return the same cache key when bin_size is absent,
bin_size=None or bin_size=False.
Tests on binary fields have been updated to not rely on flush and
invalidate. We also created specific tests for write() on binary
fields.
Part-of: odoo/odoo#160708
Changing the environment in method create() to force bin_size=False
looks harmless, but it actually breaks many tests, in particular in
module account. The reason is that company_dependent fields are read at
the wrong place in the cache. And this is because `env._cache_key` can
be polluted with old data.
Make sure that `_cache_key` is cleared when resetting all the lazy
properties on the environment. Only the change in res_user.py makes it
work, but let's not tempt the devil.
Side note: I hate caches.
Part-of: odoo/odoo#160708
The issue:
Currently, in Indonesia, the regulation for tax ID is 15 digits.
But a new regulation is coming where Tax ID is now 16 digits by adding 0 in front
The fix:
Remove the first zero and leave the rest for the _run_vat_test function
Related PR: #146111
opw-3782636
closesodoo/odoo#157885
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
If you create an applicability and remove the company field,
they are never used.
An applicability like this should be valid for all companies.
We put a 0.5 value for the company field so an applicability
so it has a lesser priority than other fields.
Same idea as the distribution models.
opw-3847415
closesodoo/odoo#162152
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Since 3eb9680602, the signature of method
`_notify_by_email_prepare_rendering_context` has been changed to provide
a default values to `msg_vals` and some overrides were not adapted
(or have been added afterwards).
No true bug/issue has been found caused by that discrepancy, but for
consistency, this commit makes sure those overrides are adapted to
provide the same API as the parent method.
Fixes#162742closesodoo/odoo#163418
X-original-commit: d4b31842d6c3e1c5c86d9019a353601914ebf1f7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Currently, an error is generated when removing all product quantities from the
cart after a claiming a reward(discount).
Step to produce:
- Install a 'website_sale_loyalty' module.
- Navigate to the website / eCommerce / Loyalty / Discount & Loyalty to create
a record.
- Set the Loyalty Program name and Program Type as 'Loyalty Cards'.(Ensure it's
available on sale and the website.)
- And add 'Rewards' and set a Reward Type as 'Discount' which is applied to
on Cheapest Product.
- Go to the website shop add any product on a card, Open a cart increase the
quantity of the product, and claim the discount reward.
- Again go to Loyalty Program and open Loyalty Card, Open a record and add a
Balance(greater than 200 as default reward points are 200) and copy 'Code'.
- Again go to the website shop and apply this code to claim a discount after a
claim discount.
- Now remove all product quantity from a cart.
AttributeError: 'bool' object has no attribute 'price_unit'
The issue occurs when attempting to remove all product quantities from a cart.
At this point [1], a bool value 'False' is returned, and the system attempts to
get a value of 'price_unit' from it [2].
link [1]: https://github.com/odoo/odoo/blob/499056a82db26f7d9caa86314e666e2bd49cc79c/addons/sale_loyalty/models/sale_order.py#L187-L195
link [2]: https://github.com/odoo/odoo/blob/499056a82db26f7d9caa86314e666e2bd49cc79c/addons/sale_loyalty/models/sale_order.py#L205
This commit resolve issue, If the _cheapest_line() method returns False then
also returns False from _discountable_cheapest(), To raise an error at [3].
link [3]: https://github.com/odoo/odoo/blob/cbc40eccf576c499709f7825edad9a3b3ce7a22d/addons/sale_loyalty/models/sale_order.py#L317-L333
sentry-5119007021
closesodoo/odoo#163403
X-original-commit: dfd1aabb40d8c8e6e80f1b194a4b61e1dfb41608
Signed-off-by: Meet Gandhi (mega) <mega@odoo.com>
The issue:
when you make a payment and there is an exchange difference, since the post exchange difference is not set, it will throw a traceback
To reproduce:
- Enable 2 currencies
- Have the exchange difference journal set to NULL (empty)
- Create an invoice with a different currency than the one set for the company
- then register a payment.
The fix:
Throw a user error indicating to set the post exchange difference journal
opw-3783917
opw-3768202
closesodoo/odoo#157735
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Steps to reproduce:
[account_edi_ubl_cii]
- create an invoice and set a line with on the control character https://unicode-explorer.com/b/0000
- confirm it
- try to print it
Issue:
Ugly Stack Trace
Cause:
XML does not accept such characters
```
The characters to be escaped are the control characters #x0 to #x1F and #x7F (most of which cannot appear in XML)
[...] XML processors must accept any character in the range specified for Char:
`Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]`
source:https://www.w3.org/TR/xml/
```
opw-3773808
closesodoo/odoo#163433
X-original-commit: d06a22991cd604e46d6392f6394b2b0e6a4ae673
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit:
When creating the first invoice TicketBAI chain sequence does not exists therefore it is created, if user does not belong to Administration/Settings
group, an access error is raised and invoice is not posted. In the same time, a write operation is done in the company to set the value of the sequence
on l10n_es_tbai_chain_sequence_id field, and writing in a company only is allowed for users that belongs to Administration/Settings.
With this commit:
We make a sudo in self (res.company), no errors are raised, invoice is posted and TicketBAI XML file is created and posted to the agency.
closesodoo/odoo#163432
X-original-commit: 55bb16a6b5c44a86cf20f29c4cd705bb2403ae27
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit:
Accidentally the test case in community inherited
class from enterprise
After this commit:
We inherit the correct class which belongs to
community
closesodoo/odoo#163399
Signed-off-by: Josse Colpaert <jco@odoo.com>
The spec for electronic invoices in Colombia was updated and is now
known as Anexo 1.9. This was done in the related enterprise PR (module l10n_co_edi).
This commit introduces some changes in the base module that are needed
for the Anexo 1.9 update.
task-3639271
closesodoo/odoo#151431
Related: odoo/enterprise#55279
Signed-off-by: Josse Colpaert <jco@odoo.com>
Steps to reproduce:
- create an empty spreadsheet
- type in a cell '=ODOO.BALANCE("qsdfqsf", "02/2024")'
=> #ERROR
There's no account that match the given code.
The account.move.line domain ends up having a clause
`('account_id', 'in', [])`
The ORM detects the domain won't match anything and
early returns an empty list []
Our code expects a query object and not a list => boom
opw-3872445
closesodoo/odoo#163444
X-original-commit: 95de1332196fde7bfa5d178c6c0b7995cd892acb
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Steps to reproduce:
- in A1, type '02/2024'
- in A2, type '=ODOO.BALANCE("100", A1)'
=> the result you get come from account lines
for the day 2024/02/1 instead of the full
february month.
The value of A1 is detected as a number (first of february 2024)
When that number is given as the argument of ODOO.BALANCE,
the number falls back as being interpreted as a single day,
instead of a month period.
opw-3872445
closesodoo/odoo#163156
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This commit actually refactors the code of the accounting functions
to use `computeValueAndFormat` instead of `compute` which doesn't
receive the arguments format.
The goal is to make the actual fix in the next commit easier
to review/understant with minimal noise.
opw-3872445
Part-of: odoo/odoo#163156
Steps to reproduce:
- in A1, type '02/2024'
- in A2, type '=ODOO.BALANCE("100", A1)'
- right click on A2
- click the menu item "See record"
=> you end up with wrong records in the list view
The value of A1 is detected as a number (first of february 2024)
When that number is given as the argument of ODOO.BALANCE,
the number falls back as being interpreted as a single day,
instead of a month period.
opw-3872445
Part-of: odoo/odoo#163156
Steps:
------
1. Have accounting installed.
2. Have a bank journal with a currency different from company's currency,
use a bank account with no currency set for this bank journal.
3. Make a misc operation in the bank account used by the journal.
4. On the dashboard, the "Misc. Operations" amount will not be converted
to the journal's currency, even though the currency's symbol is correct,
the amount is in the company's currency.
Fix
---
Do not show the total amount of misc operations if the bank journal and
bank journal's bank account currencies are not matching. The user still
knows there are journal entries not linked to a bank transaction thanks
to the "misc operations" text, but we avoid doing a currency conversion
that may not make sense.
opw-3767010
closesodoo/odoo#156655
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Steps to reproduce:
-------------------
- create a product tag (eCommerce / Product Tags);
- go to a product page and open editor;
- edit the page adding a "Products" block;
- add the created product tag;
- remove it and save;
Issue:
------
No products are displayed, whereas without tags,
a default product set should be displayed.
Cause:
------
At first, when we don't have a tag, the domain determined
for the search is `[]`, which returns a list of products.
When we add the tag, a domain will be built with the products
linked to this tag: `['all_product_tag_ids, 'in', []]`
(in the case of the use case above, there will be none).
The attribute `data-product-tag-ids="[]"` is added to
the dynamic snippet section.
Then, when we remove it, we will get the same domain:
because the string `"[]"` is valid for the condition
that checks whether `productTagIds` exists.
As a result, it will no longer be possible to obtain
the default set for this block.
Solution:
---------
Try to reduce the domain to a list in all cases and compare its length.
If it is empty, the domain must be an empty domain.
opw-3859482
closesodoo/odoo#163324
X-original-commit: c18ab6acf63885401a3e702f912622369197bdf7
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Steps to Reproduce
------------------
1. Install `sale_management` and `account_edi`.
2. Create a user with admin access in sales but no rights in accounting.
3. Log in as the new user.
4. Navigate to a Sales Order that has been invoiced and attempt to view
its invoice via the 'Invoices' stat button.
Expected Behavior: The user should be able to view the invoice.
Actual Behavior: An access error is encountered when attempting to view
the invoice.
Cause
-----
The access error arises due to restricted permissions for
`account.edi.format` and `account.edi.document`. Prior to commit
604a47ead8, all users had access to these
models. However, this commit restricted access solely to users with the
`account.group_account_readonly` role, as part of a broader security
enhancement to minimize unnecessary access by portal users.
opw-3858685
closesodoo/odoo#163412
X-original-commit: 3be00fa01ed400c2bd7b4fda49871fd14869a48d
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
*: web, web_editor
Follow-up of [1] (see its own explanation for details).
This is about fixing the remaining code. In the future, we will probably
go even further:
- No more wrapwrap element at all
- No support of a main scroll which is not left up to the browser (see
some more details about that in [2] which explains the many problems
which occurred when the scroll was on the wrapwrap element).
Those final points have yet to be confirmed though.
All in all, this PR should not change any behavior in the standard
stable versions. But it will fix bugs in some custo trying to change the
page scrolling behavior, while unifying the versions codebases.
[1]: https://github.com/odoo/odoo/commit/ffc19547c8da2ef7fee8e2ac743ab99a607dcf90
[2]: https://github.com/odoo/odoo/pull/98429closesodoo/odoo#163393
X-original-commit: 10df96564fcadd6acde52adf8bf1da32990f3dcf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: website_mass_mailing
Before this commit, when a "Form" snippet was added and the action was
changed to "Subscribe to Newsletter", the mailing lists appeared as
checkbox fields with the number of subscribers in parentheses. This
commit removes the display of this unnecessary information.
Steps to reproduce:
- Install the "Email Marketing" module and Website.
- Navigate to the Website in edit mode.
- Drag & drop the "Form" block (dynamic content section).
- Change the form action by setting the "Action" option to "Subscribe to
Newsletter".
Bug: The number of subscribers appears next to the mailing list names.
task-3472820
closesodoo/odoo#163336
X-original-commit: a060a1981074a83b77b28f70b49127ecb6f4f550
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Adrien Milis <miad@odoo.com>
The test_sudo_commands fails when testing portal user without demo data.
With this commit, a portal user is created in a setupClass.
closesodoo/odoo#163319
Build-error: 55927
X-original-commit: 83c2201543d4d37b2d8e760200c5b111e1d74fa1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This traceback arises when the user tries to remove the start date
Steps to produce
1. Install 'resource'
2. Open 'Settings/Technical/resource/Resource Time Off'
3. Create a new record and remove start date
AttributeError
'bool' object has no attribute 'tzinfo'
when the user tries to remove the start date, an error will be
produced because _compute_date_to seems to be computing the date_to
based on the date_from field. when removing the date_from from calculations
on empty or none
which leads to traceback from here
https://github.com/odoo/odoo/blob/322e7ea19b7c069fdb92d3b86e5615c55489ca21/addons/resource/models/resource_calendar_leaves.py#L54-L59
This commit solves the above issue by computing `date_to` for records that have
`date_from`. Apart from that, this commit also removes `# -*- coding: utf-8 -*-`
from the first line of the modified file.
sentry-4983497879
closesodoo/odoo#163311
X-original-commit: 5032a8ffed10bfbd619c85a266092f129716ceca
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Use an ir.config_parameters to set the period for the stock quantity report to
ease customization.
closesodoo/odoo#163266
X-original-commit: 86da6978bd683c4b67f7303138a3037af5c48328
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
Current behavior:
If you make a sale of a product that use a taxe not included in the
price. Then go in order analysis in PoS, the total price of the product
will not include the taxes.
Steps to reproduce:
- Create a tax of 15% that is not included in price
- Create a product with 10$ price and add this tax to it. (Total price
including tax should be 11.5$)
- Sell it in the PoS and close the session
- Go in PoS > Reporting > Order. Open the pivot view and check the total
price for the product
- The total is 10$ instad of 11.5$
opw-3817535
closesodoo/odoo#163239
X-original-commit: 42fd6a65c8910bff587b6bc55d49e1bafb165487
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
The `test_update_workcenter_adapt_finish_date` test was not consistent
when the db was installed without demo data. The test was failing
because the working hours were not the same and so the duration was
different. To fix this we adjust the starting time of the work order
so that it last exactly 30 minutes, and is not impacted by the working
hours.
runbot error : https://runbot.odoo.com/web#id=61595&cids=1&menu_id=405&action=573&model=runbot.build.error&view_type=formclosesodoo/odoo#163238
X-original-commit: 5c49fc02f3fae0594b68d94bd8e9308bdbd21363
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Steps to reporduce:
1- Install Accounting, Fleet modules
2- Create a bill in accounting with a different currency than the company's default, and add a line with a chosen vehicle_id.
3- Go to the chosen vehicle in Fleet module
4- Navigate to the service created for this bill
Current behavior before PR:
If we create a bill for a vehicle using a different currency than
the company's default. The fleet service that will be created
will be having the company's currency but the value will be the amount
in the currency used in the bill
Desired behavior after PR is merged:
We now create the fleet service using the value in debit
not the unit price or the price subtotal.
opw-3734743
closesodoo/odoo#163228
X-original-commit: 0ef2abaa3e926daa71e004e0583503b7e3167a59
Related: odoo/enterprise#61408
Signed-off-by: Youssef Bashandy (yoba) <yoba@odoo.com>
Some options have been renammed a long time ago but there was no
mechanism to warn the user should those option be still present in its
configuration file.
Odoo versions up to Odoo 14 (excluded) used `osv_memory_time_limit` and
`geoip_database` in their configuration, those two options have been
renamed to `transient_age_limit` and `geoip_city_db` in 14.0 ab4000f and
saas-16.1 c59750d824 but no deprecation warning / automatic failover
were provided.
closesodoo/odoo#163193
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>