When accessing the job positions page, country is detected automatically
to filter only those jobs whose country match current one + the ones
available in any country. However, when job positions have no specific
country, they're being excluded due to the usage of an old API
(expecting relational fields as `None` when they're empty), so only
positions with country are being taken into account.
This commit fixes the above by expecting the correct value (an empty
recordset) when an address is not set.
closesodoo/odoo#95454
X-original-commit: 65a285124bc0833c511905719da1712b0c747e24
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
There are situations where a message view is re-used in a different context
where the isSquashed value has to change.
For example a message being starred could be squashed in its original thread but
not squashed in the starred box, leading to a crash before this fix.
closesodoo/odoo#95403
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit fixes the css rule for the class `o_kanban_attachment` that
was broken for owl kanban views since f795af0160ed7977d07041d1bb1923598df48320.
closesodoo/odoo#95444
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Before this commit, a form view with an empty button box would
produce a crash, in the ButtonBox component, because it assumed to
have slots. This commit prevents this from happening as we no
longer put a ButtonBox component in the template if there's nothing
in it.
closesodoo/odoo#95427
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Before this commit, the user could try to install a language without
specifying which language he wanted to install, resulting in a TB. This
commit forces to specify which language you want to install. The bug
appeared with this commit [1] which allows to install several languages
at the same time.
[1]: https://github.com/odoo/odoo/commit/47041f2d45915e2ed74c4317f9aafe3dfa840f0a
task-2878405
closesodoo/odoo#95426
X-original-commit: bc083e6616859d51364b90ad4d0c6f0d99e34631
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the context parameter "form_view_initial_mode" was
ignored by the form views, so that the form view would not be always
initialized in the appropriate mode.
closesodoo/odoo#95413
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Problem:
Have
- a slow network
- a kanban view grouped
then move a given record from a column to another twice quickly.
An error occurs.
This is due to the way the transaction system in kanban model works:
the first move done in the first transaction being not yet finished,
no other transaction can begin and an error is thrown.
Solution:
Subclass Error and catch the specific transaction error at the
appropriate time to cancel the second order.
Note that the problem does not occur in a not grouped kanban view
because the hook useSortable prevent asking again a resequencing via
a proper management of the class o_record_draggable. That class is also
used in the grouped case but a rendering of the kanban view takes place
possibly before the end of the transaction: the record is moved in any
case to the targeted column and moved back if the overall operation
fails for some reason.
closesodoo/odoo#95235
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: test_website
Issue: The url is cached and no longer depends on the url. This part
should not be cached.
closesodoo/odoo#95222
X-original-commit: 4b255ed129b0e458d3cf7f432d076913b14d5450
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Issue introduced by commit b0a2a41
The template's "flags" value was not in the t-nocache values to use when
rendering languages.
X-original-commit: 7827d2dbc1fbef3cc0dc898baa0af30ed1f23fca
Part-of: odoo/odoo#95222
Before this commit, the reference of a validation transaction followed
this format: “validation-20220222072710”, which did not match the
standard format for refund transactions (”R-S000001”). Moreover, some
providers limit the length of transaction references which forced us to
truncate the quite long reference.
With this commit, future validation transactions will have a reference of
the format: “V-20220222072710”.
task-2830826
closesodoo/odoo#94921
Related: odoo/enterprise#29076
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Currently, in demo data (or data) of some surveys, there are records of
'survey.question' having 'is_page' field value as true and 'question_type'
is not defined. When question type is not defined, default value
'simple_choice' is assigned to the 'question_type' field. Now when we
create a live session of that survey and go to the page, it tries to read
the data for bar chart but data is not available (undefined) and the
traceback is thrown. This happens because question types 'simple_choice'
and 'multiple_choice') are expected to load a bar chart.
It used to work before commit[1] where default 'question_type' value was
being set to 'text_box' (so attempt to load bar chart was not made).
This commit improves the behavior by adapting data/demo data/test cases
and by adding a python constraint that prevents question creation of
page type if there is a question type set, and compute `question_type`
based on `is_page` field. Now that we have python constraint and a
compute method, we no longer need the `default_get` method, so it is
also removed.
commit[1] - https://github.com/odoo/odoo/commit/1fb99d79b1567d4c150dc07f309ce54a3beea8e3
taskID-2841582
closesodoo/odoo#93414
Related: odoo/enterprise#28305
Related: odoo/upgrade#3600
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit removes the unnecessary measures(like partner latitude/longitude)
from the lead related graph views. Also, we try to order the measures and keep
time related measures(Days to Assign, Days to Close, Exceeded Closing Days, etc)
first and revenue related measures(Expected Revenues, Prorated Revenues, etc)
last.
Note that with this commit, recurring revenue related measures will be displayed
only when the feature is activated.
ent PR: https://github.com/odoo/enterprise/pull/21981
Task-2674367
closesodoo/odoo#79167
Related: odoo/enterprise#21981
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Fixes 38bfbed
We cannot create a `set` from `None`
```
File "/home/odoo/src/odoo/15.0/addons/stock/models/stock_production_lot.py", line 225, in <listcomp>
delivery_ids.update(*[set(delivery_by_lot.get(lot_id)) for lot_id in (producing_move_lines.produce_line_ids.lot_id - next_lots).ids])
TypeError: 'NoneType' object is not iterable
```
Small optimization: no need to create a list that's immediately unpacked.
This error was detected during upgrades.
upg-360084
closesodoo/odoo#95398
X-original-commit: 1870ef4cf4c177846fce72325ff3f2fa97224417
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
Rewrite _find_delivery_ids_by_lot to reduce the number
of recursive calls by grouping the producing move lines
together before each recursive calls. This reduces
the number of search calls, speeding up the whole method.
Add a unittest to check if the delivery_ids field
of a lot recordset is properly computed.
opw-2824464
X-original-commit: e7b9f14d4a9ce4ed61451b24b567f751fb4bcbe2
Part-of: odoo/odoo#95398
In an x2many sub view, the attribute "force_save" on a field
indicates that the field value must be saved, even if the field is
readonly. Before this commit, this attribute was ignored by the
new views. In the BasicRelationalModal, we only needed to propagate
this attribute to the fieldsInfo given to the BasicModel. In the
RelationalModel, we needed to take the attribute into account.
closesodoo/odoo#95396
Signed-off-by: Géry Debongnie <ged@odoo.com>
During the wowl refactoring, the colorpicker field was converted into a
new field component and the colorlist that allows to pick the color was
extracted into a new component with its own style. While doing so, the
stylesheet for the color picker was reworked into the stylesheet of the
colorlist, which is ultimately what we want, but in the mean time, the
legacy colorpicker widget no longer has the style it needs to be
displayed properly. A partial fix was applied previously by resoring
part of the scss directly in the colorpicker field css which is a
mistake.
This commit simply restores the old colorpicker scss file so that the
legacy field displays properly and removes the parts of it that had been
copied over to the new color picker field.
closesodoo/odoo#95392
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Step to reproduce:
- Create a SO, save and confirm it
- Create an invoice, on edit mode, change the journal and click on save
Issue:
- If the invoice is the first one in the current month, a sequence
number is automatically assigned and an error is displaid.
forwardport of https://github.com/odoo/odoo/commit/b8328e45d526d276b5781da3523a0d5874da64bd
opw-2660571
opw-2879716
closesodoo/odoo#79084closesodoo/odoo#95386
X-original-commit: 7b296982139518460405fa63eca6774bd82ba7b1
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Minet Adrien (admi) <admi@odoo.com>
This commit adds the ability to pass a placeholder to all fields
containing an input.
This commit tests the ability to use a placeholder in all fields
containing an input.
closesodoo/odoo#95309
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In case we change the employee on an expense and in case expense has
sheet which has only one expense_line_ids, then changing the
expense.employee_id triggers changing the sheet.employee_id too.
In case there are more than one expense linked to the report, then we
unlink the expense line from sheet, (so that the user can create a new report).
task - 2890095
closesodoo/odoo#94424
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When a widget is detached form the DOM, we manually set the owl status of
the corresponding node to 0 (new), but we before this commit, we didn't reset it
to 1 (mounted) when the widget was re-attached. As a consequence, event handlers
were not bound anymore.
Steps to reproduce:
- Open Inventory
- Click on Products > Lots/Serial Numbers
- Open a product
- Click on the Traceability smart button
- Click on a reference (eg: Inventory Adjustment)
- Click on the Traceability Report breadcrumb
-> Breadcrumbs are not working anymore
opw-2838994
closesodoo/odoo#95375
X-original-commit: 7945f7c40045def5e46e8a2f91bdfcc3a42d9f78
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
If we use the auto-complete feature to add PO's lines to an bill or we select multiple PO's then use
'create bill' button, the generated invoice line will copy the sequence line from the PO's line. This
can lead to situation where we will have all the first lines of each PO then all the second, etc, ending
with a mix of all PO's in the bill.
Example:
Purchase order 1
- seq 10 line A
- seq 11 line B
- seq 12 line C
Purchase order 2
- seq 10 line A'
- seq 11 line B'
- seq 12 line C'
Invoice created from those PO's
- seq 10 PO1:line A
- seq 10 PO2:line A'
- seq 11 PO1:line B
- seq 11 PO2:line B'
- seq 12 PO1:line C
- seq 12 PO2:line C'
After this PR this PR the lines from the same PO's will be contiguous like:
Invoice created from those PO 1 and 2
- seq 10 PO1:line A
- seq 11 PO1:line B
- seq 12 PO1:line C
- seq 13 PO2:line A'
- seq 14 PO2:line B'
- seq 15 PO2:line C'
opw-2749682
closesodoo/odoo#95343
X-original-commit: cafe5c1aff1ca1632ce4924a6b027629c283a5e9
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Beckers Thomas (tbs) <tbs@odoo.com>
Rationale
Due to business decisions mass mailing themes are moved to community repository.
As some other moves are planned, notably coupon or mobile UI that are coming
to community repository, this makes sense to have mailing templates along
with the mobile UI.
Having a responsive and mailing-friendly mailing is now part of community
standards.
For any questions please refer to decision makers.
Task-2903948
closesodoo/odoo#95379
X-original-commit: 58ec2382e4e16ca8cff468a7d731d1de84df66ff
Related: odoo/enterprise#29142
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Complement of this commit 7d7c53edf714a07409316750b2b09deaa089a12d
because added records were missed during fw-port.
opw-2862296
opw-2877133
closesodoo/odoo#95374
X-original-commit: 0ec6629de721042ed215e0e011fe38daddccb0d5
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
Before this commit
There is an issue about the translatable field button not properly
shown.
A translatable field <input/> or <textarea/> should have a right padding
in order to ensure its text content does not go behind the translate
button.
After this commit
Existing style regarding this is reapplied.
Part-of: odoo/odoo#94952
Before this commit
On an empty kanban having a record in quick creation, if a user manage
to give the focus somewhere inside the bottom-left zone of the control
panel (or inside the searchview input) WITHOUT closing the form of the
record in quick creation, and then press the ArrowDown key on its
keyboard, a traceback appears.
How to reproduce?
- i.e. go to "Social Marketing > Campaigns"
- change the filter to show no records
- click on create
- make the record dirty BUT invalid (no value for the Responsible field)
- click on the search input
- press arrow down
- => traceback
After this commit
The traceback is not shown anymore because the kanban renderer makes a
safer check before trying to focus a kanban card.
Part-of: odoo/odoo#94952
Before this commit
When defining a view button in some view arch, the combination of its
class attribute with a `t-attf-class` is not correctly handled.
After this commit
This is fixed.
Part-of: odoo/odoo#94952
Before this commit
The view compiler and the kanban compiler both have code to handle
string interpolation.
After this commit
The code is reworked and factorized in a single place.
Part-of: odoo/odoo#94952
For the few remaining uses of the legacy kanban view, the utm addon
style wasn't applied.
This is due to the fact that the legacy kanban view does not have a
"o_kanban_renderer" class.
Part-of: odoo/odoo#94952
Before this commit
The quick create form view uses the new wowl form renderer, but
with the CSS style of the legacy form view.
This led to some issues, i.e. the width of some input fields
were ridiculously small.
After this commit
The quick create form view still uses the new form renderer, but with
the proper class "o_wowl_form_view" to ensure the proper style is
applied.
Part-of: odoo/odoo#94952
Since #91909, the settings form view is tested with different levels
of access rights, post install.
But when the test is run with only the base module, it crashes because
the settings view specified in base is empty, without any field.
On save, the test form reads the view fields, but read fallbacks on
all fields if no field is specified, and it breaks when we try to
compare the read results to the fields requested (empty).
This commit skips the read when no fields is present in the view.
closesodoo/odoo#95340
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
The urgentSave fix at f9d27d41 was broken by 9e02cec48.
Do not wait for the resolution of the cleanForSave promise to update
the internal value in case this happens during an urgentSave as the
beforeunload event does not play well with asynchronicity. It is
better to have a partially cleared value than to lose changes. When
this function is called outside of an urgentSave context, the full
cleaning is still awaited below and `_super` will reupdate the value.
Task-2861050
closesodoo/odoo#95336
X-original-commit: 0483a778a4032fe2264cfdd5f037834cfb903845
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Pasting a list within a list resulted in wrongly nested li elements
(<li><li>text</li></li>). This applies the same principles for pasting
lists within lists as were already applied for blocks within paragraphs.
task-2879892
closesodoo/odoo#95331
X-original-commit: 49058d63b7a8d03c9b6e323cac19b66bf542a5b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
This refactors the insertion loops in the insert command, in order to
make it more maintainable.
X-original-commit: cb87020ab4e893ca62a677c9104f16c3aa9938cf
Part-of: odoo/odoo#95331
Pasting blocks at the beginning of the editable pasted the content in
the wrong place (after the first node instead of before it).
task-2879892
X-original-commit: f810b11204a3e227d7ac98429f21b2ddf93de215
Part-of: odoo/odoo#95331
`.o-isInFormSheetBg` and `.o-aside` are mutually exclusive.
Part of task-2871070
closesodoo/odoo#95323
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Purpose of this commit to fix the UI in Manufacture app.
So, in this commit done following changes As suggested in Task:
- Able to expand next activity column of MO list view
- Added tooltip of default capacity field on work center
- Added quantity tooltip of BOM
TaskID - 2689994
closesodoo/odoo#95315
X-original-commit: 463a81eb325f624e8947f1b3444947f8ba1dc24b
Related: odoo/enterprise#29113
Signed-off-by: Tiffany Chang <tic@odoo.com>
Now the way of access to an action is using the method `_for_xml_id` of
the model `ir.actions.actions` and not reading the action itself because
they need the access of the group "Administration/Settings" which not
all the users have it, so we were having an error with users that have
the permissions to see MRP Picking Types but they didn't have the group
mentioned above.
closesodoo/odoo#95312
X-original-commit: 1554fc9f8a98f4723b4f3cc1a8c0bd772c317ce5
Signed-off-by: Tiffany Chang <tic@odoo.com>
Before this commit wire transfer was using this line to generate qr code
`payment_tx_id.acquirer_id.sudo().journal_id.bank_account_id.build_qr_code_base64`
But this is a problem has transfert doesn't use `journal_id`.
Instead we can use the bank_id of the company's partner_id.
opw-2855065
closesodoo/odoo#95279
X-original-commit: 15a5bc956ad865d4a6ebb001b5767a5009533782
Signed-off-by: William André (wan) <wan@odoo.com>
Commit [1] made a mistake of copy/pasting the "list_website_pages" ID in
two views related to the "search in everything" and "search in pages"
views (used when checking all results after a search using the "search"
snippet that you can configure to search in everything or in pages).
At the time, that ID induced some CSS rules and JS related to the page
manager (not made for visitors).
- For the "search in everything" page, both the CSS rules and JS had no
effect (except instantiating an useless widget in JS).
- For the "search in pages" page, the JS had no effect (except the same
instantiation of an useless widget) but the CSS had an impact on the
`<table>` used to display the results:
- The header used an hardcoded odoo-purple background color.
- The table paddings were not the ones defined by the theme.
Of course, in custos, more of the CSS could have had an impact (for
example some icons would use bootstrap blue info color by default for
no apparent reason).
Since [2], the page manager was removed (converted into a backend view)
so the CSS and JS rules actually became totally useless. The JS was
removed with [2] but the CSS was kept thinking it was necessary for the
"search in everything" and "search in pages" pages.
This commit removes the useless CSS and the useless ID in the two views.
It also modifies the "search in pages" layout a bit.
A fix could be made in stable later on to at least remove the hardcoded
odoo-purple background color in the "search in pages" page. The rest
should stay as per-stable policy.
[1]: https://github.com/odoo/odoo/commit/7559626c54e34b41e1549e28276a650accec6986
[2]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3bclosesodoo/odoo#95272
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Hide the 'Pay Now' button for invoices which transactions total amount
equals their total amount.
When the total amount of all transactions related to the invoice is
equal to or greater than the total amount of said invoice, the 'Pay Now'
button should no longer be displayed.
task-2527323
closesodoo/odoo#95262
X-original-commit: de81225d39e7951ea9a63e24bab3a0138a6942e3
Signed-off-by: Achraf <abz@odoo.com>
Correct "Status" position in the account_portal header
opw-2817794
X-original-commit: acf1003d46360bff23b605ccb77a44d099f1c1a8
Part-of: odoo/odoo#95262
Problem:
In a kanban view with progress bars, have
- a record with a false value for the progress bar field
- "muted" be the color of a progress bar field value different from false
a crash occurs.
This happens because no fallback is found for value = false in
findProgressValueFromRecord.
Solution:
Always add a bar for the value false (as it was the case before).
closesodoo/odoo#95215
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>