Commit Graph
156465 Commits
Author SHA1 Message Date
niyasraphy eebc3e0483 [IMP] mail : better breadcrumb for models
closes odoo/odoo#104955

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-25 17:00:39 +01:00
Ivan Yelizariev 9f5050ce0d [FIX] mail: show activity groups with future items
When activity group (e.g. activities for Sale Orders) has future acitivities,
but not today or overdue activities, the group is deleted. This is not what we
want. In v15 it worked opposite way, but in v16 it was changed after js
refactoring. Variable name for `total_count` is confusing. It actually means
today activities + overdue activities [1]

[1] https://github.com/odoo/odoo/blob/1666ee5515996fab8a843b36b4fd93b776172f75/addons/mail/models/res_users.py#L237-L238

opw-3042616
opw-3063110

closes odoo/odoo#106482

X-original-commit: b5aaf7b4ab78af29feab85066f4888d3cded018a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-11-25 15:56:44 +01:00
niyasraphy 356a8ed6cd [FIX] stock: mark as to do button visibility
closes odoo/odoo#103990

X-original-commit: 3c9e1190116011afdb712dadc3866bd150612456
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-25 13:14:04 +01:00
JF Aubert d55e6cca06 [IMP] mrp: adapt workorder gantt view
Adapt workorder gantt view to show blocked slots and summed times.

closes odoo/odoo#100350

Task: 2444754
Related: odoo/enterprise#31410
Signed-off-by: Steve Van Essche <svs@odoo.com>
2022-11-25 13:13:59 +01:00
tsm-odoo 2b9a901b99 [FIX] bus: prevent crash of presence service for cross origin iframes
Before this PR, the presence service would crash on cross-origin
iframes. This is due to the fact that accessing the parent document
of a cross origin iframe is forbidden for security concerns.

This error was introduced when trying to synchronize the website iframe
and the window focus state in #102479.

This PR fixes the issue by catching the error and fallbacking to the old
behavior given than task-3006023 has been fixed by #53143 anyway.

task-3073242

closes odoo/odoo#106499

X-original-commit: 7210c50df89dce68a554c6d685c33ce74e09d30c
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-11-25 10:52:21 +01:00
Yolann Sabaux 3d19d7dcd6 [FIX] barcodes_gs1_nomenclature: access record with portal
Steps to reproduce:
(Activate Project, Timesheets, Sales, and Inventory)
- connect with portal
- open Projects
- try to open project "AGR - S00021 - Sales Order"

Issue:
Access Error

Cause:
We want to access to the field "is_gs1_nomenclature" for which Portal has no access.

Note:
On the main Runbot (all apps) it does work because the subcontractin_portal adds the Barcode Nomenclature access to Portal user

opw-3073064

closes odoo/odoo#106493

X-original-commit: e0fec5af209229546061c70509c834bb28dd1336
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-11-25 10:52:12 +01:00
vishal padhiyar 1488a35c61 [FIX] web_editor: impossible to add signature at some times
Before this commit:

When we try to add signature from powerbox then sometimes it does not show
the signature.

After this commit:

Now when we try to add signature from powerbox then it will show the signature.

Task-2939080

closes odoo/odoo#106490

X-original-commit: 7d5f61abf8076ff77543844f6355907118e3729d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-25 10:52:10 +01:00
vishal padhiyar ff366852fe [FIX] web_editor: remove copy paste unwanted newline
Before this commit:

- When you try to paste text beside a text which is in code formate it
  puts the new text in new line with smaller font.

- When we try to paste text in code formate in new line then it will
  give a blank space below the pasted text

After this commit:

- when you try to paste text beside a text which is in code formate it
  puts the pasted text in new line with original fontsize.

- When we paste the text in code formate in new line then it will not give
  a empty line below it,

Task-2683455

closes odoo/odoo#106488

X-original-commit: bf7835e80ffa70236dca4b4b8fb4edb45d42f46a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-25 10:52:07 +01:00
Loan (lse) 05348b8b03 [FIX] pos_adyen: JS error in loop if deleted Adyen payment line
Before this commit:
 If we remove a payment line using an Adyen payment method,
 `pending_adyen_line()` return `undefined`.
 With the `_poll_for_response` still being executed,
 it will pop some JS traceback each call with:
 ```js
 TypeError: Cannot read properties of undefined (reading 'terminalServiceId')
 ```

After this commit:
 No JS traceback loop

OPW-3032391

closes odoo/odoo#106470

X-original-commit: 52a517ca74e563a0ad5538e8a7fc1fe19528856c
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-11-25 10:52:01 +01:00
Loan (lse) 874938d3ba [FIX] web: Typo in JS parameter name
Before this commit:
 In the bottom of the settings, it would show:
 `Database expiration: Invalid Datetime` if
 the `database.expiration_date` system parameter
 value is set.

After this commit:
 The date is displayed correctly

OPW-3047586
OPW-3072884

closes odoo/odoo#106497

X-original-commit: 9f59129f5281894799dfdb0fcd296d2d52823e12
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-11-25 09:53:30 +01:00
Valentin Vallaeys (vava) 01843ebca8 [FIX] payment_*: fix supported currencies for providers
*: asiapay, flutterwave and mercado_pago.

Wrong numerical code for USD in Asiapay.

Remove unsupported currencies for Flutterwave (ARS, BRL, CVE, CDF, GMD, LRD, MXN, MZN, SOL, ZMK).

Add supported currencies for Mercado Pago (BOB, EUR).

Reorder currencies from support page list.

closes odoo/odoo#106496

X-original-commit: 4ddb8a9082897b9dbf413392620ddaa06897c328
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2022-11-25 09:53:27 +01:00
Bassirou Ndaw 44333e00ca [CLA] signature for Ergobit
closes odoo/odoo#106494

X-original-commit: 455c7e776570b7af54f123d701e7db1323abc500
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-25 09:53:25 +01:00
Arthur Detroux (ard) ebfbfdac0e [FIX] website: prevent CTRL-K from focusing on browser's URL bar
Ever since the website is previewed in the iframe [1], pressing CTRL-K
(or Meta-K on macOS)  while previewing the website can result in
focusing on the browser's URL bar on top of summoning the command
palette.

Steps to reproduce:
- Preview the website
- Click on the iframe to focus on it
- Press CTRL|Meta - K
- URL bar is focused

This commit fixes that by preventing the default behaviour within the
iframe and only summon the command palette.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-3035637

closes odoo/odoo#106483

X-original-commit: 797a0514b58a37efc5246a655339353c200b4214
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2022-11-25 09:53:16 +01:00
clesgow 258ac595a0 [FIX] purchase_requisition: Compare product lines
Steps to reproduce:
- Create a product with both MTO and Buy routes.
- Create a Sale Order containing this product.
- On the created PO, go to Alternatives -> Create Alternative and select
another vendor.
- Go back to the original Sale Order
- Click on the linked Purchase Order
- Go to Alternatives -> Compare Product Lines

When doing this, the `active_id` in the context is the id of the Sale
Order, which raises an issue in the renderer for this list as it's using
the active_id as if it was the Purchase Order.

closes odoo/odoo#106481

X-original-commit: 1b904ece76f55f8e416d868256720f41cba8ceb1
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-11-25 09:53:13 +01:00
clesgow 3604bb93ff [IMP] stock: Add product category groupby for inventory adjustment
Add a group by product categories in the stock.quant.

Part of task-2985735

closes odoo/odoo#106479

X-original-commit: ad5382ac45277d6b058fbcac78ac637f30bc8392
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-11-25 09:53:11 +01:00
Dylan Kiss (dyki) 5a6404a3a6 [FIX] l10n_au: adapt taxes, tax groups and terms
This change fixes some (redundant) taxes, tax groups and specific terms for Australia.

[task-2989002](https://www.odoo.com/web#id=2989002&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106194

X-original-commit: afb9539d3b900b25871d9b34aa41ede3f1337648
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2022-11-25 09:53:08 +01:00
niyasraphy 802505ad85 [FIX] gamification: fix form view display
Display goal description and definition field full width. Purpose is to have
well aligned fields, using v16 new rendering options.

closes odoo/odoo#106489

X-original-commit: e676d88ef5e6601f8e986ee25f99395907b8d2aa
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-25 08:52:07 +01:00
amdi-odoo 5f53847b29 [IMP] Survey: add search by quickcode
Allow users to search by live session code without
taking extra space in the UI. The live session code
search is hidden under the Survey name search.

Task-3067507

closes odoo/odoo#105847

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-25 08:52:04 +01:00
Julien Van Roy cadef9c309 [FIX] account_edi_ubl_cii: prevent translating some tags
Some tags in Factur-X are translated (for instance: 'INVOICE' becomes 'FACTURE')
and thus break the compliance tests of PDFA/3.
Also prevent translating 'VAT' into 'TVA' because it breaks the factur-x/UBL
tests.

task-3077791

closes odoo/odoo#106467

X-original-commit: 9cc535f9515414fd1140f163c3b2269e273fd8f1
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-11-25 06:40:04 +01:00
Brice bib Bartoletti 55f1a6ecd7 [FIX] account,pos,stock_account:add/update indexes
1) forward-port of this PR: https://github.com/odoo/odoo/pull/97000
   commit: c9209664ce3a4b10142bba4da6afb912afc983c2

2) use btree_not_null instead of simple btree for space optimisation

closes odoo/odoo#106484

X-original-commit: b743e736f764fd7d6e232d2c8eaf6b2e314c5f31
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2022-11-24 23:18:44 +01:00
Aurélien (avd) 875244b08e [FIX] res_currency: add order by to _select_companies_rates query
PG12 introduced an optimization for CTEs that automatically inlines
CTEs if they are only refered once in the parent query. Prior to that
CTEs were always materialzed, meaning that PG created a sort of temp
table on the fly to store the result of the CTE's evaluation.

Whereas this leads to performance improvements in general, in the
particular case of _select_companies_rates this inlining becomes a
performance bottleneck. This is because while the currency_rate CTE
is only refered once in both purchase_report and product_margin,
the join condition (cr.date_end is null or cr.date_end > ...)
requires evaluating the CTE's date_end subquery twice. This, combined
with the fact that in PG12 the planner goes for a Nested Loop JOIN instead
of a HASH Join in PG10 makes the performances of the whole query
much worse in PG12 than in PG10.

Adding MATERIALIZED before the CTE definition forces PG to evaluate the
subquery first using its own plan. This removes the need to rescan the
subquery each time the Merge JOIN filter has to be applied, which
is a good strategy in this specific situation.

Examples of query timings change before and after PR:

Number of POs | Before PR | After PR
      2000    |     7s    |    345ms
      7000    |     23s   |    1.1s

opw-2930578

closes odoo/odoo#106100

X-original-commit: c4d841e81904745a24669e1a05f0d21ca7f2c85d
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Van Delft Aurélien (avd) <avd@odoo.com>
2022-11-24 21:54:48 +01:00
Maruan Aguerdouh (magm) c415889f78 [FIX] account: bank journal not showing as payment option when unvailable
Steps to reproduce:

-Go to Journals > Bank journal > Remove all Incoming Payments
-Try to pay for an invoice
-The Bank journal will still appear

Issue:

Bank journal should not be an option if it doesn't have Incoming
Payments.

Solution:

We need to add the proper filter for journals in the default_domain in
order to not get the bank journal when it is not available.

This bug affects all versions from 15.2 until 16.

opw-3027346

closes odoo/odoo#106471

X-original-commit: 119676029b929512179a337f0f3b70837a5c2b37
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-24 19:25:29 +01:00
arsi 42859bed9c [FIX] account_taxcloud: change display_type filter
Traceback when computing taxes using TaxCloud.

Steps to reproduce:
-Activate TaxCloud in accounting settings, with valids "API ID" and
 "API KEY".
-Create an invoice for a USA customer with an invoice line and
 "Fiscal Position" set to "Automatic Tax Mapping (TaxCloud)" (in the
 "Other Info" tab).
-Confirm
-->Traceback

Traceback:
File
"/src/enterprise/16.0/account_taxcloud/models/taxcloud_request.py",
line 136, in get_all_taxes_values
for item in response.CartItemsResponse.CartItemResponse:
AttributeError: 'NoneType' object has no attribute 'CartItemResponse

Explanation:
-There's a traceback when CartItem is empty (like if there are no move
 lines).
-It is empty because of the filter in the function
 '_process_lines(self, lines)'.
 --> 'lines.filtered(lambda l: not l.display_type)'.
-The goal is to take only move lines that are not Notes or Sections.
-This worked in v15 because display_type was defined as:

    display_type = fields.Selection([
            ('line_section', 'Section'),
            ('line_note', 'Note'),
        ], default=False, help="Technical field for UX purpose.")

-But now in v16 it is defined as:

    display_type = fields.Selection(
            selection=[
                ('product', 'Product'),
                ('cogs', 'Cost of Goods Sold'),
                ('tax', 'Tax'),
                ('rounding', "Rounding"),
                ('payment_term', 'Payment Term'),
                ('line_section', 'Section'),
                ('line_note', 'Note'),
                ('epd', 'Early Payment Discount'),
            ],
            compute='_compute_display_type', store=True, readonly=False,
            precompute=True, required=True,
        )

-The display_type=False does not corresponds anymore to move lines
 that are not Sections or Notes, but it corresponds to no move lines at
 all.

The fix:
 Will filter move lines that are not of type 'line_section' or
 'line_note'.

Discussion:
 Do I fix the traceback that we get when there a no move lines?  This
 'issue' is present since at least v14 and it seems like nobody ever
 complained.

+:
 I've applied the similar change to some lines in the code that also
 check if 'display_type' is False for some 'account.move.line' records.

++:
 The fix revealed an other issue in the function
  '_inter_company_create_invoices' of the file
  enterprise/account_inter_company_rules/models/account_move.py:
  There's a call on a function that doesn't exist anymore
  'line._set_price_and_tax_after_fpos()'.  I've deleted the line.

opw-3064174

closes odoo/odoo#106452

X-original-commit: 8bfca5832adaf9e147f2443d0bf56cf921f9ff0c
Related: odoo/enterprise#34352
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-24 19:25:21 +01:00
Alexandre Kühn 3e0f44af37 [FIX] mail:tests: same current partner/user in pyEnv and user service
Before this commit, pyEnv.currentPartnerId and pyEnv.currentUserId
were not properly sync with userService.

This is not a big deal with current tests in discuss, as they do not
rely on userService. However, any test that do will likely fail.

This commit fixes the issue by imposing the `partnerId` and `userId`
in userService to the same as used in `pyEnv`.

We don't do the other way, because we must know the partner and user
before making the `env`, so at the time of creation of `pyEnv` from
`startServer`.

closes odoo/odoo#106446

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-24 19:25:19 +01:00
Aurélien Warnon bb58fdacba [FIX] base: allow user to modify its own preferences
The res.users model functions a bit uniquely since it should allow a user to
modify their own parameters but turns off model edition priviledges by default.
See "SELF_WRITEABLE_FIELDS".

This implies that ir_ui_view#_postprocess_access_rights method will by default
turn off record edition, by automatically adding a 'edit="false"' attribute on
the form node when the frontend calls 'get_views'.

This will in turn prevent the user from modifying its preferences as it will
set the form view in readonly mode.
(It was apparently ignored pre-OWL, hence why we only have this issue now).

To fix the issue, we force the edition by manually setting 'edit="1"' on our
"view_users_form_simple_modif" form.
Allowing the end-user to modify their own settings again.

A tour was added to ensure this behavior.
Note that tour steps need to be adapted in the 'hr' module, as this module
changes the flow of modifying user preferences.

Task-3067001

closes odoo/odoo#106440

X-original-commit: 490d480458590c205962c3f9b95a63790a59f4d3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-11-24 19:25:16 +01:00
qsm-odoo d49200feca [REF] website, *: remove (deprecated) $target uses in public widgets
*: auth_totp_portal, mail_group, portal, survey, web, website_event,
   website_event_track, website_mail, website_mail_group,
   website_mass_mailing, website_payment, website_sale

Although this is deprecated since 5 years with [1], new occurrences of
`this.$target` in widgets kept being introduced. `this.$el` can be used
just like in any other widget, or even better: `this.el` to not rely on
jQuery.

For now, this still keeps the definition. This just removes the bad uses
to prevent more copy/paste... let's delay the decision to remove the
definition entirely to another day.

[1]: https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8

closes odoo/odoo#106437

Related: odoo/design-themes#618
Related: odoo/enterprise#34343
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-24 19:25:14 +01:00
Demesmaeker 05a8f79b46 [IMP] payment, *: better handle company mismatches
Rather than hiding all payment providers and payment tokens from the
payment form, a warning is now shown to the user if their company is
not the same as that of the document (SO, invoice, ...) they're paying
for.

task-2983985

closes odoo/odoo#100375

Related: odoo/enterprise#31424
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-11-24 19:24:57 +01:00
Pierre Rousseau 27945f44cc [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/277a39f7 [IMP] chart: smart chart 2.0 at chart insertion
https://github.com/odoo/o-spreadsheet/commit/12b66acb [IMP] Helpers: export `isDefined`
https://github.com/odoo/o-spreadsheet/commit/ae0e8d9e [FIX] selection: Altering selection should scroll the viewport
https://github.com/odoo/o-spreadsheet/commit/fbf3155d [FIX] cell overflow: align left with merges
https://github.com/odoo/o-spreadsheet/commit/028c38ec [REF] models: separate ui plugins in three concepts
https://github.com/odoo/o-spreadsheet/commit/13f1975c [FIX] format: translate content

closes odoo/odoo#106389

Related: odoo/enterprise#34327
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-11-24 18:22:42 +01:00
vishal padhiyar 12f2cd2d34 [FIX] web_editor: stuck after manual link creation
Before this commit:

When we try to create link manually and try to press enter cursor gets stuck.

After this commit:

Now when we create link manually and press enter cursor moves to next line.

Task-2745129

closes odoo/odoo#105968

X-original-commit: 4d14fa559b2ffcb768fa0a0a42b9b9eb2703a050
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-24 17:23:40 +01:00
William Henrotin b39f37153c [FIX] stock_account: open layer form from list
Since e4988b70ab, the record openned from the stock valuation layer
list view will depend on the stock move parent's document. If, the move
has a picking_id set, the record will be the stock picking.

This implies in some cases (a stock move linked to a picking or a
manufacturing order) we cannot access the stock valuation form view and
thus the accounting entries are not reachable from there.

This commit adds a button in the list view to open the layer form view.

closes odoo/odoo#106398

X-original-commit: d5162f814f4d1181e2063f788b7933ce84a32b7c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-24 15:31:55 +01:00
niyasraphy 8c9fdafff5 [FIX] mail: channel/partner create error
closes odoo/odoo#106370

X-original-commit: e998b2c5d31ad0e601ed4d5e0439b999872627b8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-24 15:31:53 +01:00
Nicolas Martinelli 7b6921fb0e [FIX] account: do not call button_install is not necessary
If the method `_auto_install_l10n` is called programmatically on a DB
where the localization has already been installed, useless processing is
performed by `button_install`.

Do not call this method if no module need to be installed.

closes odoo/odoo#106419

X-original-commit: 11e9d3f1a9e8c85fa85a86f0a63935250552a19f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2022-11-24 14:33:00 +01:00
Thomas Lefebvre (thle) bd235e57cc [FIX] base, contact: add conditions in Set Defaults form
Version: only V16.0 (will be improve in future versions)

Steps to reproduce:
    - install the "contacts" module;
    - go to a contact;
    - go to the "Set Defaults" tab (in the debug menu).

Issue:
    There is no field that allows you to select the condition.

Cause:
    The function `getConditions` needs the `change_default` attribute of the field.

Solution:
    Add the `change_default` attribute to the list which is returned by the `_get_view_field_attributes` function.

opw-3079328

closes odoo/odoo#106410

X-original-commit: 07315bee24f69e2b9a1004d33eab842a8929709d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-11-24 13:29:05 +01:00
niyasraphy c23bbf30c8 [FIX] base: country form oe_button_box alignment
closes odoo/odoo#106409

X-original-commit: c7f1bb1882ab254e1e1cc74b014ce99408203e9f
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-11-24 13:29:03 +01:00
Nshimiyimana Séna 445d4cd97c [FIX] web_editor: fix codeview toggle
### Steps to reproduce
* Enable Dev mode
* Open an email template
* Open Code View of the template
* Click the green button in the top right corner of the content box

You should be met with a traceback.

opw-3045759

closes odoo/odoo#106408

X-original-commit: 01fb9cab941d9055efbeac738490fe53a91ceccf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-24 13:29:00 +01:00
maximilien(malb) a24e3de28c [FIX] account: coa kanban bug
Before this PR, going to the coa in kanban view was broken with an infinite white screen. The error was that the template tried to display the account type and without the .value is resulted in an owl error.
It's now corrected, we can now access the kanban view of the COA.

I also changed a bit the size of column so that the name of the account stay a maximum in one line

closes odoo/odoo#106391

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-11-24 13:28:57 +01:00
Ivan Yelizariev 0339a506f8 [REM] base,web: delete menu Apps Store, Updates
Those menus are supposed to be integrations with apps.odoo.com, but it doens't
work and not maintained.

Existing menus that open apps store links should be enough:

* Apps >> Apps >> Theme Store --> https://apps.odoo.com/apps/themes
* Apps >> Apps >> Third-Part Apps --> https://apps.odoo.com/apps/modules

---

close #72902
close #74602

closes odoo/odoo#106379

Related: odoo/enterprise#34324
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-24 13:28:55 +01:00
Kartik Chavda a8cf155ddc [FIX] hr_timesheet,repair: fix field width issue
Before this commit field width was not as expected because
its label defined in container(Ex: div,span)

This commit fix field width issue by giving o_td_label class
to container of label to properly compute its width

task-3032518

closes odoo/odoo#106336

X-original-commit: 41b354f3edf7fc77162a59613ccafc0b9b9066a0
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-24 13:28:50 +01:00
Morgane (morm) bcc7b5ba08 [IMP] website: new content modal blog icon
Prior to this commit, the icon to create a blog post in the new content
modal, inside the website "+ new", was not really fitting.

task-2941545

closes odoo/odoo#106269

Signed-off-by: Delacroix Pierre (pde) <pde@odoo.com>
2022-11-24 13:28:47 +01:00
Florent de Labarre 1f3cda12bd [IMP] base: remove unused index
On database with 5 million attachaments, the index of checksum is 250 Mo, but this field is never used to search.

closes odoo/odoo#106253

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-24 13:28:44 +01:00
Adrien Widart (awt) b603cde02d [FIX] delivery: hide useless length UoM
The dimensions UoM of the carrier packaging is useless: it is not the
one used in the requests and there is not any conversion

To reproduce the issue
(Need delivery_fedex. Use demo data. Enable debug mode)
1. In Shipping Methods, edit 'Fedex US':
    - Package Weight Unit: KG
    - Debug Requests: True
2. Edit its Fedex Package Type:
    - Height: 1m
    - Width: 1m
    - Length: 1m
    - Package Code: YOUR_PACKAGING
3. Create a SO with a US partner and one product
4. On the SO
    - Add Shipping
    - Select 'Fedex US'
    - Click on 'Get Rate'
5. In Logging, open the request sent

Error: the dimensions of the packaging are expressed with "CM" but they
are not converted:
```xml
<ns0:Dimensions>
	<ns0:Length>1</ns0:Length>
	<ns0:Width>1</ns0:Width>
	<ns0:Height>1</ns0:Height>
	<ns0:Units>CM</ns0:Units>
</ns0:Dimensions>
```

When encoding the packaging in the request, the UoM defined on the
packaging (meter) is ignored. Instead, we define a length UoM depending
on the UoM of the weight and we don't convert any dimension:
https://github.com/odoo/enterprise/blob/e4fd13a0e073b9855864b7fabc26bc05b9a5fd19/delivery_fedex/models/fedex_request.py#L172-L178
There is even a `TODO` about the issue.

It will be the same with the other carriers. For instance, with UPS:
https://github.com/odoo/enterprise/blob/c9899f7860cd19c86f215d6dcea89f73b51433f3/delivery_ups/models/ups_request.py#L98-L102
We use the UoM of `ups_package_dimension_unit` and do not convert the
dimensions.

We can't implement the dimensions conversion on stable versions, since
it will break all existing packagings. So, as temporary solution, we can
simply hide the useless UoM defined on the packagings.

OPW-3053048

closes odoo/odoo#106338

X-original-commit: 3bc2f594395a08515ed362e3d9a816e7cc18c842
Related: odoo/enterprise#34305
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-24 12:26:06 +01:00
Denis Ledoux 141852dc66 [IMP] mail: hide Unread messages filter for email notification users
The goal of this revision is to add a group
`mail.group_mail_notification_type_inbox` which is granted
automatically when the user `notification_type` is set to `Inbox`
to be able to easily hide the filter `Unread messages` when
the user uses the `Email` notification type,
by simply adding `groups="mail.group_mail_notification_type_inbox"`
on the filter rather than overriding `_get_view` in every model.

The code overriding `_get_view` of `project.task`
to hide the filter "Unread messages" replaced
in this revision initially comes from
odoo/odoo@da868d28e2

> - In project.task search View:
>   - the filter for unread messages should be visible only if the current user
>     managing his notifications in Odoo

The above revision was part of the task 2844212

closes odoo/odoo#104328

Related: odoo/enterprise#33338
Related: odoo/upgrade#3996
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-11-24 12:26:01 +01:00
Romain Estievenart 72440e016c [FIX] web: text header appears over the text kanban card
Scrolling inside a grouped kanban with a lot of cards on a column
makes the text header appear over the kanban card due to the missing
background.

Steps to reproduce :
- Open Helpdesk on small screen like a mobile
- Open VIP Support
- Made a Group by "Create date => day" (there should be enough cards on
  a column to scroll)
- Scrolling the column => bug, the text header appears over the kanban
  card

closes odoo/odoo#106368

X-original-commit: 041fddf0c884ae9a6e2b040decfb1f31e9d25a29
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-11-24 11:08:42 +01:00
Arthur Detroux (ard)andqsm-odoo 0a83f41d59 [FIX] web_editor, website: improve perf of color previews
Follow-up of [1].

After [2], color previews on the side panel would be changed by the
wysiwyg adapter. The adapter would add each block individually inside
the iframe and check its current styling to then add the style to the
color preview elements. This was performed many times (as color palettes
all have their own individual rendering of the color previews)
and slowed down the editor.

This commit improves that by relying on the copied variables introduced
at [3]. This removes the "re-render" of the color preview elements,
instead relying on styling rules and CSS variables which are initialized
when the editor is started.

[1]: https://github.com/odoo-dev/odoo/pull/1149#discussion_r900120846
[2]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
[3]: https://github.com/odoo/odoo/commit/a396f791da94d064d58cce15892e74f45d29b7b7

closes odoo/odoo#106366

X-original-commit: 7f5a9d040348048990b25c271875c77d2c314e4d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-11-24 11:08:39 +01:00
Ivan Yelizariev 0c8e158393 [FIX] web: fix error on creating new record with ref field
STEPS:
* Open ``Settings >> External Identifiers``
* Click `[Create]`

Patch in `getValue` fixes js error:

> Caused by: TypeError: Cannot read properties of undefined (reading 'model')

Patch in `onWillUpdateProps` fixes infinite loop

task-3047190
opw-3056362

closes odoo/odoo#106195

X-original-commit: 92c4f55e341437b20f9320eded0baaa44628fb25
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-11-24 11:08:36 +01:00
Touati Djamel (otd) 8daffdd16a [FIX] mrp, sale_mrp: always use BOM UoM on Replenishment
Steps to reproduce the bug:
- Create a storable product “P1”:
    - route: MTO + manufacture
    - uom: unit
    - BOM:
        - qty: 1 dozen
        - component: 12 units of “C1”
- Create a SO:
    - Product: 12 unit of “p1”
    - uom: unit
    - Confirm the SO

Problem:
The UOM set on the product is used instead of the BOM UoM on the created
manufacturing order.

wrong MO:
    - 12 unit of "P1"
expcted MO:
    - 1 dozen of "P1"

opw-3048190

closes odoo/odoo#106351

X-original-commit: 8c5fb8b71538462422c8f166b772b5e316ecd6b5
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-11-24 10:02:53 +01:00
Andrea Grazioso (agr-odoo) f0d1bcd816 [FIX] account, account_sequence: psycopg2 errors class missing
Traceback when starting odoo server
ImportError: cannot import name 'errors' from 'psycopg2'

Exception management update in commit
4b430f8e30efb15f06982e4673cd73531a2119b3
would require psycopg2 version 2.8 minimum but version in
requirements is 2.7.7

closes odoo/odoo#106369

X-original-commit: b21fdf115e855d2383603e67343012bfe346cfd9
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-23 21:56:09 +01:00
aliya 97c1fbc18b [FIX] account: bill date rather than accounting
We should always use `invoice_date` instead of the `date` of the move for currency exchange.
Re-adding some of the changes from odoo/odoo#87984

task-2807136

closes odoo/odoo#106367

X-original-commit: 76a640d05a350840bdde1c88bd052251aabd6b12
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-23 21:56:04 +01:00
Audric Onockx (auon) 4fe0ce8460 [FIX] hr_timesheet: uninstall project's 'timesheet' config
Steps :
Go to project > settings.
Check 'timesheet' config and save.
Uncheck it back and save.

Issue :
See errors in the logs, due to on delete restrict.

Cause :
Record 'hr_timesheet.internal_project_default_stage' from data
is deleted when hr_timesheet is uninstalled.
Yet some project task records still use it, so we can't delete it.

Fix :
Delete the corresponding ir.model.data to keep the stage,
but unlink it from the 'hr_timesheet.internal_project_default_stage' ref.

task-2998416

closes odoo/odoo#106354

X-original-commit: c9e49358111521c042dd793f80ff99895d0fd179
Related: odoo/enterprise#34317
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-23 19:59:59 +01:00
Alexandre Kühn e9bf6d732a [FIX] mail:tests: channel fetch preview filter no last_message
MockServer behaviour on fetching channel preview was different from
server. Thankfully no test rely on this slight behabiour, but it's
important to ensure same behaviour for future tests.

closes odoo/odoo#106357

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-23 18:15:50 +01:00