Issue: In the MO view, the src location for components was editable and
the dest location for byproducts was editable when neither of these
should be.
Due to the same field appearing twice in the same x2many field list,
there were 2 issues:
1. something changed (probably during OWL refactoring) that made it so
the 2nd invisible field instance of the field was overriding the
"readonly='1'" property of the 1st instance when it was in the view
(i.e. when multi-locations is active) [in previous versions this did
not happen]
2. because of the change by https://github.com/odoo/odoo/commit/168cbe66bee7824bdf389de5c6c680342e27bc6d
we ensure that these two required fields are always correctly set (to
the MO's values as per the default when multi-loc is active) when the
MO's moves are created.
Part of general bugfix task: 2985735
closesodoo/odoo#106542
X-original-commit: 1bb2c44d32e669a9b936da90cbd80721b2c897ef
Related: odoo/enterprise#34396
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
The fix in #106174 was not good.
The translation dialog cannot update not translated terms
the initial term value may be empty "" when the source and the translation are
the same at first. So, the source to for update_field_translations should be
const source = term.value ? term.value : term.source;
closesodoo/odoo#106528
X-original-commit: 1ed5ce6f16d32efc0c5ec4cead67b2d8a57f6c41
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Some updates to Kenya localization:
- Withholing taxes support
- Inventory Interim accounts are set by default when automatic valuation of stocks is used
- Default temporary account for POS
closesodoo/odoo#106527
Task: 3067646
X-original-commit: 8406484e6c463c5a4bc31f7febe5289fd26a9966
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
## Issues
- When the google and outlook sync plugins are not installed the admin user should see an option to install them from the calendar but other users should not see anything.
- The 'groups' guard would have prevented regular users from syncing their calendar at all if it had worked
- Users can get an obtuse error message if the administrator has not configured the installed sync modules
## Fix
- Replaces the 'groups' attribute in the calendar controller template with a t-if and a dynamic check as OWL doesn't process 'groups'.
- Update the structure of the calendar sync template to facilitate overriding the display conditions
- Update the inherits to override the display conditions and allow anyone to see the sync button once a module is installed
- Update the code that handles clicking 'sync' to throw the same error as it would have for other misconfigurations
task - 3056311
closesodoo/odoo#106517
Forward-port-of: odoo/odoo#105461
Related: odoo/enterprise#34382
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
## Issue
Currently if an administrator installs one of the sync modules but does
not set any credentials. If the user tries to sync their calendar
they are met with an error.
## Fix
Make sure they get a clear dialog explaining why they cannot sync.
task - 3056311
X-original-commit: 6ec6a3764c5e5460aa8a1cdfa228740606fdfe13
Part-of: odoo/odoo#106517
## Issue
Regular users were not able to see the sync button
used to sync with external calendar services even after
these services were configured
## Fix
Conditionally display the whole sync section until one of the
services is configured.
Override the display conditions when one of the relevant modules are
installed.
task - 3056311
X-original-commit: 29f820cfd421859a2b480725ba2a81a515509b88
Part-of: odoo/odoo#106517
Issue
When the google and outlook sync plugins are not installed the admin user should see an option to install them from the calendar but other users should not see anything.
Fix
This replaces the 'groups' attribute in the calendar controller template with a t-if and a dynamic check as OWL doesn't process 'groups'.
task - 3056311
X-original-commit: 4d5b7d4b5347c958f37b8f40e9edfae7cd78c2ca
Part-of: odoo/odoo#106517
The new get_views API inlines every subview into the main view in an effort to
optimize client/server communication.
In the situation:
```
<form>
<field name="my_one_to_many" />
</form>
```
The server algorithm will fetch kanban or list views to display that x2many and inline them
in the final arch that is sent to the client.
This commit aims at factorizing the code which does just that in order for studio (or other modules)
to be able to detect whether the subview it receives is "real" or inlined
closesodoo/odoo#106504
X-original-commit: fcf71e51e80b54d709ffbfc5639cc913746ac684
Related: odoo/enterprise#34376
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
We decided to make this list as feature and not application.
It allows any user in mode OneAppFree to use them without become an
Extra App.
List of apps impacted:
blog
forum
all payments acquirer
task-3062641
closesodoo/odoo#106487
X-original-commit: 8b1928b3ef0e098b193ac74084344eba5beac4db
Related: odoo/enterprise#34368
Signed-off-by: Thibault Francois <tfr@odoo.com>
When the bank journal is set to automated online synchronization, we
also want to be able to configure it when no online bank is set.
task-3043449
closesodoo/odoo#106189
Related: odoo/enterprise#34208
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Product configurators were migrated to Owl, but some legacy code was
kept as not urgent to migrate (not required to drop the compatibility
layer of views).
This commit focus on the 'matrix' (or grid) configurator.
task-3056594
closesodoo/odoo#105841
Related: odoo/enterprise#34401
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
Purpose of this commit to improve generic usage of project app.
So in this commit done the following changes:
- switch the id and the priority fields from place for task list view
- add a 'view sales order' button that should open the form view of the SO
linked to the SOL set on the milestone for milestone list view
- add a 'sales order' stat button that should open the form view of the SO
linked to the SOL set on the milestone for milestone form view
- add a 'done' option; represent it in purple in status field
- if there is only 1 assignee, display its name on the card instead of
1 assignee for project sharing kanban view
- add an 'all tasks' menu on the right of the 'my tasks' one
task-2917086
closesodoo/odoo#97669
Related: odoo/upgrade#3893
Related: odoo/enterprise#30195
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#106499
X-original-commit: 7210c50df89dce68a554c6d685c33ce74e09d30c
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
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
closesodoo/odoo#106493
X-original-commit: e0fec5af209229546061c70509c834bb28dd1336
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
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
closesodoo/odoo#106490
X-original-commit: 7d5f61abf8076ff77543844f6355907118e3729d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#106488
X-original-commit: bf7835e80ffa70236dca4b4b8fb4edb45d42f46a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#106470
X-original-commit: 52a517ca74e563a0ad5538e8a7fc1fe19528856c
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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
closesodoo/odoo#106497
X-original-commit: 9f59129f5281894799dfdb0fcd296d2d52823e12
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/odoo#106483
X-original-commit: 797a0514b58a37efc5246a655339353c200b4214
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
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.
closesodoo/odoo#106481
X-original-commit: 1b904ece76f55f8e416d868256720f41cba8ceb1
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Add a group by product categories in the stock.quant.
Part of task-2985735
closesodoo/odoo#106479
X-original-commit: ad5382ac45277d6b058fbcac78ac637f30bc8392
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Display goal description and definition field full width. Purpose is to have
well aligned fields, using v16 new rendering options.
closesodoo/odoo#106489
X-original-commit: e676d88ef5e6601f8e986ee25f99395907b8d2aa
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#105847
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#106467
X-original-commit: 9cc535f9515414fd1140f163c3b2269e273fd8f1
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
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
closesodoo/odoo#106484
X-original-commit: b743e736f764fd7d6e232d2c8eaf6b2e314c5f31
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#106471
X-original-commit: 119676029b929512179a337f0f3b70837a5c2b37
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#106452
X-original-commit: 8bfca5832adaf9e147f2443d0bf56cf921f9ff0c
Related: odoo/enterprise#34352
Signed-off-by: William André (wan) <wan@odoo.com>
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`.
closesodoo/odoo#106446
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/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>
*: 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/2972976962617d4b8a0113bae58c640ab41cdff8closesodoo/odoo#106437
Related: odoo/design-themes#618
Related: odoo/enterprise#34343
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#100375
Related: odoo/enterprise#31424
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
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
closesodoo/odoo#105968
X-original-commit: 4d14fa559b2ffcb768fa0a0a42b9b9eb2703a050
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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.
closesodoo/odoo#106398
X-original-commit: d5162f814f4d1181e2063f788b7933ce84a32b7c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
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.
closesodoo/odoo#106419
X-original-commit: 11e9d3f1a9e8c85fa85a86f0a63935250552a19f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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
closesodoo/odoo#106410
X-original-commit: 07315bee24f69e2b9a1004d33eab842a8929709d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
### 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
closesodoo/odoo#106408
X-original-commit: 01fb9cab941d9055efbeac738490fe53a91ceccf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#106391
Signed-off-by: Josse Colpaert <jco@odoo.com>