Go to the form view of mailing.mailing, write "hello " as the subject,
insert an emoji, you end up with "hello:)" instead of "hello :)". The
problem is that when the input loose the focus, it is automatically
trim.
Reconfigure the `char_emojis` widget so that is doesn't trim.
task-id-3493168
closesodoo/odoo#136530
X-original-commit: 2adda1eb2760ccf970761f424105e245afc3de3f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Version:
--------
- saas-16.4 only
Issue:
------
When a project is duplicated, all tasks and sub-tasks
are visible in the new project's kanban view.
Cause:
------
When writing `project.write({'tasks': [Command.set(new_tasks.ids)]})`,
we trigger an inverse which writes the `project_id` field to the tasks.
This will set the value of `display_in_project` to `True`.
Solution:
---------
Rewrite the `display_in_project` field if necessary.
opw-3479714
closesodoo/odoo#136527
X-original-commit: 6f62d156b65b331a0a15406a90b174c265100491
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Auto install AvaTax module for countries that use AvaTax ('US','BR').
Add a checkbox in settings to easily install the module if needed
task ID: 3398637
closesodoo/odoo#136490
Related: odoo/enterprise#47979
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
commit [1] addeed production cost account. However this account is
mandatory with real time valuation. It could be an issue during
production because we don't have an automatic way to create a new
valid account. On top of it this behavior is optional and people
could still use the classical input and output account for production.
This commit make the cost of production account optional and fallback
on previous behavior with input/output accounts
[1] commit 1eb2e7c814closesodoo/odoo#136463
X-original-commit: ea647812e76931f9193ae841f428b312b861739b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
RATIONALE
Merge two phone-related field on registration as they overlap. Having only
one is sufficient for contact-oriented model like registration.
SPECIFICATIONS
Registration model currently holds two phone field, phone and mobile. This
leads to having records with sometimes phone, sometimes mobile being filled.
This makes phone flows not easy: we have to define fallbacks (use phone or
mobile), data is not always synchronized, ... in the end what event users
need is one phone field to be able to communicate with attendees. Having
only one field is sufficient and simplifies the model.
Keep only one phone field, instead of two. Merge phone and mobile into a single
one, keeping phone as first value when having both available e.g. when
synchronizing with the partner.
Task-3366899
Part-of: odoo/odoo#128232
Co-authored-by: "Jeremy Hennecart" <jeh@odoo.com>
Prior to this PR, `product_configurator_popup.js` did not support
attribute selection of type `multi`. In addition, the
`pos_preparation_display` did not display any attributes.
Now it's possible to select attributes of type `multi` in the Point of
Sale, and the preparation display shows all available attributes.
closesodoo/odoo#136441
Taskid: 3497560
Related: odoo/enterprise#47834
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
As `handle_history_divergence` is not used in the controllers, it makes
no sense to have it in `controllers/main.py`.
task-3217965
closesodoo/odoo#136277
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the stale document detection was imprecise and
incomplete.
The stale document could happen in different scenario:
1) Client B save when client A is disconnected (therefore client A
should be notified that the document is stale upon reconnection):
- For that scenario, the code had a heuristic to detect if the
internet connection disconnected and reconnected but was imprecise
as the browser api is not 100% reliable on all browser and
platforms. That made the code under-checking or over-checking with
the server.
2) The user has not yet focused on the element and before this
commit, the stale document was not detected.
3) If there is a partition in the peer to peer network and a member of
another partition that save, all other partition will not be aware
that they are working on a stale document.
4) The stale document happen before 2 peers could be fully connected.
For any of those scenarios, if a stale document was not detected and
the user tried to save changes, only then, a popup would inform that
the version was stale. And if the user closed the tab thinking the
document would automatically save, the change would not be saved
(without warning).
This commit:
1) improve detection of stale document
To detect the document this commit add a message in the odoo bus.bus
for the channel of the record for each write. That will ensure the
message to be received as soon as a user is connected to odoo.
2) improve recovery from stale document
Before this commit, the recovery was only made from the server.
As a detection is now direct (rather than delayed by the previous
heuristic), a document could be detected stale before receiving a step
that would not make it stale. Therefore, we cannot just reset from the
server as a recovery mechanism.
To recover, this commit first tries to reset from missing steps from
all peers. If unsuccessful, it will tries to reset from a snapshot. If
unsuccessful, it will reset from the server.
3) add a mechanism for aborting requests
To prevent unexpected concurrency behavior, this commit add a mechanism
to abort requests.
4) a framework for testing the collaboration of the wysiwyg
As it could be quite tedious and error prone to manually tests
concurrency issues related to the wysiwyg, this commit add a framework
for testing the collaboration of the wysiwyg and test the detection
and recovery of stale document.
task-3217965
Part-of: odoo/odoo#136277
In a subsequent commit, we need to change the content of the method
`_getNewPtp` and to patch it in tests.
To make that commit more readable by understanding which lines
changed, this commit moves the creation _getNewPtp to the Wysiwyg
prototype rather in a closure.
task-3217965
Part-of: odoo/odoo#136277
Prior to this commit the name of the reservation was not displayed under
the booked table. In addition to fixing this issue, this commit adds
the number of people expected on the table.
closesodoo/odoo#136140
Related: odoo/enterprise#47715
Signed-off-by: David Monnom (moda) <moda@odoo.com>
We introduce a new module that enables restaurants to show
their customers a display with all the current orders, filtered by
their preparation state.
In order to know the preparation state of the orders, we rely on the
information provided by the pos_preparation_display module.
In this commit we create a new function on the `pos.order` model
that returns a tracking number for a certain order.
This tracking number will be used by the `pos_order_status_customer_screen`.
Task: 3514516
We also create a generic OdooLogo component that
renders the odoo logo in svg format.
This component has the prop `monochrome` that dictates which
type of odoo logo will be rendered.
closesodoo/odoo#136065
Task: 3520164
Related: odoo/enterprise#47668
Signed-off-by: David Monnom (moda) <moda@odoo.com>
The model `account.analytic.line` has a field `so_line`.
In module `sale`, this field has a domain, which is defined in
`_default_sale_line_domain()`.
In module `sale_timesheet`, we override the method to add another
condition to super's.
The issue is that we also add the arg `dommain=...`, in the field
definition, which totally overrides both methods.
Moreover, it is impossible to just move that domain in the method,
because it has to depend on `self.commercial_partner_id`,
but the method is static.
The solution is to:
- Keep `_default_sale_line_domain()` in both modules,
but not call it directly from the field.
- Create a new compute field (`allowed_so_line_ids`),
to determine all allowed so_lines,
following the domain that is returned by those methods.
The compute method will call the domain method on instances, which
allows us to get their `commercial_partner_id`
- Replace the domain arg of `so_line` by `[('id', 'in', allowed_so_line_ids)]`.
task-3507195
closesodoo/odoo#135528
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
We check that both an activity and a task has been created by the create_todo_activity call
We check that the task has the same description as the activity.todo.create note
We check that the activity and the task have the same:
- name
- user
- deadline
Task-3492155
closesodoo/odoo#135134
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
*: analytic, base_automation, loyalty, mass_mailing, project, web, web_editor, website
This commit adds many new documentation of options and their usage for
fields. This makes them more usable and customizable in Studio, and adds
documentation for developers to know the type of expected option.
Some options that might lead to issues or that are too technical have
been removed, as they are not relevant and not required in most use cases.
task-3469741
closesodoo/odoo#134858
Related: odoo/enterprise#47148
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The method is no longer used by the web client:
=> it should be private
See enterprise commit
closesodoo/odoo#133500
Task: 3483938
Related: odoo/enterprise#46460
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Before, event badges were an a4 page divided in 4
quarters, meant to be foldable into a single badge.
It contained folding instructions, event instructions
and was white mostly everywhere.
We want to introduce some customization to allow
different colors between ticket types and a background
image.
Therefore, we introduce 3 different formats to print badges
(also sent to attendees through event communication)
- a4 foldable (french fold) (~ previous one but redesigned)
- a6
- a4 4 per page
The templates are intensively redesigned to a new style.
New templates are introduced to match new formats.
Example tickets are still managed, printing an appropriate
example ticket according to the event format.
Printing several event example tickets will still use each
event format appropriately
Models:
- event.event receives a selection field badge_format
and an image field badge_image. This will be printed
on the background of badge cards.
- event.event.ticket receives a color char field. It
can be picked from the event form view with a color picker,
and will be the backgroud of a band on the bottom of badge cards.
Renaming:
Scss file, records and templates are renamed from "_foldable_badge"
to "_badge", as now badges are not always foldable. Namespaces
of selectors follow the same logic. We still have specific
styling for the foldable version so there are still selectors
using a 'foldable' name.
Task-3473293
ENT PR: odoo/enterprise#46163
UPG PR: odoo/upgrade#5126closesodoo/odoo#132855
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
*: point_of_sale
- Makes the default shop and restaurant use the same default payment methods except cash payment methods that are individual.
- Adds a default cash payment method to the default restaurant.
closesodoo/odoo#126953
Task-id: 3378032
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Ease the way invoice report is selected for rendering.
We now only rely on `_get_name_invoice_report()` to decide
the report, and it is automatically selected in the report template
`report_invoice` that is extended by localizations.
Task-id:3492033
closesodoo/odoo#136389
Related: odoo/enterprise#47812
Signed-off-by: Laurent Smet (las) <las@odoo.com>
In preparation to improve insert in relational field with data, so
that there's less risk for cyclic code execution (hint: there'll be
a preinsert).
closesodoo/odoo#136308
Related: odoo/enterprise#47777
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This method pushes the provided record if it's not in the record
list, otherwise it does nothing. This works a bit like `add()` on
Sets.
Part-of: odoo/odoo#136308
Relational data in server formatter are:
- for one relation: None/false or object
- for many relations: list of objects or list of commands
The commands were:
- 'insert': to add a new item in a relational field
- 'unlink': to remove an item from a relational field
- 'insert-and-unlink': to remove an item from a relational field
- 'clear': to remove all items from relational field
There was a slight nuance between 'unlink' and 'insert-and-unlink'
at some point, but it becomes irrelevant with current code of model.
The name of the commands were hard to grasp what they actually mean
for the many relations.
This commit improves it by renaming 'insert' by 'ADD' and the 2
'unlink' commands by 'DELETE'. This makes it more apparent that
the data in 'ADD' refers to data of record to add in the relation,
while 'DELETE' refers to data of record to delete from the relation.
The 'clear' has been replaced by `False` value instead of a command.
Part-of: odoo/odoo#136308
This allows to define categories as also models, which allow
to register list of threads as relational fields, which in turn
simplify code readability and maintainability of these relational
data.
Part-of: odoo/odoo#136308
These `update()` functions are specific to a discuss record,
so it's best to be defined in the model rather than another
service.
Part-of: odoo/odoo#136308
This commit removes the files ajax.js and rpc.js then adapts all the
places where their exports were used. For most of the changes, it's a
replace of `this._rpc({...})` by a new `useService("rpc|orm")` like
pattern in the widgets.
closesodoo/odoo#136271
Task: 3439226
Related: odoo/enterprise#47775
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Reproduce:
1. Open "Sales" app.
2. Open the fist step about company data
3. Hit "Save"
4. The step should have been marked as complete
onboarding: Since the relational model refactoring,
saving a record that is not changed will not result in
calling the onRecordSaved callback, while saved will be `true`
in `saveButtonClicked`.
web: Be more explicit about this fact in the onRecordSaved doc.
Task-3516270
closesodoo/odoo#136143
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Opening the stock move form view in a picking will display the
technical name of `move_ids_without_package`. This commit change it to
be more accurate.
closesodoo/odoo#136067
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
The field `move_line_nosuggest_ids` was missing on the stock move form
view. Depending on the `show_reserved` setting on the picking type, we
should show either `move_line_ids` or `move_line_nosuggest_ids`.
Displaying the wrong field will trigger the wrong computes
Part-of: odoo/odoo#136067
`removeprefix` string function has been introduce in Python 3.9 but we
still support Python 3.7
This commit replaces it by an hand crafted one
Part-of: odoo/odoo#136067
Commit 4da8c6ebca change the way the
detailled operation of a stock move is openned. This has been done only
for the picking. This commit adapts the
MrpProductionComponentsX2ManyField widget to act also as the stock move
widget used in the stock pickings.
Part-of: odoo/odoo#136067
The 'pick from' display name would give a name to the dummy quant only
in case of existing stock move line. It's an issue in case of delivery
with the use_create_lot setting as we could generate serial number on
the fly and thus showing a quant on virtual move line
Part-of: odoo/odoo#136067
This commit creates the stock move line in readonly to be able to focus
out the move_line_ids one2many widget without having to confirm the
values of all the move line with a <Enter> key
Part-of: odoo/odoo#136067
Prior to this commit, the reprint receipt screen was not displaying the
orderlines. This fix the issue and add steps in the TicketScreen tour
to test it.
This commit also removes the sub-total section of the receipt because there
is already a breakdown of tax details at the bottom.
Finally, this commit fixes the receipt screen when reprinting the receipt
on the gcc localization.
closesodoo/odoo#136036
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
The 'like'/'ilike' operators automatically add the wildcard character
(`%`) at the beginning and at the end of the value. This commit fixes
the incorrect usage.
closesodoo/odoo#136007
Related: odoo/enterprise#47886
Signed-off-by: Raphael Collet <rco@odoo.com>
The `=like`/`like` domain operators are accent-insensitive, but still
case-sensitive. This is not really coherent, since `unaccent` is a best
effort to find records from the client, and it is the same idea behind
being case-insensitive. Also, `=like`/`like` cannot be used from the web
client, and we use them in domain to search from the Python side.
Moreover, adding `unaccent` to `=like` can be very inefficient when
searching for a prefix ('prefix%'). In fact, PostgreSQL can use btree
index to find prefix matches, but because we create dy default btree
index without unaccent (when we put
`index=True/'btree'/'btree_not_null'` on the field), PostgreSQL cannot
use this index.
Part-of: odoo/odoo#136007
Since odoo/odoo#122569, we now try to import the `migrations`
sub-package of each module to find upgrade tests.
However, this badly written regex match the OCA module `base_maintenance`,
which generate a RecursionError.
closesodoo/odoo#136549
X-original-commit: abd9e6686bdb1f84d67bd536d9cecda627cd001a
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Steps to reproduce:
1. Install hr_attendance
2. Go to attendances
3. Select any line
4. Change the check-out date to next day
5. Change the check-out time to 00:00:00
6. Export that line, file format xlsx
7. Favorites > import records
8. Upload the exported file > Test
9. Column check_out contains incorrect values.
Error in line 2: unconverted data remains: 2023-06-11
Cause of the issue:
options.get('date_format') is empty
opw-3374883
closesodoo/odoo#136485
X-original-commit: 973af5854de4a9fa3a9f5bd3bca8c7b342ff71e9
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
This commit simplifies the implementation of ReferenceField and makes
it fully reactive.
Currently, the ReferenceField is not automatically rendered when the
relation is updated from the component. The problem does not currently
occur because when a field is updated, a delete is performed on the
invalidField Set, which causes all the Fields to be rendered. This
behaviour is a bug in owl. Performing a delete on a Set that does not
delete any values should not trigger reactivity. When this is fixed, some
tests will no longer pass.
closesodoo/odoo#136433
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Install `website_crm` module (for test purpose)
- Go to `Contact Us` page on website
- Edit the page
- Change the submit button to create an opportunity instead, then save
- Fill the form and save
- Go back to CRM app and open the opportunity just created
- In the chatter, try to send a message
- Click on the checkbox of the suggested recipient (to enable it)
Issue:
- Email is displayed twice in the suggested recipients before click
(instead of name + email or just email if same as name)
- Email is set as default name in the opened dialog
Cause:
- Displaying email even if same as name
- Not setting the fields with default values (received from
`/mail/thread/data` rpc call)
Solution:
- Don't display email if same as name
- For the suggested recipient label (next checkbox) : set name with
default name value if name parsed from mail is same value as email
- For the default values in the opened dialog: set default values with
defaults received from `/mail/thread/data` rpc call
opw-3470295
closesodoo/odoo#135951
X-original-commit: 02ef0425a1f4ae30d846f6c57489cdebc3b4bbad
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
steps to produce:
- when measure field value set null if value is zero.
- try to open cohort/graph view measure.
- trackback occurs 'value.toFixed is not a function'.
Fix:
This commit, fixes the trackback when the measure value is null or undefined.
It occurs when the measure field value is null in a particular condition.
closesodoo/odoo#135207
Task: 3502869
Related: odoo/enterprise#47572
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>