Commit Graph
166580 Commits
Author SHA1 Message Date
nikj-odoo bcd9f83eef [FIX] loyalty: invalid program field when specifying rules/rewards on new programs
Before this PR, users encountered an issue when attempting to add rules
to Discount and Loyalty programs. An undesired validation message would surface,
preventing them from saving their changes.

In this PR, the extraneous validation has been eliminated, enabling users to
successfully save and update their existing rules and rewards.

Task-3487478

closes odoo/odoo#134261

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-23 20:07:15 +00:00
divy-odoo dde1eb57c7 [IMP] point_of_sale: display image as color attribute value
With this commit, Image options for the colour variant have been added.
now, the user can identify the pattern values by the image.

- It will display the image instead of HEX color if the image is set.

task-3381738

closes odoo/odoo#132685

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-23 20:07:14 +00:00
divy-odoo c05336d273 [IMP] product, *: add image option for color attribute
*: website_sale, sale_product_configurator

With this commit, Image options for the color variant have been
implemented. Now, users can use images to represent pattern colors such
as "leopard" instead of solely selecting a solid color.

- User can add, remove or change the color attribute value image from
  the backend. If no image has been uploaded, it will use the
  corresponding HEX color to represent color/patterns.

task-3381738

Part-of: odoo/odoo#132685
2023-10-23 20:07:14 +00:00
Laurent Smet c13332a186 [IMP] point_of_sale: Prepare MX CFDI global invoice
Add a common way to convert the pos.order.lines into dictionaries to compute taxes and
to generate the invoice.

closes odoo/odoo#130819

Task: 3345475
Related: odoo/upgrade#5276
Related: odoo/enterprise#45231
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-23 20:07:13 +00:00
dhrs-odoo 11c843b3d9 [FIX] web: fix user name overflowing
In this commit we have fixed that when we give long user name then in task list
view it was overflowing so we have added mw-100 in span and text-truncate in the
div element.

task-3248965

closes odoo/odoo#139180

X-original-commit: b10053bdfbc95e2f587b451c2b4337a96a3ddb27
Related: odoo/enterprise#49193
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-23 17:48:54 +00:00
roen-odoo 69188e7228 [FIX] point_of_sale,pos_loyalty: use iot_device when printing reports
Current behavior:
After this refactor (https://github.com/odoo/odoo/pull/120070) when you
try to print a report from the POS, the report was always downloaded
even if you set a printer in the report configuration. But the report
should be printed if a printer is set on the report configuration.
It was never taken into account and the report was always downloaded.

Steps to reproduce:
- Install pos_iot, and activate gift card.
- Go in Settings > Reports and look for the gift card report.
- Set a printer on the report configuration.
- Go in the POS and sell a gift card.
- It will be downloaded on the computer, but it should be printed on the
  printer you set on the report configuration.

opw-3495176

closes odoo/odoo#139326

X-original-commit: 4747f62fcbb9ae6cb224c9da60501a20919766a9
Related: odoo/enterprise#49317
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-23 16:45:11 +00:00
Xavier Morel 9ebbfdac73 [FIX] *: incorrect translations markings
Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).

Also

- removes translation markers entirely when there's nothing to
  translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
  (DRY is generally a bad idea when translations are involved, even
  more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
  strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
  to fill-paragraph): `\` escapes only the newline, if the
  continuation string is indented this results in a bunch of spaces
  ending in the string to translate, which is pretty garbage for the
  translator, using implicit concatenation works much better

Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.

Not in scope:

Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders

- Provides more context / data to the translator to make sense of the
  sentence.
- Allows reordering the translated terms, which can be necessary
  depending on the sentence and language.

closes odoo/odoo#139314

Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-23 16:45:09 +00:00
Xavier Luyckx (xlu) 619413467e [IMP] pos_self_order: layout enhancement
In this commit, we improved a few UI elements across pages.

Product List Page:
Moved the category title to a gray section for clearer spacing and
strengthened the association between category names and respective products.

Product Variant Page:
Fixed an issue where long variant text would overlap with other variants
and thus we adjusted the height of variants based on the tallest content
in the row. All variants on the same row are now consistently sized.

Cart Page:
Condensed product lines for better mobile viewing and to reduce the need
for excessive vertical scrolling.

Footer:
We renamed a few strings and move the order total to the right, also
cart now displays 0.00 even when empty

task-3557715

closes odoo/odoo#139072

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-23 14:21:43 +00:00
damr 81a450c503 [FIX] sale: name align in product catalog
This commit's purpose is to fix the alignment between the priority
widget and the name of the product.

details of the implementation:
A 'style' was added instead of the bootstrap class mt-1 because the
bootstrap was not precise enough (step of 4px, while 2 were needed)

closes odoo/odoo#138750

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-23 14:21:42 +00:00
mano-odoo d09d792a46 [FIX] website_sale: checkout accordion card styling
The goal of this PR is to unify the styling of the accordion component
with the bootstrap styling of a card.

The layout of the accordion had to be adapted with an extra div to use
the `accordion-item` as the `card-body`. This styling will allow better
maintainability of the accordion which now visually act as a card
component in > lg screens. This will be required to handle different
background theme color.

This PR also fixes wrong indentation in the SCSS.

task-3556135

closes odoo/odoo#138522

Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-10-23 14:21:41 +00:00
Adrien Dieudonne 711fc86368 [FIX] web_editor: colorpicker buttons text partially hidden
Follow-up of https://github.com/odoo/odoo/commit/ee38c69503a0fd9175751f054d88bf760ec660b8

Before this commit, the padding of these buttons was too big and
the text was partillay hidden.

This issue was introduced in the commit above. The selectors generated
by the ´.extend´ were not correct and the css rules associated to ´.btn´
was never applied. It was therefore good to remove this rule but we shoudn't
have added the ´.btn´ class.

Steps to reproduce:
- Go to website and open the Editor
- Click on "Edit"
- Drag and Drop "Text"
- Go to Customize
- Change the Background or the font color

closes odoo/odoo#139437

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-23 13:11:28 +00:00
Sébastien Theys d15e88abef [FIX] bus: authenticate on the correct env
`_authenticate` is updating the `env`, but it updated the `env` of
`ir_websocket` instead of `self`. There was then a mismatch between
the `update_context` and the current user.

This was highlighted in another PR that removed sudo from these methods
with the hope on relying on ACL, which depends on current user and other
context values at the same time.

closes odoo/odoo#139436

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-23 13:11:27 +00:00
TSO fc573a8d8b [FIX] discuss: prevent push-to-talk release spam on some devices
Before this commit, devices with the key-repeat feature turned on
would not work well with the push-to-talk feature.

This commit sets a minimum delay before a push-to-talk key is considered
released.

closes odoo/odoo#139396

X-original-commit: aced53322309898d060c082e3d009293123ffea0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-10-23 13:11:24 +00:00
Mathieu Duckerts-Antoine 0ff4fa07cf [REF] web: use pseudo constructors to create (condition) trees
We define some helpers to easily create condition trees and use them
where it is possible.

closes odoo/odoo#139377

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-23 13:11:23 +00:00
Mathieu Duckerts-Antoine bbf80b16c3 [REM] web: remove some unused search helpers
With a lot of legacy code removed and the introduction of the
SearchBarMenu component (https://github.com/odoo/odoo/pull/116641), some
search helpers have become unused. We remove them.

Part-of: odoo/odoo#139377
2023-10-23 13:11:23 +00:00
Dossogne Bertrand 7d874be72b [FIX] hr_holidays: set accurate lastcall at allocation creation
Steps to reproduce the issue:
- create an accrual plan
- create an accural allocation with a past date so that
days are already accrued
- go on the time off dashboard
- change the simulation date after new days should be accrued
- the added days do not correspond to those needed

Before this commit, at the creation of an accrual allocation,
the `lastcall` field was not correctly set, resulting in
computation issues at the next accrual allocation date.
This commit correctly set that `lastcall` so the issue does not occur.

task-3563190

closes odoo/odoo#139347

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-23 13:11:22 +00:00
tsm-odoo ffb8f83159 [FIX] mail: fix public page for non internal users
Before this commit, an error occured when opening the discuss public
page as a non internal user. This is caused by a read rpc being done
while the user is not allowed to do it. This commit ensures this rpc
is only done when allowed.

Steps to reproduce the issue:
- Open Odoo with Mitchell Admin
- Go to a public channel
- Start a RTC call
- Join the channel as guest with the invitation link
- A pop up appears

closes odoo/odoo#139397

X-original-commit: c7e66f3878b451001dbe4e8e3cdd8ced9a8ed632
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-23 09:05:10 +00:00
Haris (MHCH) 25e9de8c71 [FIX] l10n_au_hr_payroll_account: Fix Account Reconciliation
21300 - Wages & Salaries (Current Liability) Account needs to be
reconciliable.

task-3548694

closes odoo/odoo#139176

Related: odoo/enterprise#49185
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-23 09:05:08 +00:00
FrancoisGe f91920a440 [REM] *: remove legacy/js/core from asset bundles
Several asset bundles have legacy/js/core files that they no longer use.
So we're going to remove them in this commit.

Part of task: 3439226

closes odoo/odoo#139423

Related: odoo/enterprise#49377
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-23 07:17:51 +00:00
Thomas Lefebvre (thle) 39b055f178 [FIX] hr_recruitment_skills: display skill type
Issue:
------
All skills are displayed in the "Other" type (after_saving).

Solution:
---------
Remove `column_invisible` attribute and add optional attribute.

Note:
Use the commit b11b09405b solution.

opw-3537736

closes odoo/odoo#138631

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-10-23 07:17:48 +00:00
Nshimiyimana Séna ecf07eda14 [FIX] account: prevent unnecessary recompute of invoice line account_id
Summary
------
Currently, when removing a product from an invoice line, the account for
that invoice line is automatically reset to a default value.

Steps to reproduce
------------------
* install `account_accountant`
* create an invoice and add a product
* set a different account on that invoice line
* remove the product from the line

You should see that the account is automatically changed.

opw-3092556

closes odoo/odoo#139361

X-original-commit: 39b44dbfef0d533722ce2c96d375ada113d32b00
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-10-23 06:10:47 +00:00
Roy Le 1266cad273 [IMP] account: show accounting dashhoad's "to check" formatted according
to currency
rounding rules, symbols and positions

closes odoo/odoo#139418

X-original-commit: b41a02cf1b4e0a67e56b25c5784d5fb2952c80e0
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-22 10:25:49 +00:00
Josse Colpaert b94fc7f1cb [FIX] account: cash basis entry should have the correct company
closes odoo/odoo#139402

X-original-commit: 79fb214d1d9f892a45a52b44137f9e01bde37ac2
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-21 05:55:46 +00:00
JordiMForgeFlow 464e280428 [FIX] base_vat: properly return vat check for HU VAT
Before the fix the check function is assigned a boolean, which causes an
error when trying to call the function.

After the fix the result of the check is returned.

closes odoo/odoo#139407

X-original-commit: ea2798c5893373d79f70959e4501d0eef4f964b7
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-21 03:53:38 +00:00
Luis Torres 7414b6b850 [FIX] l10n_pe: Fixed document type domain for not sale documents
In the commit 355250d062 was improved the
domain, to filter based in the document type, but was not considered
that only is for sales documents.

On the vendor bills could be used more document types, now is fixed.

closes odoo/odoo#139409

X-original-commit: e4a54d9a6988812e40b9054b8b5f4308d97cbff9
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-10-21 02:22:48 +00:00
nda 25e4fcdd1d [FIX] web: disable export button during data export
steps to reproduce:
in a tree view export a large amount of data (or add a sleep in
/web/export/xlsx)

before this commit:
button is not disabled, allowing users to spam the button

after this commit:
button is disabled, informing the user that we're processing
his request

closes odoo/odoo#139392

X-original-commit: 56853574e10e8cf7d1dcec450db79d96d790f231
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
2023-10-20 23:37:51 +00:00
Rémi Rahir (rar) 8a608a66ed [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/430f0907 [REL] 16.5.0-alpha.12
https://github.com/odoo/o-spreadsheet/commit/ca347935 [FIX] scorecard: fix baseline arrow
https://github.com/odoo/o-spreadsheet/commit/07863006 [IMP]  grid: add custom paste shortcuts
https://github.com/odoo/o-spreadsheet/commit/8c94a5a6 [FIX] Selection: exclude hidden rows/cols in selection statistics Task: 3508872
https://github.com/odoo/o-spreadsheet/commit/383f5344 [FIX] Figure: Pass figure as child component props Task: /
https://github.com/odoo/o-spreadsheet/commit/4b42059d [REL] 16.5.0-alpha.11
https://github.com/odoo/o-spreadsheet/commit/8635acf7 [FIX] charts: export gauge and scorecard charts in .xlsx Task: 3524473
https://github.com/odoo/o-spreadsheet/commit/a825627d [IMP] chart: Scorecard are now drawn on a canvas Task: 3524473
https://github.com/odoo/o-spreadsheet/commit/cb493613 [IMP] index: expose SelectionInput and toUnboundedZone Task: 3554062
https://github.com/odoo/o-spreadsheet/commit/8282716d [FIX] xlsx export: remove unsupported characters Task: 3552957
https://github.com/odoo/o-spreadsheet/commit/031593c2 [IMP] index: expose lettersToNumber
https://github.com/odoo/o-spreadsheet/commit/450a4eae [REF] ot: extract and expose range transformation helper Task: 3554062
https://github.com/odoo/o-spreadsheet/commit/8da5fb29 [IMP] types: shorter getters declaration
https://github.com/odoo/o-spreadsheet/commit/7e3bed67 [FIX] clipboard: cut/paste whole CF across sheets Task: 3502777
https://github.com/odoo/o-spreadsheet/commit/4e5f15f7 [FIX] icons: Fix icon svg's
https://github.com/odoo/o-spreadsheet/commit/c81dce7e [IMP] evaluation: expose getCorrespondingFormulaCell Task: 3318865
https://github.com/odoo/o-spreadsheet/commit/854f2d74 [FIX] ChartPanel: traceback on deleting chart while editing data series Task: 3523882
https://github.com/odoo/o-spreadsheet/commit/d39ded8c [IMP] edition: cancel edition when setting format Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/b742ae0e [IMP] formats: add more date and number formats Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/5641af62 [REF] formats: use helper to create format action Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/025ee4db [FIX] menu: truncate menu description Task: 3515610
https://github.com/odoo/o-spreadsheet/commit/278c019a [FIX] core: typo
https://github.com/odoo/o-spreadsheet/commit/e6cad253 [MOV] tests: split tests files by category
https://github.com/odoo/o-spreadsheet/commit/34d96c72 [FIX] headers_overlay: reselect full column or row as dataseries range Task: 3481617

closes odoo/odoo#139383

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-10-20 23:37:50 +00:00
Gauthier Wala (gawa) 46a413605f [FIX] l10n_es_edi_facturae: test dependencies
The module does not depend on account_edi, but the test extends
the test class defined in it.
The problem only appears in saas-16.4, because before,
account_edi was auto-installed with account.

Linked to runbot error 24128

closes odoo/odoo#139363

X-original-commit: db4eba75ef8e9d584921615d72cf6ea4449554ac
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-10-20 23:37:48 +00:00
Sébastien Theys c955327c50 [FIX] account_edi, web, mail: add attachment delete in public tour
This allows better coverage of the feature and in particular its access
check.

Follow-up of https://github.com/odoo/odoo/pull/118701

closes odoo/odoo#139359

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-20 23:37:46 +00:00
Anita (anko) a19495841b [FIX] website_sale: fix accessory_product
Accessory product was showed to user in cart
even when it was unpublished, now it's only
showed to internal user if unpublished.
task-3218286

closes odoo/odoo#139358

X-original-commit: b1f617135d64875d8306387482ddea535dcff1bc
Signed-off-by: anko-odoo <anko@odoo.com>
2023-10-20 23:37:46 +00:00
Andrea Gidalti 682b724a2b [CLA] Update Vauxoo's CLA adding andreagidaltig
Incorporate Andrea Gidalti (andreagidaltig) as Vauxoo's contributor.

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#139356

X-original-commit: 12e2245db3de5f9f1fcb521ef2507d6318ad0ac2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-20 23:37:44 +00:00
Sébastien Theys d67a3ec8e8 [IMP] mail, *: return recordset in channel create methods
* = calendar,test_discuss_full, test_mail, test_mail_full

Methods can be downgraded to channel_info when called by RPC.
This increases the simplicity to use these methods in python.

closes odoo/odoo#139341

Related: odoo/enterprise#49326
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-20 23:37:44 +00:00
Paolo Gatti (pgi) 7da0166110 [IMP] l10n_it_edi: Remove useless VAT due date field
- `l10n_it_has_exoneration`:
  This field is useless since it can be easily computed:
  a 0% tax that has a `l10n_it_kind_exoneration` has an exoneration.
  It's not even necessary to leave it as a computed, we just check
  the presence of the kind of exoneration when necessary.

- `l10n_it_kind_exoneration`:
  Renamed to `l10n_it_exempt_reason` following the
  `l10n_es_exempt_reason` example

- `l10n_it_exempt_reason`, `l10n_it_law_reference`
  Moving tax fields from `l10n_it_edi` to `l10n_it`.
  These are tax details that also apply to Italian Taxes
  even if they are not sent through the EDI.

  Exempt reason and law reference are set on probably
  invalid ones just for default. They will be changed
  to valid ones, but we need to add more taxes.

Upgrade PR: odoo/upgrade#5305

Task link: https://www.odoo.com/web#model=project.task&id=3551241
task-3551241

closes odoo/odoo#139012

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-10-20 23:37:38 +00:00
Julien Alardot (jual) 68fbdc9640 [REF] *expense*: Technical hr_expense refactor
This refactoring handles a lot of needed changes that should have almost
no impact on the UX. The aim is to make the code more readable and coherent

Major changes:
- Improve tests and make sure they actually make sense and test the flow
- Split hr.expense and hr.expense.sheet models into two files
- Rename fields according to account naming conventions
  - all .*_amount become *_amount_currency and .*_amount_company -> .*_amount
  - unit_amount -> price_unit
  - all .*_amount or .*number.* for non-monetary -> nb_*
  - amount_tax -> tax_amount
- Move hr.expense.sample field to hr_expense_extract
- Replace hr.expense.same_currency field by hr.expense.is_multiple_currency
  to be consistent with hr.expense.sheet
- Remove hr.expense.unit_amount_display deprecated field
- Remove OCR-related & deprecated reference field
- Remove hr.expense.sheet.address_id deprecated field
- Simplify security fields (removing sheet_is_editable and merging the behaviour
  for fewer confusions)
- Edit product fields to use related fields when possible

Minor changes:
- Coding UTF-8 lines removal
- Cleaning some imports
- Making some formatting more consistent

task-3358176

closes odoo/odoo#130244

Related: odoo/upgrade#5016
Related: odoo/enterprise#45149
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-10-20 23:37:36 +00:00
Julien Alardot (jual) c3166aa1f4 [REF] hr_expense: Replace t-esc by t-out in templates
Due to the deprecation of t-esc to the unique use
of t-out in the rendering template, this replaces
every usage of it and ensures everything continues to
work as intended. Removing deprecation warnings
polluting terminal

deprecation commit: odoo/odoo:9ce5bc8881ae06b613ef61eb07453b224f62bae6

task-3358176

Part-of: odoo/odoo#130244
2023-10-20 23:37:36 +00:00
Julien Alardot (jual) d6f4bbf58c [FIX] hr_expense: Fix employee_id search domain
Fix a bug introduced where the search domain returned is a string instead of
a list on the employee_id

task-3358176

Part-of: odoo/odoo#130244
2023-10-20 23:37:36 +00:00
Benoit Socias 55e64beb47 [FIX] website, *: not fail on visitors views without event rights
*: website_crm, website_event, website_event_track

Before this commit, when accessing the visitor views without having any
event rights, an error was triggered.

This commit restricts the display of the `event_registration_count`
field on the `website_visitor_view_form` restricted to the
`event.group_event_user` group so that its invisible condition does not
fail. Similarly it restricts a visibility condition on
`event_track_wishlisted_count` to the `event.group_event_manager` group.
To avoid encountering the same issue with further extensions of
`_compute_email_phone` on the `website.visitor` model, we make its
fields `compute_sudo=True`, and revert the specific `sudo` that had
been added in [1].

Steps to reproduce:
- install `website_event`
- set Demo user to have no Events right, but be an "Editor and Designer"
for Website
- register to an event as an anonymous user
- access the Visitors page as Demo user

=> An error was produced.

Steps to reproduce (2):
- install `website_event_track`
- set Demo user to have no Events right, but be an "Editor and Designer"
- access the Visitors page as Demo user

=> An error was produced.

[1]: https://github.com/odoo/odoo/commit/5ba09c2cb2bb180cfb1363c352f35bd8cf3b132b

opw-3537849

closes odoo/odoo#139271

X-original-commit: 4cb18fab5e8d14dd9a2dfb5cb3e65b43fab02846
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-10-20 22:10:39 +00:00
Victor Feyens 880e68b39a [IMP] website_sale: only require phone for shipping addresses
Address form forced the input of phone fields.

1) It only makes sense for shipping addresses by default, for delivery purposes
2) It was not properly handled in global checks, so you could do the whole
checkout flow without having a phone set on your address, but if you went to
the address page, you wouldn't be able to save as your phone would be invalid.

Side-change: do not check shipping address validity for orders without delivery
(only services).

closes odoo/odoo#138026

Related: odoo/upgrade#5248
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-20 20:52:42 +00:00
Victor Feyens bce00af708 [IMP] website_sale: address updates
* Avoid posting crappy forms when a redirection does the job
* use a dedicated route /shop/cart/update_address for address changes
* clean code from recent PR on invoicing address
* Public user shouldn't be able to create billing addresses
* Logged customer should always see his own partner as billing/shipping
address choices.

Part-of: odoo/odoo#138026
2023-10-20 20:52:42 +00:00
Adrien Minne (adrm) bb4216b950 [FIX] spreadshet: wrong date format for week in pivot
When importing a pivot with a date field in week format, the date was
formatted as "W2023 40" instead of "W40 2023".

closes odoo/odoo#137682

Task: 3539629
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-20 20:52:41 +00:00
Julien Van Roy ad4af37b96 [FIX] l10n_mx: remove useless tags after l10n_mx_tax_type
The iva, ieps, isr tags are useless since there is the selection field
`l10n_mx_tax_type` on the taxes.

task-3388347

closes odoo/odoo#136948

Related: odoo/enterprise#48088
Related: odoo/upgrade#5204
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-10-20 19:12:47 +00:00
Yosua Nicolaus 1a6127e26b [REF] l10n_es, l10n_es_edi_sii: refactor for Libros export
The new Libros Registro de IVA export from l10n_es_reports is very similar to l10n_es_edi_sii

We want to reuse things in l10n_es_edi_sii but it will require l10n_es_reports to depend on it first, which is not a good thing since the Libros export are used mainly by SME that does not have l10n_es_edi_sii installed yet

This commit refactor some part from l10n_es_edi_sii to l10n_es so that l10n_es_reports can reuse things from l10n_es_edi_sii while not depending on it

closes odoo/odoo#136983

Community-pr: https://github.com/odoo/odoo/pull/136983
Enterprise-pr: https://github.com/odoo/enterprise/pull/47578
Task-id: 3394451
Related: odoo/enterprise#47578
Related: odoo/upgrade#5304
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-10-20 19:12:44 +00:00
Robin Lejeune (role) 710d000f18 [IMP] web_editor, website, *: allow columns on mobile snippets
*: mass_mailing

This commit introduces options for the flex column layout and the
horizontal resizing to be used on mobile and be independent from
the desktop layout.

This makes it possible to:
- Have different number of columns on mobile and on desktop.
- Use different column widths and offsets for mobile and desktop.
- Reorder columns independently.

The behavior expected from the columns is:
- In the editor panel, Cols indicate the number of columns per row on
both mobile and desktop. The option is conditional of your environment:
you edit the number for the screen size of your current resolution.
- When columns have different sizes (either because it is the default
behavior of the snippet, or because the user resized some), the counter
should read "Custom". Same when the user changed some offsets.
- If manual modifications were made on width and offset, they are reset
on the current display if the number of elements is updated. This was
decided because an old, specific layout with custom offsets / width
doesn't work well with a different number of elements. (This is also the
default behavior before this PR with desktop-only modifications.)

The expected behavior when reordering is:
- On mobile, it should only affect the mobile layout.
- On desktop, it should affect both layouts.

In order to have a coherent feature on both mobile and desktop as well
as correct some non-ideal but non-blocking behaviors, the commit also
changes the following behaviors:
- When setting a columns count lower than the current number of items in
the `.row` container, extra items are now wrapped on the next flex-rows
(still within the container) instead of being deleted.
- When going from e.g. 3 to 5 columns (and as many items), the change
happens all at once instead of each item being visibly added one by one
on the next row, then brought back to the first row.
- The columns count automatically updates when resizing an item, instead
of updating only after you click somewhere else on the snippet.

This commit also adds a test to validate the new behavior.

task-3097045

closes odoo/odoo#117562

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-20 19:12:43 +00:00
Robin Lejeune (role) cd58f04bea [REF] web_editor: move logic from SnippetOptionWidget to SnippetMove
The logic done in the `_computeWidgetVisibility()` method of the main
`SnippetOptionWidget` should have been placed in the `SnippetMove`
sub-widget as an override method.
This commit moves the logic at its right place and removes an unneeded
condition.

task-3097045

Part-of: odoo/odoo#117562
2023-10-20 19:12:43 +00:00
Robin Lejeune (role) d210af8348 [REF] web_editor, website: add utility functions isMobileView()
This commit implements two generic utility functions with similar
behavior that check whether the view is mobile or desktop:
- For web_editor: depending on the view of the targeted element
- For website: depending on the context

task-3097045

Part-of: odoo/odoo#117562
2023-10-20 19:12:43 +00:00
Dylan Kiss (dyki) d6cb0e8797 [IMP] l10n_be: revise CoA, terms and translations
The Belgian localization has been updated to reflect the official Charts
of Accounts.
Users now have the choice between the official CoA for Companies or the
one for Associations and Foundations.

All related terms and translations have been reviewed and corrected in
the 3 official languages (nl, fr, de).

Non-official languages have been removed, since they both don't make
sense and they did not work because of targeting an ancient version of
Odoo.

Finally, the 580000 account has been set as the default Internal
Transfers account, avoiding a second 58 account to be created.

task-3086473
task-3258014

closes odoo/odoo#117480

Related: odoo/enterprise#35771
Related: odoo/upgrade#5291
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-10-20 19:12:40 +00:00
Dylan Kiss (dyki) 817a194e3e [IMP] account: allow identical lines in multiple reports
Currently we require the account lines `code` field to be unique across
all reports in a database. Since Reportalypse, this is not required
anymore, since we search by default only in the current report unless
we specify a `cross_report` subformula. Then it will take the first one
it finds.

In this commit, we relax the condition to have unique `code` fields per
report, instead of globally.

Furthermore, we add a test utility to check lines with the same code to
have the same properties. This is useful for localizations that have
multiple versions of the same reports, containing identical lines in
multiple report. This way we can ensure they are always calculated the
same way across reports.

task-3086473

Part-of: odoo/odoo#117480
2023-10-20 19:12:40 +00:00
Jinjiu Liu 4faa1cb9ca [FIX] web_editor: enter resets the editor after link insertion
Reproduction for creation:

1. Create a link using /link
2. Click after the link, press enter
3. The link and cursor disappear.

Reproduction for cancellation:

1. Create a link using /link, don’t save it but cancel it
2. Click after the link, press enter
3. The link and cursor disappear.

Fix: After clicking the save button of the link dialog, the next history
step is not correctly set up as the history step is not unpaused. This
causes the mutation list of the current step to have all the mutations
before starting the link insert. Thus after the link creation, whenever
the historyRollback is executed, it’s rolled back to the very start

The cancellation has two cases, clicking the discard button or clicking
the close button. Unfortunately, they have to be handled differently.
For clicking the discard button we need to bind the button with a
function doing the historystep then close. For the close window button,
we have to rewrite the close function by overwriting
this.env.dialogData.close. The overwrite method is specified in this
commit: https://github.com/odoo/odoo/commit/dc1191f6939c4bbf5cfcc865884813610f4f8f2c

task-3446357

closes odoo/odoo#139325

X-original-commit: 60089e7e100039670d98f2f41b4f56fafdb8f830
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-20 18:06:42 +00:00
Hubert Van de Walle (huvw) a026a9e9b1 [FIX] web: missing pivot measures when using favorites
Steps to reproduce
==================

- Go to budget analysis
- Switch to the pivot view
- Unselect the first three measures
- Save the current search and set it as default
- In the measures dropdown, there is only two measures remaining

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

- When `context.pivot_measures` is used, the measures are computed from
  it and those that comes from the metaData are missing.

opw-3544823

closes odoo/odoo#139315

X-original-commit: b11266cc377fa4753a0ee609258d9919f1ba5496
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-10-20 18:06:41 +00:00
Walid 74497136cc [FIX] purchase_requisition: correct sequence according to company
Step to reproduce:
- Create company specific sequences for purchase agreements.
- Create a purchase agreement for Chicago company
- Select both comapanies for current user and switch to San francisco
- Confirm the call for tender

Bug:
sequence from San francisco is applied since ir.sequence takes current
company by default

Fix:
for company specific purchase agreements apply their own companies sequence

opw-3505571

closes odoo/odoo#139310

X-original-commit: 1e7625bb132909b892311a0da3bac9585217bd8c
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-10-20 18:06:40 +00:00