Before this commit, the default values of a recurrent meeting were overriden
by the false value, resulting in "count = 0" dans "weekday = False" in the form
view of recurrent meeting by default.
TaskId-2999194
X-original-commit: c8d9eefdc99eaacc124eebf7f0cbaabed4e38bf4
Part-of: odoo/odoo#101492
Before this commit, _do_request can either receive json or dict as parameters.
requests.request param value can also be a string or a dict.
When the params is a string, the code tries to copy it with the copy method
which is only available on the dict, resulting in an error.
TaskId-2999194
X-original-commit: 75f889ca013d41939c669f07035e39d056d581d7
Part-of: odoo/odoo#101492
Make it easier to override component's sub templates by making them
overridable on the component.
TaskId-2999194
X-original-commit: 4f4e91ebb14d563dd3ec6d305b9984db25e06cbf
Part-of: odoo/odoo#101492
Opening the account move line form view from here is not useful,
as most would do it only to access the move behind it.
In order to display more relevant information, the move line
on the analytic line form view will instead directly open the
account move of the move line.
closesodoo/odoo#101491
X-original-commit: 1a861bd5d9f9a01e815e53f147c950f1535789c5
Signed-off-by: William André (wan) <wan@odoo.com>
In Bootstrap 5, the `container` class was updated to use variables for
its left/right paddings. This seems to conflict with wkhtmltopdf, and no
paddings are added, shifting all reports.
This introduces the set paddings defined in Bootstrap 4 for the reports.
Steps to reproduce:
Go to Inventory -> Products -> Products -> Any consumable/storable
product -> Print labels -> Dymo
Also with Bootstrap 5, the `table-borderless` class wasn't working
properly on the PDFs either, as the borders were still visible. This
removes all borders within a `table-borderless`.
Steps to reproduce:
Go to Inventory -> Products -> Products -> Any consumable/storable
product -> Print labels -> 2x7 with price
Part of task-2985735
closesodoo/odoo#101490
X-original-commit: 0b9acefb18ad8b4a0df72789c853ed8d113a495b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit improves the payment terms by:
- Showing "Payment terms" instead of "Due date" if the user has selected payment terms (instead of a due date)
- Auto-fill the amount and date example in the dynamic preview of the payment terms if the user opens the payments terms popup.
closesodoo/odoo#101488
X-original-commit: 04c1f169e5e97a7f92bdf009ed545eb8607f943b
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Purpose
=======
Improve the usability of the properties fields.
Improve usage of properties fields, add them in project and crm.
Specifications
=============
Add the properties field on project and task as well as on lead and sales
team.
Prefetch the properties to improve performance.
Allow to display an avatar widget for the relational properties, hide the
move arrows if the action can not be done, show the many2many properties
even if one record in the list is not accessible, improve the behavior
of the relational properties when some records can not be accessed.
Perform various fixes notably with onchange support and various display
tweaks.
Task-2965523
closesodoo/odoo#101487
Forward-port-of: odoo/odoo#100653
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Always reset the autocomplete value when creating a new tag,
even if the tag already exists.
Technical
=========
The input value is reset when the tag is created because the props
of the autocomplete component change, but if we do not change the props
of the autocomplete component (e.g. because the tag already exist and
nothing should be done), the text value is not reset.
Add a new option for that purpose.
Task-2965523
X-original-commit: 352e811e821ef7c1fc075c32dda7272145749526
Part-of: odoo/odoo#101487
Bug
===
If we re-write the same definition record, the default values were
applied again (even if the definition record didn't change).
This is because the compute on the properties is called even if the
definition record didn't change.
Task-2965523
X-original-commit: 70d80771f2430f83c91e7ef46eeebde8de70c3fe
Part-of: odoo/odoo#101487
Bug
===
- create a new helpdesk ticket without properties
- create a new property
- change the customer
=> The added property is removed
The fix in the onchange of models.py needs to be more specific, and
should be used only when the definition record is changed.
Task-2965523
X-original-commit: 909ee004183068d9ffa94abe0d1472a8f0534f34
Part-of: odoo/odoo#101487
Purpose
=======
Remove the code redundacy between
convert_to_column and convert_to_cache.
Task-2965523
X-original-commit: bbd307d7939319393e3b1782c7200f0010c8c018
Part-of: odoo/odoo#101487
Purpose
=======
Log a message each time a user change a properties definition
by writing on the record properties values.
Task-2965523
X-original-commit: 6fa6fcd13e248d4bdf1febb0d8399cfe634037f5
Part-of: odoo/odoo#101487
Bug
===
When a popover is inside an other popover (e.g. tags color popover
inside the properties definition popover), when clicking on the other
popover, the first one is never closed.
Task-2965523
X-original-commit: d782dbf5cfbeb31f98ca39935db4f6ab046a9f43
Part-of: odoo/odoo#101487
Purpose
=======
Improve the behavior / visual of the properties field when the user does
not have access to some relational properties (many2many, many2one).
When the user does not have access to one many2many value,
show the others record in the list.
Fix a traceback when the model is not set on the definition.
Task-2965523
X-original-commit: cb8b751a335b01192aab185cd0230fa0f036b974
Part-of: odoo/odoo#101487
Purpose
=======
Allow to display an avatar image for the relational properties
(many2one and many2many). This is hardcoded for res.users and res.partner,
because we don't want an option in the property definition, and we can't
read ir.model because of access right...
Automatically select the default property label when we create a new
property, so the user can just enter the new property name without
removing manually the default label.
Hide the up / down arrow used to move the property, if it's already
the first or the last property in the list.
Close the popover when pressing enter in the label
Fix a traceback when we try to delete a property after changing the type.
Fix a traceback with Falsy default datetime.
Task-2965523
X-original-commit: 316f5462d438306899c53eb625d1d573f1a93d8d
Part-of: odoo/odoo#101487
Purpose
=======
Shorten the property name to take less space in database (while keeping
a very low probability of collision).
E.G.: "aa34746a6851ee4ea1f8d95746e45788" -> "aa34746a6851ee4e"
Automatically generate property name in python if they are missing.
Task-2965523
X-original-commit: d597083ff5e0a4abde67a450a61e04e6bf119c26
Part-of: odoo/odoo#101487
Purpose
=======
When changing the type or the model of a property, the name is
re-generated, so the others record values are reset. If we change back
to the original model / type, the original property name is restored.
This is a super important behavior of the properties component and
it should be fully tested.
Reset the model and model description when changing the type.
Now that the form view is always in edit mode, even if we changed the
model / type of a properties, then save, we are able to restore the old
properties as long as we don't refresh the page.
Task-2965523
X-original-commit: 54ae82974b836a0badab3c4c767916a1daf88f76
Part-of: odoo/odoo#101487
Purpose
=======
Move the the properties formatters from legacy
to the new formatters file.
Task-2965523
X-original-commit: 6e8b49ba8a213bc2dd600fd91b7acd4a38147926
Part-of: odoo/odoo#101487
Purpose
=======
The many2many properties have "res.users" as model, but the model and
records were missing in the test data.
Task-2965523
X-original-commit: 974999d32e14fcfca94b327fb8d6efa06d6bf06e
Part-of: odoo/odoo#101487
Purpose
=======
Most of the time we will need to read some field on the definition
record when we read the record itself (e.g. fetching some project
information on a task).
Because of this, it makes sense to prefetch by default the properties
definition, and it reduces the number of queries as well.
Task-2965523
X-original-commit: 1295e76f0dc3f3162a1b81a58ed1dc73d0fce3e7
Part-of: odoo/odoo#101487
Purpose
=======
To be able to customize the working flow on the lead, based on their
team, we add a properties field on leads, whose definition is stored
on their team.
Include the properties value in the merge message to keep the history
of the properties value if they have been overwritten during the merge
process.
Task-2965523
X-original-commit: 4722cc4b1fb027b7b9d731c3b206656588071360
Part-of: odoo/odoo#101487
Purpose
=======
To be able to customize the working flow on the task, based on their
project, we add a properties field on tasks, whose definition is stored
on their project.
Task-2965523
X-original-commit: 2f244769cbb1512875ae197aa8adc3efd34fd54b
Part-of: odoo/odoo#101487
Since [1] it is possible to request that some blocks are not displayed
on mobile devices.
This commit adds a similar option to prevent blocks from being displayed
on desktops (i.e. on non-mobile devices).
[1]: https://github.com/odoo/odoo/commit/9463f0f889f9dd8da6077895c125da4998a933c0
task-2900730
closesodoo/odoo#101483
X-original-commit: 3103e0553011b5c1f4078972d7a88fa3fd4068b2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Antoine (anso) <anso@odoo.com>
The warning should be displayed only on sales journal
Also added the fact that the warning now depends on the lock date, if there is a lock date the warning is displayed for entries post lock date, otherwise it's for all the entries
Same for the color of the name of the entry, it's now red only if it's post lock date
closesodoo/odoo#101442
Task-id: 2993833
X-original-commit: c668d777a5984d1cdcfd45a90ec39e1a5a2e0a55
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
It should be possible to quickly search by `amount_company_currency_signed` and `amount` in `account.payment` view.
closesodoo/odoo#101404
X-original-commit: 95af911eee4ecdfacc18f55e5bc923f04bc97453
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
Current behaviour:
If you have an SO, with an SOL that is a service invoiced based on Timesheet's task,
with some logged hours (therefor it can be invoiced), the wizard wasn't showing the
date range fields to allow user to specify a begin and end date for invoicing.
Expected behaviour:
You should be able to choose a date in the wizard when you have a service based on timesheet,
and "normal invoice" is chosen as a radio option.
Steps to reproduce:
- Install Sale and Timesheet
- Create a Product of type service, invoiced on timesheet, on create task, chose a project (doesn't matter), unit = hours
- Create an SO and sell 50 hours of the newly created service, confirm the SO
- Log 20 hours on the task related to the sol
- Return to the SO and click on "Create Invoice", normally 2 fields for "Date Begin" and "Date End" should be present,
but it is not the case. You can test the desired behaviour in version 15.3 and before.
Reason for the problem:
The xml view was attaching itself after a field `deposit_taxes_id` which is inside a group that is invisible if there
are no downpayment.
Fix:
Attach the xml view after the before mentioned group (`down_payment_specification`), in a separate group of its own,
with visibility that depends on `invoicing_timesheet_enabled` field.
Affected versions:
- 16.0
- master
opw-2994036
closesodoo/odoo#101406
X-original-commit: 3eb1660e7bee4c5b2fe63f82daad5f4acbea2dd2
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
An event was not called on uploading files in a media dialog.
This meant the parent of html field didn't know of the new attachments
which resulted in attachments being linked to no record at all
and not being garbage collected later.
This adds a reference inside the media dialog file input so that it can
trigger that event on behalf of the html field.
The attachments newly uploaded in media dialog are uneditable
to prevent users from unlinking attachments
that are still used in the body of the composer (causing the same issue)
Task-2860761
closesodoo/odoo#101405
X-original-commit: f4dd1eb3f25672e7309759c347e2b552c5652b2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When account.move.line are aggregated (such as
in journal items) we do not want to see an
aggregated value as it would either be 0 or
a possible mix of currencies
closesodoo/odoo#101373
X-original-commit: 9e1dcbfe31e9d3faf0023f04979409ae7889e5f4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
Adapt (part of) the `sale.order` & `purchase.order` custom javascript logic to the new OWL framework.
1) `product_configurator_widget` -> `sol_product_many2one`
Impacted modules: sale, sale_product_configurator, sale_product_matrix, event_sale, event_booth_sale, sale_renting
2) `matrix_configurator` -> `pol_product_many2one`
Impacted module: purchase_product_matrix
3) `product_discount` -> `sol_discount`
Impacted module: sale
4) Custom js_class for SO form view is no longer necessary (and legacy js_class removed from the PO form view)
Task-2918791
COM PR: #101304
ENT PR: odoo/enterprise#31854closesodoo/odoo#101352
Forward-port-of: odoo/odoo#101304
Related: odoo/enterprise#31886
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Horacio Tellez Perez <hote@odoo.com>
Co-authored-by: Morgane Demesmaeker <edm@odoo.com>
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Widgets have been converted to owl and use a different logic to apply
changes from the SOL to the SO level.
Task-2918791
X-original-commit: 87c5f6f2007ca71a14f58bab10bb1637d3647921
Part-of: odoo/odoo#101352
And stop relying on dumb event_ok field, when the product_type already
holds the information (recently moved from sale_stock to sale).
Task-2918791
X-original-commit: 10255e549d071c1ceee5faae7be0e1a0486a3639
Part-of: odoo/odoo#101352
Before this commit, when we used a domain on many to many relational
fields, the `dataContext()` returned the context of the field, which
contained a command tuple.
This causes an error server side, when a domain [('id', 'in', [[6,
False, [3,4]]])] is provided to search available records to fill the x2m
field.
Now, it returns the `currentIds`, which correctly gives the id(s) of the
records.
Approved by SAD
X-original-commit: 5653e23a333262683257575d071575a63981ca33
Part-of: odoo/odoo#101352
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
used in product configurator logic
X-original-commit: 40cfbf35985422a9415e6ab225d037f7393d3842
Part-of: odoo/odoo#101352
Co-authored-by: Samuel Degueldre <sad@odoo.com>
This PR makes it so that the button to open emojis stays grey
when the emoji popover view is opened.
The focused behavior of the button is also disabled
Task-2998149
closesodoo/odoo#101348
X-original-commit: d022939ed1ed29d2e93a05c6c408ac65e8fb704e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
On windows, displayed emojis are bigger than the expected size
This commit removes the horizontal scrolbar that would appear
on Windows
Task-2991415
closesodoo/odoo#101347
X-original-commit: 578157fbbae92afa1581193df9173fd085fd9f09
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current behavior before Fix:
when we hit shift+enter the oShiftEnter doest not trigger
Desired behavior after Fix:
now when we hit shift+enter oShiftEnter gets triggered.
Task id-2991164
closesodoo/odoo#101345
X-original-commit: d1808c8d50372a5e7e0063634037e069aa7fc55a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This ports the `sms_widget` field to OWL.
closesodoo/odoo#101350
X-original-commit: 89109de6d3752388f0b2f976c8a32588f760ec48
Related: odoo/enterprise#31882
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This moves the emojis char and text fields to the new fields directory,
and renames them to follow the new naming conventions.
X-original-commit: 92488725a608a2e14297228ebccddc5cc2ee5d6d
Part-of: odoo/odoo#101350
Some payment terms with early payment cash discount weren't giving out the correct computation.
Example of a problematic set up :
Payment term with multiple lines (percentage X, percentage Y, balance)
Cash Discount tax computation : mixed
The journal items of the invoice and the total amount wouldn't correctly take into account the different discount percentages of the payment term lines.
Fixed it by applying the line percentage to the epd lines computation.
closesodoo/odoo#101341
X-original-commit: 4af4d0e3bc25a5f81eabd1c2068fd6bf6a25621d
Related: odoo/enterprise#31874
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>