Commit Graph
164380 Commits
Author SHA1 Message Date
FrancoisGe e3da5f1b7d [REF] *: convert legacy dialogs
The goal of this commit is to convert a bunch of legacy dialogs into owl dialogs.

closes odoo/odoo#131278

Task-id: 3453920
Related: odoo/enterprise#45484
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-16 16:05:12 +02:00
Mohit Beniwal a2b41824df [FIX] l10n_es_edi_facturae: handle ZeroDivisionError when discount value is 100
This traceback raises when user tries to 'Send & Print' the invoice of sale
order having a discount of 100%.

Steps to reproduce:
1) Install "l10n_es_edi_facturae" & "sale_management" and switch to "ES Company".
2) Open "Sales" >  "Configuration" > "Settings" and click on
   "Discounts" checkbox > "Save" button to activate it.
3) Now click on "Orders" > "Quotations" button and then "New" button .
4) Select any "Customer" and in "Order Lines" select a "product" with
  "Invoicing Policy" as 'Ordered quantities' (ex. 'Chair floor protection').
5) Now, in that 'Sale order line' enter the value of 'Disc.%' as '100' .
6) Click on "Confirm" button and then "Create Invoice" button.
7) In "Create Invoice" Wizard, select "Regular Invoice" if not >
  "Create Draft Invoice" button.
8) In "Customer Invoice", click on "Confirm" button > "Send & Print" button.
9) In "Configure your document layout" wizard, click on "Save" > "Send & Print".

Error: ZeroDivisionError: float division by zero, is generated from
"_l10n_es_edi_facturae_inv_lines_to_items"  method.

See: https://github.com/odoo/odoo/blob/b5c19d368339f9d2b7af6e61e88a918d6ba318ee/addons/l10n_es_edi_facturae/models/account_move.py#L195

It gets the value of "line.discount" as 100, so the overall value of
"(1 - line.discount / 100.0)" becomes Zero and it tries to  divide
"line.price_subtotal" by 'Zero', that's why this error is coming.

sentry-4325625223

closes odoo/odoo#131029

X-original-commit: 363e679601920f1a5a1fd6e1021521dae2a76714
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Mohit Beniwal (mobe) <mobe@odoo.com>
2023-08-16 16:05:06 +02:00
SaddemAmine 0b3d9a0360 [REF] account, l10n_{bo,lv}: remove 'none' figure_type
This commit removes the 'none' figure_type from the account_tax_report
because it is redundant since other figure_types have been added.
Especially 'string' which practically does the same thing.

task ID: 3434197

closes odoo/odoo#130166

Related: odoo/enterprise#44833
Related: odoo/upgrade#5010
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-08-16 16:04:51 +02:00
Alvaro Fuentes f7cd412725 [FIX] core: fix remove constraints at uninstall
This patch aims to fix multiple issues with the removal of table
constraints at module uninstall.

1. We cannot remove `ir.model.constraint` records before calling
   `_module_data_uninstall` on them. Otherwise we either won't find them
   when performing the search
   `self.env['ir.model.constraint'].search([('module', 'in',
   modules.ids)]` or, if we somehow keep the ids and use `browse`
   instead, would get an error because `_module_data_uninstall` tries to
   access field values of records already removed. Note, although not an
   issue, the removal is redundant for non FK constraints since
   `_model_data_uninstall` already unlinks the record.
2. When a constraint has a name longer than 63 characters (Postgres
   default) we would fail the check for the existence of the constraint
   since the names are truncated.
3. When checking for the presence of a constraint we assumed its type
   would be `u` in `pg_constraint` because for us that means non FK
   (i.e. not `f` type). That's incorrect since there are many more
   types. Here we propose to handle `c,u,x` types.

For bullet 2 we use `tools.make_identifier` that hashes the name and
ensures it fits in the 63 chars limit.

Revert "[IMP] models: warn if constraint key len exceed 63"

The check from commit 823d9e10dc is no
longer needed since the name is ensured to fit length limit.

[IMP] code: improve uninstall tests

Perform extra checks for removal of SQL constraints. Note the test is
commented out in `__init__.py`. It can be uncommented locally for
testing. It's kept commented out to avoid random errors in runbot.

closes odoo/odoo#129084

X-original-commit: af288b7178c25261329dd85a2e64b9dd635cd9e1
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-16 16:04:47 +02:00
Kartik Chavda ba90ec9603 [REM] calendar: remove unwanted code
This commit remove deprecated method.

task-3390334

closes odoo/odoo#126768

Related: odoo/upgrade#4865
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-16 16:04:27 +02:00
Kartik Chavda efac5707d1 [REM] calendar: remove attendee_status field
Purpose of this commit to remove `attendee_status` field
which was only usefull in one place where it can be easily
replacable and also this field contains some heavy
computation and added in calendar view which might be
cause some perfomance issues.

So, in this commit remove `attendee_status` field and its
related code and replace it be alternative which gives
desire output as before.

task-3390334

Part-of: odoo/odoo#126768
2023-08-16 16:04:26 +02:00
adjo-odoo 1ebc6c0044 [IMP] project(_sms),rating,hr_timesheet: improve the UI for project
The purpose of this PR is to improve the generic usage of the project app.

So in this PR done following changes:
 - In reporting > tasks analysis measures:
   - removed the # of tasks and average rating measures
   - Changed rating value (/5) to rating (/5)
 - In task analysis reporting formatted overtime as hh: mm
 - In the project  burndown chart added tip to action helper
 - In project.task search view > quick searches:
   - changed sale order to sales order
   - under the SO one, a 'sales order item' has been added to the quick search
 - Added many2one_avatar_employee widget in project sharing-> timesheets notebook
 - In project.project form view > share editable added text in muted
 - Added tip in the project.project form view > invoicing notebook under
   employee/SOL o2m
 - A placeholder has been added to the rating email template field in the project
   task stages: 'Task: Rating Request'
 - now rating submission page is editable
 - In task stages list view :
   - moved the project field on the right of the name
    - switched the 'SMS template' and 'email template' fields from the place
 - In project.task > recurrence notebook:
   - moved the 'next tasks' list to the right of the recurrence
      configuration fields
 - In project.task > sub-tasks notebook > optional fields >
   renamed 'initially planned hours' into 'allocated hours'
 - In project.task portal form view: renamed
   'history' into 'Message and communication history'
 - Added 'open' filter in my tasks menu search view
 - Added 'schedule an activity' status in the kanban activity widget

task-2903637

closes odoo/odoo#95971

Related: odoo/enterprise#29467
Related: odoo/upgrade#4095
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-16 16:04:09 +02:00
Adesh Jolhe (adjo) b623d25196 [IMP] portal: improve the portal share template
The purpose of the commit is to improve the share template
messaging and ui.

so in this commit did the following changes:
  - In invitation email template made some changes as follows:
    - You have been invited -> Mitchell Admin has invited
    - following document -> following project(record description)

task-2903637

Part-of: odoo/odoo#95971
2023-08-16 16:04:08 +02:00
damr bd1d22a269 [IMP] stock : update action_launch_stock_rules
This commit's purpose is to allow the overwrite of a condition inside
the action_launch_stock_rule in order to ensure the data to be corretly
updated in the flow of the industry_fsm_stock

task:2720328

closes odoo/odoo#114757

Related: odoo/upgrade#3607
Related: odoo/enterprise#23000
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-16 16:03:55 +02:00
Hubert Van de Walle (huvw) 5023e1a52c [FIX] web: commitChanges with a field input removed during an update
Steps to reproduce
==================

- Go to Payroll > Payslips > All Payslips
- Click on any line
- Click on the cog > Edit Payslip Lines
- Change an amount
- Press Tab

```
Cannot read properties of null (reading 'value')
    at commitChanges (/web/static/src/views/fields/input_field_hook.js:163)
    ...
```

Cause of the issue
==================

A custom Field is used: PayslipLineField.
It is used to override the record.update to trigger an action.
https://github.com/odoo/enterprise/blob/f8c027685a49fca519fd6ac2f41dd5f30b243934/hr_payroll/static/src/js/payslip_line_one2many.js#L63-L80

This causes the view to be destroyed -> `inputRef.el` becomes undefined.

Solution
========

Use the field value before the update.

opw-3434835

closes odoo/odoo#131971

X-original-commit: 546978c70f5bee59b9985246977585ef59d761cd
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-16 14:21:50 +02:00
xO-Tx e70cc2ea86 [FIX] website: adapt background image URLs on language switch
Steps to reproduce (on Chrome with browser cache enabled):

- Go to website > Create a new blog post.
- Switch to edit mode > Add an image to the blog cover from unsplash.
- After save, switch to a secondary language > Unsplash images disappear
and you need to refresh the page to get them to appear.

This behaviour is a "very specific" Chrome related issue: when switching
language, Chrome cannot load inline background images correctly right
after the redirect... and unlike other image URLs, background images
don't have the language code prefix (The `url_for()` will add the
language code before the image "src" E.g. `<img src="/unsplash/...."/>`
=> `<img src="/fr_BE/unsplash/...."/>` when switching to `fr_BE`...).

The goal of this commit is to prevent this behaviour by adapting the
"background-image" URLs in the same way as image "src".

opw-3412961

closes odoo/odoo#131891

X-original-commit: 5f20f50f9a9fd4bc5145d380609cdca80a8d7511
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-16 14:21:46 +02:00
mehjabinfarsana 805735fd9f [IMP] product: vendor product name and code in search view
before this commit, vendor product name and
vendor product code was not added in
vendor pricelists search view

after this commit, vendor product name
and vendor product code is added

closes odoo/odoo#129301

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 12:47:45 +02:00
Odoo's Mergebot b6fba72223 [REF] *: Update Chart.js to V4.3
Change version of Chart.js from V2.9.3 to V4.3.0
You can find changelog on
https://www.chartjs.org/docs/latest/migration/v4-migration.html

Version 4.3.0 of chart.js no longer uses moment.js. This task is a
prerequisite to completely remove the use of moment.js (task 3391739)

Why add aspectRatio : 2 ? => Canvas aspect ratio (i.e. width / height,
a value of 1 representing a square canvas). Note that this option
 is ignored if the height is explicitly defined either as attribute
or via the style. The default value varies by chart type; Radial charts
(doughnut, pie, polarArea, radar) default to 1 and others default to 2.

Why no more Chart.animationService.advance(); ?
There is no longer an equivalent in this version.
However, we have verified that the problem is no longer present in this
version.

Why use now getElementsAtEventForMode ?
It's clearly noted in the changelog. follow the link above.

task-3392075

closes odoo/odoo#127259

Related: odoo/enterprise#45679
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-16 12:47:37 +02:00
Pierre Pulinckx (pipu) 7e3c1ecdb8 [REF] *: Update Chart.js to V4.3
Change version of Chart.js from V2.9.3 to V4.3.0
You can find changelog on
https://www.chartjs.org/docs/latest/migration/v4-migration.html

Version 4.3.0 of chart.js no longer uses moment.js. This task is a
prerequisite to completely remove the use of moment.js (task 3391739)

Why add aspectRatio : 2 ? => Canvas aspect ratio (i.e. width / height,
a value of 1 representing a square canvas). Note that this option
is ignored if the height is explicitly defined either as attribute
or via the style. The default value varies by chart type; Radial charts
(doughnut, pie, polarArea, radar) default to 1 and others default to 2.

Why no more Chart.animationService.advance(); ?
There is no longer an equivalent in this version.
However, we have verified that the problem is no longer present in this
version.

Why use now getElementsAtEventForMode ?
It's clearly noted in the changelog. follow the link above.

task-3392075

Part-of: odoo/odoo#127259
2023-08-16 12:47:34 +02:00
Lucas Lefèvre (lul) 63480e6895 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/c8db0189 [REL] 16.5.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/405da6dc [IMP] packages: update chart.js to 4.3 Task: 3412671
https://github.com/odoo/o-spreadsheet/commit/830a144f [FIX] xlsx: use FormatAttributes to export filters Task: 3460544
https://github.com/odoo/o-spreadsheet/commit/63ef23ea [FIX] tests: avoid memory leak

Part-of: odoo/odoo#127259
2023-08-16 12:47:33 +02:00
William Henrotin 6f0348ba62 [FIX] stock: block quant creation from move Lines
The `quant_id` field on stock move line is a technical one to show
available quants to pick in the detailled operation view. It's not a
real field in database thus is not intended to create quant from it.

This commit adds the `{'no_create': True}` option in the view

Task : 3430500

closes odoo/odoo#131789

X-original-commit: 24041891811bb9805246115f99908a51ffa3697a
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 10:24:35 +02:00
FrancoisGe 90f1aa792f [FIX] sale: remove product in product catalog
Since the new Relational Model (PR 114024), it was no longer possible to
remove a product from the Product Catalog view. This commit adapts the
ProductCatalogModel to the new model.

closes odoo/odoo#131734

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-16 10:24:30 +02:00
Michael (mcm) 3ea0b115ca [IMP] web: remove legacy service system
This commit removes the legacy service classes:
- AbstractService
- AjaxService
- AbstractStorageService
- LocalStorageService,
- SessionStorageService
Only AjaxService was still used as a service so it is moves in the
"common_env" file.

task 3439226

closes odoo/odoo#131683

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-16 10:24:21 +02:00
tsm-odoo a1438e99d4 [FIX] im_livechat: fix wrong demo data
This commit fixes an issue in the demo data leading
to a crash when consulting the ratings on the website.

Steps to reproduce:
- Go to livechat channel form
- Click on "Go to website"
- Error 500

closes odoo/odoo#131640

X-original-commit: 04b6831816425592b9ab9077c6d0caf20b95c93e
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-16 10:24:17 +02:00
Yosua Nicolaus a7205508be [IMP] web: add link to readonly many2one_avatar widget
remove the condition where a many2one field can't be opened when the field is using the many2one_avatar (and its descendant) widget

closes odoo/odoo#131337

Task-id: 3454944
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-16 10:24:12 +02:00
Archana Vaghasiya d1bc2fb66a [FIX] base: handle the canceling statement due to lock timeout
A cron `Base: Auto-vacuum internal data` is running, which is performing
`auto_vacuum`. When the time limit exceeds 10 secs, we face the above issue.

Error: LockNotAvailable: canceling statement due to lock timeout

This commit solves the above issue by rollback the statement if the
`auto_vacuum` time limit exceeds 10 secs.

sentry-3938940519

closes odoo/odoo#131193

X-original-commit: f3dc0e12ba22968697d75c011352c0df99d5b5ed
Signed-off-by: Fabien Pinckaers (fp) <fp@odoo.com>
Signed-off-by: Archana Vaghasiya (arva) <arva@odoo.com>
2023-08-16 10:24:07 +02:00
mehjabinfarsana 06a38a6d09 [IMP] stock: add warehouse,location type in location search view
before this commit, warehouse and
location type was not added in
location search view

after this commit, warehouse and
location type is added

closes odoo/odoo#128236

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 10:23:53 +02:00
Louis Wicket (wil) 537b0ce712 [REM] base, *: remove binary_field_real_user from context
Formerly, using sudo() on a record had the effect of replacing the
current user with the superuser. But sometimes, knowing who the "real
user" was was necessary, so we needed to store it somewhere. This is
basically why the key `binary_field_real_user` was introduced in the
context: to keep track of who the user was before switching to sudo
mode.

Since 1e6c3bec2c, however, switching to
sudo mode no longer changes the current user; meaning that the
`binary_field_real_user` is no longer necessary.

This commit removes the remaining occurrences of the now useless
`binary_field_real_user` from the code.

* = hr, portal, web_editor

closes odoo/odoo#92032

Enterprise: https://github.com/odoo/enterprise/pull/27649
Related: odoo/enterprise#27649
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-08-16 10:23:49 +02:00
Arnaud Joset 2838425742 [FIX] calendar: allow disabling bus notification in views
Before this commit, when the user group calendar.event by private fields,
a bus notification is sent to exlain that private fields can't be displayed
and the private events are hidden from the result.

It was an issue in some views where group by private fields was used
by default and multiple notifications were displayed.

closes odoo/odoo#131970

Taskid: 3328718
X-original-commit: e3df5d96fc9ca6d7f400c2e0167ef53ebf7c524a
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-16 09:11:26 +02:00
Pedram (PEBR) 4daaeca640 [FIX] calendar: correct event day display in the email
This commit addresses an issue in the email templates where event start
days were being displayed incorrectly, particularly for events
scheduled at specific times in timezones that experienced day shifts
during UTC conversion. The previous implementation did not account for
the necessary UTC conversion, leading to misaligned event days in the
email content. This commit ensures that event start days are accurately
calculated based on the appropriate timezone conversion, providing
correct and consistent display of event information in the email
templates.

opw-3458837

closes odoo/odoo#131967

X-original-commit: 1e1781b6242b7b6be8d5a00b1c5270ae572b09b5
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-16 09:11:21 +02:00
std-odoo 10110bd4e4 [IMP] web: allow to disable the popover re-position
Purpose
=======
When the DOM changes, we recompute the popover position. This is useful
for most popovers, but when we have a form inside the popover (like the
properties definition) it can be very annoying to move the form while
the user fills it.

Task-3380176

closes odoo/odoo#128983

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-16 08:10:49 +02:00
Joren Van Onder de0ee14e4e [IMP] l10n_br: introduce some commonly used goods taxes
These taxes are archived by default to not clutter the database. They
will be activated on an as-needed basis by l10n_br_avatax.

Forward-port note: these taxes were converted from the XML approach to
the new CSV approach (see https://github.com/odoo/odoo/pull/110016).

task-2968770

closes #130799

closes odoo/odoo#130968

X-original-commit: ce07781b7daac26f02b5d5a8295c1acc821ae3c1
Related: odoo/enterprise#45223
Related: odoo/enterprise#45321
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Joren Van Onder (jov) <jov@odoo.com>
2023-08-14 22:49:58 +02:00
Joren Van Onder 267591eaa2 [FIX] l10n_br: make the Brazilian demo company's address valid
The state and zip were incorrect for the given address. The zip being
wrong lead to errors during account creation in l10n_br_avatax.

task-2968770

X-original-commit: 2ca171061dcbc10a24bd7c69d82a83d4cfc4ba6f
Part-of: odoo/odoo#130968
2023-08-14 22:49:57 +02:00
Ander León 5324f4ee0b [CLA] Anderson Armeya sings CLA
closes odoo/odoo#131959

X-original-commit: ebc4ed6c4fb11b01be28cf417b27de83d5361cef
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-14 20:24:57 +02:00
Martin Quinteros a98fe83ee8 [CLA] add new members to Adhoc CLA
closes odoo/odoo#131958

X-original-commit: c1c97b8d79b64648a37c324d0ad036d3890cf76c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-14 20:24:52 +02:00
Andrius Laukavičius 61bf9ae3bf [FIX] hr_expense: improve computed field performance
If you have large amount of product.template records (e.g. over 40k),
`hr_expense` module can't be installed as you would get MemoryError. It
would consume all memory while computing `can_be_expensed` field.

For that, using `_auto_init` to make it less of a memory hog.

closes odoo/odoo#131954

X-original-commit: 1138a24760ad57cb9e9895926012d269b4e2bfb0
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-08-14 20:24:47 +02:00
Andrea Cattalani 712bcc6d25 [CLA] Add CLA for Andrea Cattalani and Emilio Pascual
[CLA][ADD] persons of Moduon CLA

closes odoo/odoo#131951

X-original-commit: fe7da9dd7618baa46629cd3c9d3b70615579a313
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-14 20:24:42 +02:00
Maitri Patel b66c88df12 [FIX] web_editor: handle none value for description field
If a user gets the 'description' field None, then traceback will appear.

https://github.com/odoo/odoo/blob/907aba0f54f65788c78c1370a573fbe9b69be8c5/addons/web_editor/controllers/main.py#L50

Error: 'TypeError: expected string or bytes-like object'

Sentry-4319373991

closes odoo/odoo#131943

X-original-commit: d00a1fd4b3dbed7b55a32ce6bbd659b56dd06de2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-14 19:28:58 +02:00
Sven Fuehr 78abc4d2cd [FIX] web: fix address position in DIN 5008 document layout preview
Currently there is the following problem in the document layout preview:
("Settings" app > "General Settings" > "Companies" section > "Configure Document Layout")
The address is displayed in the wrong place for the DIN5008 layout
(from the l10n_din5008 module).

This is fixed in this commit.

closes odoo/odoo#131935

X-original-commit: 663334157cc4867c63aedea8d8d893eb765cfe25
Related: odoo/enterprise#45754
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Sven Führ (svfu) <svfu@odoo.com>
2023-08-14 18:12:58 +02:00
Sven Fuehr bd13b3193c [FIX] l10n_din5008: fix i18n
The i18n related files are currently not up to date.

This is fixed with this commit

X-original-commit: fb5b600ce8b4f6d6a8a0422ecef323cb25dffbbd
Part-of: odoo/odoo#131935
2023-08-14 18:12:57 +02:00
Sven Fuehr 471260ce56 [FIX] l10n_din5008: remove phone number from fallback address
Currently the phone number is printed as part of the address
if the "fallback address" is used as address.
In DIN5008 the address does not contain a phone number.

This commit removes the phone number from the "fallback address"

task-3394263

X-original-commit: 6e437341bb067d31d01e529b251092f2fd74e940
Part-of: odoo/odoo#131935
2023-08-14 18:12:56 +02:00
Gauthier Wala (gawa) 6c0d1e90ec [FIX] account: fix tour that is checking css value
This tour creates an indeterministic error, which is most
probably due to the fact that the css is sometimes not loaded when
we check it.
But this is not something that should be tested (especially in an
account tour), so we remove this step.
Removing this makes the tour useless, so we remove it.

Linked to runbot error 23583

closes odoo/odoo#131897

X-original-commit: 7d7535226332e766d1299b0d887bf7b21f34af88
Related: odoo/enterprise#45751
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-08-14 15:55:55 +02:00
Pedram (PEBR) 16d090be05 [FIX] l10n_cz: add default POS receivable account
The `default_pos_receivable_account_id` was missing.

opw-3435014

closes odoo/odoo#131895

X-original-commit: 21717e22a8dc4b93a6e1b7a446b472d8202e83b5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-14 14:52:16 +02:00
Thomas Lefebvre (thle) 0f08587e6c [FIX] resource: manage two weeks calendar and company creation
Steps to reproduce:
-------------------
- Go to Working Time and modify a calendar using "Switch to 2 weeks calendar"
    (not the default company calendar);
- In the Employees App settings, change the "Company Working Hours"
    to the edited calendar;
- Create a new company.

Issue:
------
We have the error: "Attendances can't overlap.".

Cause:
------
When we create a company, we will use the `_default_get` method
to get the default values for the `attendance_ids`.
So we will copy the attendances from the current company,
but we won't copy the `week_type` value.
In addition, the `two_weeks_calendar` value will be `False`.

As a result, overlaps will be checked as for a one-week calendar.
This will trigger the error.

Solution:
---------
If you want to get the current company's attendances by default,
make sure it uses a one-week calendar.
If this is not the case, we take the default (hardcoded) attendances.

Note:
-----
Since the commit 292508e8a749bf32e40995454da6122cd3c1df77,
it was no longer possible to modify a company's default calendar.
It is reverted.

With this FIX, this is now possible.

opw-3446789

closes odoo/odoo#131872

X-original-commit: 22c12db1f009686fa4c3861c398ba178b2785ead
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-08-14 14:52:12 +02:00
Chenyun YangandLucas Lefèvre dbdb7c9a7c [IMP] spreadsheet, spreadsheet_dashboard: share dashboard
This commit introduces models related to sharing dashboard, and
implements the sharing from dashboard view.
The basic idea is the same as sharing normal spreadsheet. The major
difference is that sharing a dashboard will direct to the dashboard view
instead of read-only spreadsheet view. A button and a side panel which
shows the global filters show up only in the dashboard view.

task 3378150

closes odoo/odoo#127370

Related: odoo/enterprise#43664
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Co-authored-by: Lucas Lefèvre <lul@odoo.com>
2023-08-14 14:52:02 +02:00
David Monjoie c8a63f2414 [FIX] web_editor: fix traceback when reconnecting
closes odoo/odoo#131896

X-original-commit: 581ec9209a2d5cc0f13de9ccb6f10e6255ba4959
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-14 13:42:36 +02:00
zainalabdeen 0305b97aee [CLA] Zain-Alabdin
closes odoo/odoo#131890

X-original-commit: 61b004e0af1ef87bf2c2e62729360a14c27a005a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-14 13:42:32 +02:00
Miguel Gozaine 8b12cc56e1 [CLA] GOZ4EL Signature
closes odoo/odoo#131873

X-original-commit: 296490519703cae6244b05e27c229c812922d661
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-14 13:42:23 +02:00
Xavier Bol (xbo) 3366ab5534 [FIX] project_timesheet_holidays: fix task_id field records when creating a timesheet
The fix done in 3b966c2f21 remove the `('company_id', '=', company_id)` in the domain of
task_id field defined in account.analytic.line in hr_timesheet, but that tuple
is reintroduced in `project_timesheet_holidays`.

This commit also removes that tuple to be sure we will no longer have that
tuple used in the domain of task_id field for timesheets.

To reproduce the issue, follow these steps:

1. Install project_timesheet_holidays module.
2. From the settings menu, create a new company.
3. enter in multi-company mode by keeping the current one as active and
   check the other company in companies switcher.
3. Create a project using the newly created company(e.g. New Company) and add
   a task to it.
4. Open the Timesheet application and create a new timesheet.
5. In the timesheet, select the project created in step 3, and observe that the
dropdown for tasks does not display any task.

Current behavior:
----------------

The user cannot select a task in another company than the current one.

Expected behavior:
-----------------

The user should be able to select the task in the another company if he
is in multi-company mode.

task-3323027

closes odoo/odoo#131870

X-original-commit: d630711e795e7eddeb7b0ec47920f288920aedc6
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-14 13:42:18 +02:00
Touati Djamel (otd) 4be094ae9a [FIX] product: remove the package when we unlink it from product
Steps to reproduce the bug:
- Enable “Product packing” in the inventory settings
- Create a storable product “P1”
    - Add a package with barcode “123”
    - save the changes
    - Delete the package
    - Try to set the same barcode “123” for the product

Problem:
A validation error is triggered: "A packaging already uses the barcode"

Solution:
When we delete the package from the product, we have to delete
completely the “product.packaging" record.

opw-3378288

closes odoo/odoo#131825

X-original-commit: d01d8a9cedec2d1c17469538103340fc934470f1
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-14 13:42:13 +02:00
Arthur Detroux (ard) 276dbdad5a [FIX] website: properly check for title in SEO dialog
Commit [1] adapted the SEO dialog to OWL and to the move of the website
in the backend. While doing so, it omitted checking for the default
title when validating whether a keyword was contained in the page's
title.

In [15.0] the way this was checked was through a simple look through the
page's <title> tag.

However, in this commit, we do not look through the HTML, rather we use
the metadata "default_title".

[1]: https://github.com/odoo/odoo/commit/ac55f2bb113ecf7c774fe6e96d28e716184a97d1
[15.0]: https://github.com/odoo/odoo/blob/8deeabdbfbee20289d79151fa2821ce04585d0bd/addons/website/static/src/js/menu/seo.js#L233C16-L233C45

opw-3435547

closes odoo/odoo#131809

X-original-commit: ee200b4dd97d9725c69d6f8da427ce81eb6d0e8e
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-08-14 13:42:08 +02:00
Arnold Moyaux 863cfc5ff1 [IMP] hr_attendance: remove pin for admin
Shop floor app is base on employee. When hr_attendance is install,
it will lock the app until the user unlock it with the pin. For
demo purpose it's blocking the flow and it's not intuitive

closes odoo/odoo#131707

X-original-commit: b4ec72d0079ae43ace40dbc9ec0fd1b686e125a4
Related: odoo/enterprise#45699
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-14 13:41:56 +02:00
Arnold Moyaux cc39341fc2 [FIX] mrp: demo data for shop floor
We only show the move that requires a manual operation in the
shop floor application. Currently we only see the MO for table top
with a single operation to register the finished serial.

It's a bit funnier to see also the components required and check them

Also the manual_consumption field is a compute store without inverse.
It means it's readonly true by default. But we should be able to pass
a value and use it instead of the compute

X-original-commit: 58118291e148a144058c0c883ddd138187a86f3d
Part-of: odoo/odoo#131707
2023-08-14 13:41:55 +02:00
Arnold Moyaux 9c8a9991eb [FIX] stock,mrp,purchase: remove demo right
Before [1] the demo user only has the basic right. Now it has
the administrator rights and it prevent an easy testing for user
flow.

The demo and admin users get their rights from the common
template with administrator right everywhere. Since it's a
data, we could just remove the administrator level and set
the user level in the demo data.

[1] commit 121cd0d608

X-original-commit: 7b7fdf5d4eb892bfd3c2fdb575264025dca21ca5
Part-of: odoo/odoo#131707
2023-08-14 13:41:54 +02:00
momegahedandfeav-odoo bc44f5cd03 [FIX] l10n_mx: Correct translation of ISR
Steps to reproduce:
1. Install l10n_mx
2. create a sales tax t1 that uses Tax Grid ISR
make sure the fiscal regime is "RESICO"
4. create an invoice with t1
5. try to sign the xml
6. error

Issue:
in `get_tax_cfdi_name` the only valid values for the node "Impuesto"
in the view "cfdiv40" are ISR, IVA and IEPS

Fix:
fix the translation

opw-3438139

closes odoo/odoo#131059

X-original-commit: 30c12d8951e56c628795b7e6e2ba357e433bbf7f
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Co-authored-by: feav-odoo <feav@odoo.com>
2023-08-14 13:41:42 +02:00