Commit Graph
129821 Commits
Author SHA1 Message Date
RomainLibert 39e5d93c97 [FIX] web: use New as default value for breadcrumb
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

closes odoo/odoo#36565

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-09 12:53:52 +00:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Martin Trigaux 27a59776ca [FIX] mail,website_twitter: typos, wording
Courtesy of translator team
2019-09-10 08:58:33 +00:00
Thanh Dodeur 554c0bce74 [FIX] web: searchPanel style tweaks for the panel selectors
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>
2019-09-09 11:54:44 +00:00
Lucas Lefèvre 04bf0ed963 [FIX] im_livechat: Style button to submit review
When a visitor close the livechat and submit a review,
the "Send" button is not styled.

closes odoo/odoo#36487

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-05 14:46:19 +00:00
Lucas Lefèvre cb80d0533e [FIX] website_livechat: Use correct image field
Go to the frontend "Live Support" menu => server error.

Since commit f0ffbea `im_livechat.channel` no longer has a field
`image_64`.
2019-09-05 14:12:14 +00:00
Simon Lejeune d6dcbce4fb [FIX] mrp: view mobile friendly
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] 916b49381b

closes odoo/odoo#36595

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-10 08:06:49 +00:00
Jigar Vaghela 44221cffac [FIX] base_address_extended: Fix cache miss bug
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>
2019-09-09 13:41:00 +00:00
Kevin Baptiste 9407383a56 [FIX] web: correctly position "no records found" in modal dialog
Before this commit, the message "No records found!" was positioned above
the search filters.

closes odoo/odoo#36537

Taskid: 2067797
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-09 07:09:48 +00:00
Barad Mahendra 7420e6041e [FIX] base_setup: load demo data does not works
While moving web_settings_dashboard to base_setup in
commit: https://github.com/odoo/odoo/commit/78565b1dc933692abba46a73f2298b7ea8e03c88#diff-2ac1c5a222c5332be62450c099440fd6L292
the load demo data click event was missing.

so added event to load the demo data in base_setup.

Task-2062477

closes odoo/odoo#36275

Closes: #36275
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-30 10:58:03 +00:00
Robin Heinz d2ad483850 [FIX] point_of_sale: barcode field visible
Before the fix, the display of the barcode field on the contact form was always invisible.
Now this field will be visible.

closes odoo/odoo#36548

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-09 09:49:56 +00:00
Lucas Lefèvre 25ab04ed59 [FIX] base: Assign value in attachment name
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.

closes odoo/odoo#36460

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-05 11:29:01 +00:00
Joseph Caburnay d6543adc05 [IMP] point_of_sale, pos_adyen, pos_mercury: payment terminal per method
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.

closes odoo/odoo#35665

Task-id: 2042382
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-09 14:08:51 +00:00
Robin Heinz 7c6c76d021 [FIX] delivery: free over display change
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.

closes odoo/odoo#36408

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-04 09:07:31 +00:00
wan 2ad8d8c964 [REF] web: add public API to open the selectCreateDialog of a many2many
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

closes odoo/odoo#36315

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-09 14:22:27 +00:00
Thibault Delavallée 4ba77c52f5 [FIX] phone_validation: fix MRO issue with phone.validation.mixin
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)

closes odoo/odoo#36580

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-09 15:54:45 +00:00
Simon Lejeune 5ed25aadb6 [FIX] sale_stock: cannot see a dropship picking
since 1a33056557

closes odoo/odoo#36579

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 15:41:04 +00:00
Simon Lejeune 5d5644c721 [FIX] mrp: bom view mobile friendly
closes odoo/odoo#36577

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 15:17:06 +00:00
Simon Lejeune 916b49381b [REF] mrp: produce wizard mobile friendly 2019-09-09 15:17:03 +00:00
Arnaud Baes ef30bd438c [FIX] stock: preserve context in scrap wizards
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.

closes odoo/odoo#36563

Tasks: BugLogistics
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 12:39:29 +00:00
Simon Lejeune cc8994a4ef [REF] stock_account: consider consumable product for anglo saxon entries
closes odoo/odoo#36560

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 12:35:32 +00:00
Raphael Collet 36346afd96 [FIX] models: callable in api.depends() sees valid _rec_name
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`.

closes odoo/odoo#36484

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-09 13:42:45 +00:00
Sébastien Theys 331e1f70ec [IMP] (website_)sale(_comparison): remove 12.0 compatibility code
This code was introduced for fixes in stable version but it is not used now.

closes odoo/odoo#36365

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-09 12:54:41 +00:00
Vincent Schippefilt 029dd1a214 [IMP] web: edit translations in new dialog
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

closes odoo/odoo#36185

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-09 13:09:53 +00:00
Raphael Collet 263849c336 [FIX] models: optimize modified() in the context of record creation
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.

closes odoo/odoo#36566

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-09 13:18:53 +00:00
Raphael Collet cfb08e87b0 [FIX] models: use transitive triggers instead of recursion
On average, this reduces the total time spent in method `modified` by
half (times measured on invoice creation and post).
2019-09-09 13:18:48 +00:00
Simon Lejeune 3d2df88ffd [FIX] stock: default company on lot created in inv adj
closes odoo/odoo#36564

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 12:52:48 +00:00
Odoo's Mergebot 03f1750824 [MERGE] base_setup, phone_validation: improve and fix SMS integration
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

closes odoo/odoo#36481

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-09 16:27:50 +02:00
Thibault Delavallée d2809cbd94 [IMP] phone_validation, crm: move onchange on phone fields
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
2019-09-09 12:45:47 +00:00
Rémi Rahir f6c2d7ebba [IMP] base_setup : remove install button of SMS
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
2019-09-09 12:45:44 +00:00
Rémi Rahir 1ad04f2180 [FIX] phone_validation: set module as auto install to auto install SMS bridges
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
2019-09-09 12:45:40 +00:00
oco-odoo 5cf9d55bbc [FIX] account_facturx: retrieve attachments in the right way to create an invoice
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.

closes odoo/odoo#36552

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-09 10:54:11 +00:00
Raphael Collet 55e1b44492 [FIX] fields: enable default on company-dependent field
The ORM overrides the default defined programmatically on the field, and
set a default function that retrieves the value in `ir.property`.

closes odoo/odoo#36545

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-09 09:35:19 +00:00
Simon Lejeune a136b4c29a [FIX] stock: transfers calendar view
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.

closes odoo/odoo#36550

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 08:09:35 +00:00
Josse Colpaert cc505b4b57 [FIX] base: partner of company should be shared in multi-company
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.

closes odoo/odoo#36510

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-06 08:11:59 +00:00
Shreya Modi b7c717d959 [IMP] mail: change in mailing failure icon
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

closes odoo/odoo#36397

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-04 05:27:47 +00:00
Jinal Patel 0b59822825 [FIX] stock_account: avoid to display two 'Update Cost' button
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

closes odoo/odoo#36535

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-09 05:07:30 +00:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Simon Lejeune 1736bd74ff [FIX] stock_account, mrp_account: linked valuation layers
disable the inventory at date from these views

closes odoo/odoo#36524

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-06 15:02:32 +00:00
Simon Lejeune 860d5d8f7c [FIX] stock: assign serial button
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 3520220268

closes odoo/odoo#36519

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-06 11:09:06 +00:00
Simon Lejeune 30f2ad8c43 [FIX] stock: detailed operations and operations display tweaks
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.

closes odoo/odoo#36518

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-06 09:36:17 +00:00
Simon Lejeune af2fd0aea3 [FIX] stock: allow to sort on location name
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.

closes odoo/odoo#36516

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-06 09:34:58 +00:00
Aaron Bohy 707882497b [FIX] web: tests: load template before FieldColor tests
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();

closes odoo/odoo#36511

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-09-06 11:43:40 +00:00
Odoo's Mergebot 7210ff4e19 [MERGE] test_mail: reorganize tests, lessen data creation
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

closes odoo/odoo#36508

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-06 16:31:57 +02:00
Thibault Delavallée 62bd4c07f4 [MOV] test_mail: move composer and post tests from template tests
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
2019-09-06 13:37:56 +00:00
Thibault Delavallée 6ccaae1b2f [MOV] test_mail: split cc tests to either discuss or mailgateway tests
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
2019-09-06 13:37:56 +00:00
Thibault Delavallée 8a8da21d2e [MOV] test_mail: split post and composer tests
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
2019-09-06 13:37:56 +00:00
Thibault Delavallée 803d87c46d [MOV] test_mail: rename some test files
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
2019-09-06 13:37:56 +00:00
Thibault Delavallée 46241ce8a9 [REF] test_mail: lessen data created by default
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
2019-09-06 13:27:59 +00:00
Sébastien Theys a5ef867541 [IMP] website_blog: prefetch the first post with the other posts
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

closes odoo/odoo#36507

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-06 12:51:07 +00:00