Before this commit, accessing parent in a button context broke the button
throwing `EvaluationError: Name 'parent' is not defined`.
to fix,the proxy object `params.evalContext` was passed to `evaluateExpr`
similar to examples seen in `list_renderer.js`
closesodoo/odoo#102293
X-original-commit: 90afb529969ce7de83a20060f5c35a64ce4cf971
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ahmed Khalaf <ahkh@odoo.com>
The import feature is using a `=` as the operator.
To reproduce:
Import a file like this
```
partner_id,journal_id,currency_id,date,invoice_line_ids/account,invoice_line_ids/name,invoice_line_ids/quantity,invoice_line_ids/price_unit,invoice_line_ids/taxes
Publiroute,Customer invoices,EUR,18/06/2021,700000,Prof services 05/2021,1,100,21%
```
In this case, the ORM would look for a tax with the name equal to `2%1`
instead of `21%`.
This of course valid for any other way of using the equality operator in
the domain.
closesodoo/odoo#104764
X-original-commit: af46d8a567215a07b18d00f7d513681d385a8e7b
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce, import and invoice containing one line with a tax of
i.e. `21%` on it.
Because the message is recursively expanded to follow the relation of
the field, the interpolation symbol needs to be escaped every time.
Otherwise the message will contain something like
> No matching record found for name '21%' in field '%(field)s/Taxes'
Where `'21%'` will try to be mistakenly interpolated.
X-original-commit: ceb3ce3030b47baa2aca128d364a823becb173ab
Part-of: odoo/odoo#104764
*: snailmail, website_livechat
This commit adds definition of component template
in the models. This allows not defining JS of component
for most view models.
Task-3053061
closesodoo/odoo#104641
Related: odoo/enterprise#33491
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, there was not visual separator between
end of emoji category bar and the rest of emoji picker header.
Task-3045141
closesodoo/odoo#104767
X-original-commit: d4b654c9322fd7c9f5a3bb94fa41d20fc5d8c998
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In this commit before, timesheets are not generated for approved time off. So we
have entered the timesheet regarding the approved time off.
task-2960247
closesodoo/odoo#103071
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Purpose
=======
Fix typo in the mail template data used for
a completed course.
Specifications
==============
Adding a 's' to 'Congratulation' on the template
subject.
Task-3026717
closesodoo/odoo#104737
X-original-commit: ea535166692ed95b3878717f3e003e23ce8c9fc5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The Race concurrency promise never settles if the first settled promise
rejects and therefore you can't catch the rejected promise.
closesodoo/odoo#104733
X-original-commit: 24cc8cdb440a5af944d82a25d98b0239e72e2625
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
O2MIdMapper Class inherit of 'base' Model to change the behavior of
`create`.
Because it is in base and the `_import_current_module` is set in
models.py, move it at the end of create in models.py.
closesodoo/odoo#99550
Related: odoo/enterprise#33063
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
- Deprecated `norecompute` (on Environment class) because it is useless
and do nothing.
- Deprecated `cache_restart` (`res.company`) because `clear_caches` do
the stuff.
- Deprecated `write_company_and_print_report` (`res.company`) because
since https://github.com/odoo/odoo/pull/33863/, it is unused
- Deprecated `open_company_edit_report` (`res.company`) because since
25f7040998, it is unused.
Part-of: odoo/odoo#99550
body field is required field in the model level and there is condition required attribute in the view level, this allows users to click send button with empty body.
closesodoo/odoo#104723
X-original-commit: b6cb09e8d4192b40623b72d8a9061061ff618476
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Bank statements import-specific fields are now displayed above the form because of the invisible bank_statements_source. Adding a group name on the form allows better inheriting.
task-3046427
closesodoo/odoo#104709
X-original-commit: 684567c4dc56c2379ba19cebec96e582287b37d1
Related: odoo/enterprise#33492
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
As in odoo#97378, the css isn't correctly applied to the extended
`upgrade_boolean` field.
Since its class is automatically set to `o_field_upgrade_boolean`, it
doesn't take the modifications made to `o_field_boolean`.
So we add `o_field_boolean` to its additionnalClasses.
Part of task-2985735
closesodoo/odoo#104708
X-original-commit: 06b99fe293bf6d3c9cd902501d9e221dfd2a70e7
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
This commit purpose is to fix the navigation in the project portal. When
a project is shared, the user can access all tasks of the project
from the project portal page, but when he select one task, he can not navigate from one task to another with
the previous and next button on the right of the header.
the commit :
* fix the previous and next button of the task page. When a task is
reached by pressing one of these buttons, the navigation is not
interrupted and the user can navigate through all the tasks of the
project without having to go back to the project page
task-3032785
closesodoo/odoo#104700
X-original-commit: 0b32d83baf0563360b858a470afc5c71fb996f84
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Loading an non-existing addon directory affect all other modules to be
not loaded. This commit makes sure the path exist before proceed to
explore all the modules under that directory.
closesodoo/odoo#104704
X-original-commit: d77d9f8a9ff945f5f61924eda835c877eb4f281c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Adds a new default income account for the exchange rate gain
- Changes the default stock output account
- Use anglo-saxon accounting by default
Task-2990419
Task-2988876
closesodoo/odoo#104699
X-original-commit: fc5fa681638b2af63a64fcd83cdf50df92bcd111
Signed-off-by: Josse Colpaert <jco@odoo.com>
**Issue:**
When a group contains more than 10k items, its pager only shows
10k as limit, even if the group already knows it's total count.
**Solution:**
We now allow creation of `DynamicRecordList` with 'countLimit' as
one of the params. It will be used in the instantiation of the
class but will default to WEB_SEARCH_READ_COUNT_LIMIT if not
provided. This way, pager's limit will be properly set to the
group's count.
closesodoo/odoo#104698
X-original-commit: 4751f85ac9d430528106de05bcdc484ae0c7079b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Revert this fix, as it was not working as expected, and even prevent to create a partner.
Revert of following PR: #103596closesodoo/odoo#104695
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Purpose
=======
Some models might use the properties field in the kanban view, some other no. For that purpose, we want to add an option in order to hide the "View In Kanban" checkbox in the properties definition.
Task-3012780
closesodoo/odoo#104252
Forward-port-of: odoo/odoo#102818
Related: odoo/enterprise#33292
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
We don't use the properties field in the leads kanban view.
Because of this, we want to hide the option "View In Kanban" in
the properties definition.
Task-3012780
X-original-commit: 8170e2aede666a4ab2b2395cc3c2d54a87e11cc1
Part-of: odoo/odoo#104252
Purpose
=======
We don't use the properties field in the tasks kanban view.
Because of this, we want to hide the option "View In Kanban" in
the properties definition.
Task-3012780
X-original-commit: 63fa07d38e51b261780cadb674ab035f8b15f58e
Part-of: odoo/odoo#104252
Purpose
=======
Some models might use the properties field in the kanban view, some
other no. For that purpose, we want to add an option in order to
hide the "View In Kanban" checkbox in the properties definition.
Task-3012780
X-original-commit: c6fcaa53683c470158e4661aec2575bd06ee3c1e
Part-of: odoo/odoo#104252
In the PR #97692, writing empty str `''` to a model term field no longer removes
all translations. Instead, only the translation for the current language is set
to empty str `''`.
Before this fix, if a web user sets a translation to emtpy str, and reopens
the translation dialog, the translation will be reverted to the 'en_US' value
which is wrong.
closesodoo/odoo#104181
X-original-commit: f97ff6308d472121e65a34d30b4dc5ab35065220
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
In the server action form, in state "code" ("execute python code") a linebreak is missing between the two "lines" of python, resulting in nonsensical code.
closesodoo/odoo#104682
Forward-port-of: odoo/odoo#104665
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
When you have orders that have paiement and not lines anymore they can
be removed from the local storage if the screen is refreshed.
That may lead to loss of paiements.
closesodoo/odoo#104363
X-original-commit: 49381e5f821368c0c4d6e20207ce7d51abbe8be0
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit, the arrows in the daterange picker to switch months
wasn't correctly displayed in light mode.
This visual bug was introduced due to styling changes made for
the dark-mode.
This commit fixes this.
closesodoo/odoo#104151
X-original-commit: caa5604fbf99f6cba763109e7c26fed6e2042642
Signed-off-by: Samuel Degueldre <sad@odoo.com>
As of now, if a user clicks on the "Save & New" button while the form is
not valid, it will disable all buttons without any options to make them
enabled again. The only solution then is to close the form and re-open
it.
Steps to reproduce:
Inventory -> Configuration -> Route -> Select any route -> Add a line to
the rules.
As soon as you click on the "Save & New" button and the form isn't
valid, you can't use any buttons anymore.
Part of task-2985735
closesodoo/odoo#102315
X-original-commit: 6d63d1035b28f2004774a99a7be84b92a1cb1883
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
Remove quick create from the places that is either not needed or not possible
Task #2850996closesodoo/odoo#104640
X-original-commit: ae0a11a8ce3c35542ba5ae8f6366018b88ec40d5
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pouya Malekinejad (poma) <poma@odoo.com>
Steps to reproduce:
- Install `l10n_ar_website_sale` module
- Go to shop (Argentinian website) and add a product to cart
- Open cart and click on checkout
- Click on Customize and disable `Show b2b fields` feature
Issue:
Fields are no more displayed.
Cause:
Since the b2b fields template (`address_b2b`) is customizable (meaning
it can be enabled/disabled), it is possible for all countries to
display/hide the b2b fields, but for some countries (for example
Argentina) it should not; the b2b fields should always be displayed.
Solution:
Add a method (`_display_partner_b2b_fields`) on website model to know
if b2b fields should be displayed: return True if `address_b2b` view
is active on current website or if the company (based on the country)
must display them.
Move content (b2b fields; vat and company name fields) of view
`address_b2b` in `address` main view and let the `address_b2b` only be
used as switch to display or hide the b2b fields.
Add a condition in `address` view to display b2b fields only if the
method `_display_partner_b2b_fields` returns `True`
opw-2941199
closesodoo/odoo#104505
X-original-commit: 1b5c85722db00a44ed8c6cb0c2bdba8905dc5292
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Steps to reproduce:
There is no possibility to reproduce it in test mode
But the flow would be:
- create a company with a NIF not registered
- Set up the EDI invoice
- Create an invoice
Issue:
When the NIF is not registered, is is possible to use it. It will only create an error `approbado con errores` which is apparently fine
Solution:
Whenever the server sent us an '1117' error code, we call again the post_invoice with a new context so we are able to send the request with the right information; that is, the correct ID Type whenever a NIF is not registered.
Indeed, whenever the error code is related to the NIF, is is possible to send again a request without having the invoice defined as "duplicated". It will only go through the process "AceptadoConErrores".
opw-2952108
closesodoo/odoo#104375
X-original-commit: 415d095cd418fd38d5749200724b6ce775ffa7f8
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Issue:
When visualizing the calendar event update mail template there is few
or no default data. Unlike the other calendar mail template there is
no signature.
opw-2968890
closesodoo/odoo#99386
Signed-off-by: Arnaud Joset <arj@odoo.com>
When a record was deleted, the related messages were removed in discuss
front-end but the message counter was not updated. This solves this issue.
Task-2960281
closesodoo/odoo#99371
Related: odoo/upgrade#3841
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
When a record was deleted, the related messages were remaining in discuss
front-end causing an error when the user was clicking on them. This solves the
problem by removing messages in the front-end as soon as they are deleted.
Task-2960281
Part-of: odoo/odoo#99371
Notify the user when added as follower by the mean chosen in his/her
preference (inbox/email) and not exclusively by email as before.
Task-2960281
Part-of: odoo/odoo#99371
New phones go up to 48MP (Samsung Galaxy A22).
Also the error message was saying 4.5 instead of 45.
opw-3020614, opw-3020502
Close#104424closesodoo/odoo#104546
X-original-commit: 8b19107c69c648dbfba2a9304c04f0f55aac4b46
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Commit ef1cadce3c58d702b9e63e2102b72172e45c486f introduced the
inventory_quantity_auto_apply field used in inventory report.
The stock.quant create method can return an existing record.
In inventory report, updating an existing record do the job.
But adding an already existing record to the list creates an inventory
adjustment with no visual clue that the adjustment has to be applied.
closesodoo/odoo#101894
Task: 2961768
X-original-commit: 1e07d8e2bfe3d4f5e07fed8e96226ab1fdbf390b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Jean-François Aubert <ajf@odoo.com>
Before this PR, the mail bot would have answered to every incoming
messages including system notifications. Answering to system
notifications makes no sense and leads to the answer being formatted
as a notification since the mail bot copies the message type of the
message being answered.
This PR fixes the issue by preventing the mail bot from answering
anything else than comments.
task-3044856
closesodoo/odoo#104636
X-original-commit: bb76e083d5adcc955967680c46b9cf2e39402783
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The domain of the datasources was not recomputed on the deletion of a
filter that impacted it. Furthermore, the issue was also present when a
client would UNDO/REDO some revisions.
Task 3002004
closesodoo/odoo#104630
X-original-commit: 3b63d8d592482b655a4273bf9d5d98de3992d26a
Related: odoo/enterprise#33468
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Previously, when copying a report with top-level aggregation lines that reference other top-level lines, the codes in the aggregation formula where not correctly replaced.
This commit solves the issue, so reports can be correctly copied.
closesodoo/odoo#104632
X-original-commit: 94a524a1be42e2128b291a2357a637ddef4cce6b
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
*: website_sale
Since [1], it was not possible to edit a company team snippet image
anymore as soon as the page was saved once. Indeed that commit added
o_not_editable/contenteditable="false" on the parent column to make sure
no text can be added in that column and contenteditable="true" on the
images so that they are still editable (even though HTML-specs-wise
adding contenteditable="true" on images probably does not mean much as
images are self-closing tags, our editor understand that as the ability
to edit the image anyway). That contenteditable="true" part is however
removed when leaving edit mode... and was not restored upon entering
edit mode again.
This fixes the problems with a specific JS patch, we'll review to see if
better can be done in master.
Funny enough, that bug was actually gone in 15.0... by mistake. A recent
bug fix actually reintroduced that isolated bug at [2] (by reintroducing
the fact that images in a non-editable environment are not possible to
edit). The 3 opened tickets this commit mentions were actually reported
for 15.0 immediately after that, while the 14.0 being broken about this
since the beginning apparently did not bother anyone.
Note: as a forward-ported fix, this also takes the opportunity to clean
a bit what was done at [3]. (calling `_super`, no duplicated code,
adding comments, ...).
[1]: https://github.com/odoo/odoo/commit/656cac1bf21c7c5a56aa569008aac58436c747fb
[2]: https://github.com/odoo/odoo/commit/e113bae04a64a8bd341a80736086ab7c25079dd3
[3]: https://github.com/odoo/odoo/commit/e2f7b8fad76dc816b2f6864340d3740446117cdb
opw-3031217
opw-3032482
opw-3035289
closesodoo/odoo#104521
X-original-commit: 1636ba5ed2f8a284bef0930313a85cc3dc7cf072
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this PR when you select a pos.payment in custom, it raise.
It doesn't make sens to use api.model here
closesodoo/odoo#104615
X-original-commit: 2abeb8cc5b015263ce49d765315712f92ec25c25
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
The breadcrumb uses the "name" field by default which is lacking for
cron triggers. Use the cron name instead so that it shows
> Scheduled Actions Triggers Base: Auto-vacuum internal data
instead of
> Scheduled Actions Triggers Base: ir.cron.trigger,1
See also #69096closesodoo/odoo#104599
Signed-off-by: Rémy Voet <ryv@odoo.com>
When a report was set to only accept tax exigible items (typically for the generic tax report), its children did not inherit this behavior by default. Because of that, the localized tax reports and OSS reports didn't filter the items properly.
closesodoo/odoo#104611
X-original-commit: 547c00c221606af8b385fab347a34edb15f773cb
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Instead of making the language badge a list item, we bundle together
the email and the language badge and put them in a flex container
that wraps when the email is too long. The .ms-auto in the language
badge element makes it "float" to the right (or end).
Furthermore, we removed the t-if conditions because:
- Email (login) field is required anyway so it will always be there.
- Language badge will not render an element if it's empty.
closesodoo/odoo#104262
Task-id: 2758990
Signed-off-by: Julien Castiaux <juc@odoo.com>