Before this commit if `display_name` was in the view, the breadcrumb when
creating a new record, the breadcrumb would display either `Unnamed`,
either the last value of `_title` in `action_mixin`.
The default value when creating a record should be `New`, but the return
was ignored because `display_name` was found in the view
closesodoo/odoo#36565
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Moves the custom documents search panel style to the search panel
of community to improve usability and fix several visual glitches.
closes odoo/odoo#36496
Task: #2061957
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When a visitor close the livechat and submit a review,
the "Send" button is not styled.
closesodoo/odoo#36487
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
rev [0] was incomplete, the
possible_bom_product_template_attribute_value_ids field was not computed
in mobile because parent_product_tmpl_id was not sent to the server.
rev[1] broke the normal produce wizard
[0] 5d5644c721
[1] 916b49381bclosesodoo/odoo#36595
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this commit:
-The company have 3 street fields have separate inverse method this all method is update same partner fields
-Partner also has same 3 street fields but have the same inverse method for all street fields
-Now the problem is when user company street inverse call then partner inverse also call at that time partner inverse try to access other street fields that not available in a cache so an error occurred.
After this commit:
-Company 3 street fields have the same inverse method so no cache problem when accessing all street fields in partner inverse method
task-2068145
Closes#36568
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before this commit, the message "No records found!" was positioned above
the search filters.
closesodoo/odoo#36537
Taskid: 2067797
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Before the fix, the display of the barcode field on the contact form was always invisible.
Now this field will be visible.
closesodoo/odoo#36548
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Try to open an attachment without a `res_model` and `res_id`
=> warning.
Since the new ORM changes, a compute method always needs
to assign a value.
closesodoo/odoo#36460
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
For now when you are using payment terminals in the point of sale, you
have different way to configure payment temrminals, for the IOT, you
have to select the payment terminal in the pos config, and for adyen and
ventiv you have to configure them in the payment method.
So we've modified it to always configure payment terminal on payment
mehthod, and not on the pos config anymore, with iot you'll be able to
select the specific device you want to use, even if it is not on the iot
box set on the pos config.
closesodoo/odoo#35665
Task-id: 2042382
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Before the fix, the display of the boolean was bad.
Now the text is align with the checkbox and the amount related to this if true is on the next line.
closesodoo/odoo#36408
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Part of task 2005972
It is used in account_asset, when the o2m field is hidden and at the end of the form, but we need the user to see it at the beginning of the form
closesodoo/odoo#36315
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Issue is that when a model inherits from phone.Validation.mixin, then from
mail.thread.phone (which inherits from phone.validation.mixin) we have
an issue :
TypeError: Cannot create a consistent method resolution
order (MRO) for bases BaseModel, base, mail.thread, phone.validation.mixin,
mail.thread.phone
As fixing it could be complicated we have a way to avoid it: move conflicting
code as it is used only in mail.thread.phone .
In this commit we also import a file forgotten at d2809cbd94 which triggers
the issue itself.
Task 2063049 (bug spotted)
Task 2061765 (triggering the issue)
closesodoo/odoo#36580
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Context was overwritten in the wizard warning for insufficient
quantity when trying to scrap a componenent from a MO. This had a
side-effect on the move creation of the scrap where the move was
not linked to the MO, thus ignored by the cost analysis report.
closesodoo/odoo#36563
Tasks: BugLogistics
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Determine `model._rec_name` before the dependencies of the fields. The
compute method of the automatic field `display_name` uses a callable
depends that retrieves `model._rec_name`.
closesodoo/odoo#36484
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Before this commit, translations were edited in a list view with a filter
on the field that needed to be translated.
After this commit, the translations for each fields are translated in a
dedicated dialog. The changes done to the current language are taken
into account immediately, both ways, from the dialog to the form and
from the form to the dialog.
Translating terms is also available in create mode, the user will be
prompted to save before editing a translation
Task ID: 2028152
closesodoo/odoo#36185
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
This prevents a bunch of queries that are useless when creating a
record. Indeed, right after a record has been created, no other record
has a many2one reference to it. In other words, inversing a many2one
field from the record just created always gives an empty recordset.
Those useless inversions generate about a dozen queries when creating a
`res.partner`, for instance.
This saves queries, but not much time.
closesodoo/odoo#36566
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
PURPOSE
Allow auto install of all SMS-based feature. Move partner onchange formatting
directly inside phone validation.
SPECIFICATIONS
Phone validation: set as auto install. Phone validation module is a direct
dependency of SMS which is integrated in more and more business apps. As such
we want sms to be auto-installed, hence making phone_validation auto-install
as well.
Send SMS feature should not be an option anymore. Move SMS settings it to the
left of the Partner Autocomplete one and remove field. Since SMS is now
integrated with several business apps we do not want the user to uninstall that
module "by inadvertence".
Move the onchange on the phone field of contact model directly inside phone
validation to have it available in all SMS based applications.
LINKS
Task 2061765
FP/AJU request
closesodoo/odoo#36481
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Allow auto install of all SMS-based feature. Move partner onchange formatting
directly inside phone validation.
SPECIFICATIONS
Move the onchange on the phone field of contact model directly inside phone
validation to have it available in all SMS based applications.
LINKS
Task 2061765
PURPOSE
Allow auto install of all SMS-based feature. Move partner onchange formatting
directly inside phone validation.
SPECIFICATIONS
Send SMS feature should not be an option anymore. Move SMS settings it to the
left of the Partner Autocomplete one and remove field. Since SMS is now
integrated with several business apps we do not want the user to uninstall that
module "by inadvertence".
LINKS
Task 2061765
PURPOSE
Allow auto install of all SMS-based feature. Move partner onchange formatting
directly inside phone validation.
SPECIFICATIONS
Phone validation: set as auto install. Phone validation module is a direct
dependency of SMS which is integrated in more and more business apps. As such
we want sms to be auto-installed, hence making phone_validation auto-install
as well.
LINKS
Task 2061765
Before that, we relied on the fact the call to super() assigned the attachment_ids field, which was wrong outside mail.compose.message. Hence, we fix that by directly browsing the attachment.
closesodoo/odoo#36552
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
The ORM overrides the default defined programmatically on the field, and
set a default function that retrieves the value in `ir.property`.
closesodoo/odoo#36545
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
There's no readonly possibility on the calendar view so the only way to
prevent updating a done or cancelled transfer is to raise on the write.
We should to raise in the inverse function so that it is possible to
bypass the constraint by writing directly on the move, as we want to
change some date in the demo data.
closesodoo/odoo#36550
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
We got an error before e.g. when we changed the address
of a created company because the company created is not yet
in the allowed_companies in the environment.
Also, it does not make sense that the company of the partner
of a company is that company. When you create a new partner,
partners are shared by default between companies (company_id False).
And in most multi-company situations, operations are made between
them, so it makes extra sense to share their partners.
So, we don't set the company of the partner of a company anymore.
closesodoo/odoo#36510
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Currently, mailing failures are using 'fa-envelope-o' (light design)
while SMS failures are using 'fa-comment' (solid icon). To align them,
and make the mailing failures more visible, we change fa-envelope-o
to fa-envelope.
task-2063188
closesodoo/odoo#36397
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
In this commit, instead of change the whole button using XPATH
only change the attributes of button.
After this commit, displayed only one 'Update Cost' button.
task-2067787
closesodoo/odoo#36535
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
We display the button on the move if detailed operations is enabled and
if pre-fill detailed operations is disabled. There was a mix of computed
field/conditions in the xml resulting in an always hidden button.
We now only use the computed field.
related to 3520220268closesodoo/odoo#36519
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
These o2m should be full width in enterprise. The only way to make them
full screen is to make them direct children of their tab. Duplicate
detailed operations and switch some field in operations to make it work.
closesodoo/odoo#36518
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
stock.location have a _rec_name to complete_name and an override of
name_get that do not use complete_name
To allow sorting on the name in the webclient, we display complete_name
in the view instead of display_name, we actually get rid of the name_get
and use its implementation in _compute_complete_name.
closesodoo/odoo#36516
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The ColorPickerDialog lazyloads its template. In the test
environment, nothing was done (except for a single nextTick) to
ensure that the template has been loaded before interacting with
the dialog. This led to non deterministic failing runbot builds.
Also correctly load the signature template before running its tests
instead of doing two chelou nextTick();
closesodoo/odoo#36511
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
Quickly clean common class and lessen data creation by default. Offer some
tool methods, notably to create portal users used in some tests but not
all, or to create mail templates.
Reorganize tests, notably
* put message_post related test in test_message_post;
* have only composer related test in test_message_compose(r);
* put alias tests in test_mail_gateway;
* put moderation tests in test_channel, except those related to mail
message model that should be in test_mail_message;
* put mail.thread.cc specific behavior tests in mail_gateway for gateway
related tests and test_discuss for recipient suggestion tests;
* put composer with template tests in with composer tests, put post with
template tests with post tests, put tracking multi company test with tracking
tests;
* rename mail-resend to message_management and multi_company to
mail_redirect;
This merge does not change anything functionally. Tests are globally the same.
having better organized files will allow to rewrite and improve them.
LINKS
Task 1958697
closesodoo/odoo#36508
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
Reorganize tests, notably
* put composer with template tests in with composer tests;
* put post with template tests with post tests;
* put tracking multi company test with tracking tests;
LINKS
Task 1958697
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
Split cc tests to either discuss or mail gateway tests. It allows to remove an
unnecessary file.
LINKS
Task 1958697
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
Reorganize tests, notably
* put message_post related test in test_message_post;
* have only composer related test in test_message_compose(r);
* put alias tests in test_mail_gateway;
* move some discuss tests to post tests as they are linked to notification
details, not really Discuss features.
LINKS
Task 1958697
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
* put channel moderation tests in test_mail_channel;
* rename resend to message management;
* rename multi company test to redirect tests:
LINKS
Task 1958697
PURPOSE
In order to rewrite some tests, remove low-level tests and add coverage
first step is to reorganize a bit test_mail content. Several tests cases
are spread among several files and finding back some feature coverage
tests is not easy.
SPECIFICATIONS
Quickly clean common class and lessen data creation by default. Offer some
tool methods, notably to create portal users used in some tests but not
all, or to create mail templates.
LINKS
Task 1958697
This reduces the number of queries by 4 on this route.
Here are the solutions that have been considered on how to share this prefetch.
[0].name
--------
Calling `(first_post | posts)[0].name` does not work because `[0]` is another
prefetch, it still does all the queries.
See `__getitem__` in `models.py`, `_prefetch_ids` is not forwarded, as opposed
to `__iter__`.
.mapped('name')
---------------
Calling `(first_post | posts).mapped('name')` reduces the number of queries by 2
(because it does an iteration = share prefetch, but this is CPU time for
nothing).
The problem is that even in that case, when computing the display name of a blog
for the slug (`slug(blog_post.blog_id)` or `slug(first_post.blog_id)`) if the
posts are on a different prefetch, the query will be done twice because their
m2o (blog_id in this case) will be on a different prefetch each.
.blog_id.mapped('name')
-----------------------
Calling `(first_post | posts).blog_id.mapped('name')`. would be the same as
using `with_prefetch` in this case, but it will be less robust. It is also
slightly more CPU to do the map for no reason, though it is really not a factor.
But the main problem is that it only works because we know `.blog_id.name` will
be accessed, but if the view is changed some day to access a field of another
m2o, this will not be optimized, while `with_prefetch` it is always guaranteed.
In conclusion the solution with `with_prefetch` was used because it is explicit,
more robust, and without any side effect.
Part of task-2061122
closesodoo/odoo#36507
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>