Commit Graph
129938 Commits
Author SHA1 Message Date
Odoo's Mergebot 4926f03e6f [MERGE] mail: improve record creation with batch operations
PURPOSE

Optimize record creation in mail module by adding batch operations.

SPECIFICATIONS

Compute default followers once at creation for all created records. As the
same value is computed for each new record computing it once is sufficient.

Log default creation message in batch when having no specific subtype at
create. It allows to speedup record creation. For 1000 records, these specific
lines take
  * 2.1s before the commit
  * 1.2s after the commit

LINKS

PR #36654
Task 2070602

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 10:44:22 +02:00
Odoo's Mergebot 5dc97ee7da [MERGE] sms, mass_mailing{_sms}: implement YAB2B
PURPOSE

Once SMS Marketing has landed, a few comments/reviews to improve the interface,
clarify buttons and actions and ease the onboarding.

SPECIFICATIONS

[FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action :
When we click on the cancel button of the sms form view, get traceback.
Fix the issue by adding the cancel action in sms model.
- Mass mailing contact - False as the display name :
The display name was the mail address but when the contact didn't have
mail address a ugly False was print to described the contact (form view).
Then change the _rec_name to print the name as the display name.
- Fix SMS composer for the res.partner tree
Only the first record was truly selected when open the sms composer
(mass) from the tree view of partner. Fix that by bind the actives_ids
in the context and also fix the names of related actions.

[IMP] sms: allow to preview a sms template
Add a way for the user to preview sms content from a sms
template depending of a record (targeted model) and the
installed languages (as for the mail template). Add button
to open this preview on the form of the sms template.

[IMP] sms: allow to create a sms context action from template
In the SMS template, we add the ability to create (and remove)
a contextual action on the targeted model from a sms template.
We change the sms composer to guess the composition mode,
and then to be usable by contextual action. The guess composition mode
works differently if there are multiple target
selected (mass) or a single target (comment).

[IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

LINKS

TASK_ID : 2053631

closes odoo/odoo#36286

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 10:44:08 +02:00
ryv-odoo 8e2da3b4d6 [IMP] (sms_)mass_mailing: improve interface
- Change the name of "Mass SMS" by "SMS Marketing"
- Improve the Mass Mailing views (kanban, form)
- Improve the Mass SMS views (kanban, search, form)
- Hide the sanitized numbers from views (sometime replace by mobile)
- Fix demo data of sms
- Explain the language field of sms template
- Improve the render of the sms composer wizard

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo e4afa5d6d0 [IMP] sms: allow to create a sms context action
In the SMS template, we add the ability to create (and remove)
a contextual action on the targeted model from a sms template.
We change the sms composer to guess the composition mode,
and then to be usable by contextual action. The guess compostion mode
works differently if there are multiple target
selected (mass) or a single target (comment).

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 076e71cb5b [IMP] sms: allow to preview a sms template
Add a way for the user to preview sms content from a sms
template depending of a record (targeted model) and the
installed languages (as for the mail template). Add button
to open this preview on the form of the sms template.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
ryv-odoo 8ef1543908 [FIX] sms - mass_mailing: fix some bugs
- Cancel button in the sms form view not related to a action :
When we click on the cancel button of the sms form view, get traceback.
Fix the issue by adding the cancel action in sms model.

- Mass mailing contact - False as the display name :
The display name was the mail address but when the contact didn't have
mail address a ugly False was print to described the contact (form view).
Then change the _rec_name to print the name as the display name.

- Fix SMS composer for the res.parnter tree
Only the first record was truely selected when open the sms composer
(mass) from the tree view of partner. Fix that by bind the actives_ids
in the context and also fix the names of related actions.

TASK_ID : 2053631
2019-09-12 14:53:44 +00:00
wan f97c902847 [FIX] account: multi-company CoA installation
With the changes in the ORM, the method _compute_has_chart_of_accounts is now also called after the create, erasing the value of chart_template_id.
We cannot set that field as related to the company because set_values checks if the value changes and it wouldnt be the case if we already changed it at the validation of the config form.

So this commit checks if there is already a value before setting the default.

closes odoo/odoo#36780

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-12 14:51:33 +00:00
sri-odoo 94b3e339ba [REF] web: extend ui colours
closes odoo/odoo#36781

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-12 12:45:53 +00:00
Raphael Collet 5450f03038 [FIX] product: cannot order by many2many field
closes odoo/odoo#36789

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-12 13:53:12 +00:00
Raphael Collet 2cfdb12cb0 [FIX] website_hr_recruitment: cannot order by non-stored field 2019-09-12 13:53:12 +00:00
Raphael Collet 2ac4f2ee0f [FIX] purchase_requisition: cannot order by non-stored field 2019-09-12 13:53:12 +00:00
Raphael Collet 8546d07d0f [FIX] mrp_subcontracting: cannot order by many2many field 2019-09-12 13:53:12 +00:00
Raphael Collet 558d675529 [FIX] crm: cannot order a model by a non-stored field 2019-09-12 13:53:12 +00:00
Yannick Tivisse 1b454088e6 [FIX] models: warn on ignored fields in "order by" 2019-09-12 13:53:12 +00:00
Mathieu Duckerts-Antoine b39affc496 [FIX] web: click on an embedded pivot view cell does not causes a crash
The custom event 'open_view' triggered by the pivot
renderer was not stopped in the pivot controller. This
used to cause a crash because the dashboard controller
also listens to a custom event with the same name but
following another logic.
The present fix simply stop the propagaton of the event.
A test has been added in the module web_dashboard.

closes odoo/odoo#36466

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-12 13:09:35 +00:00
Raphael Collet 44ea2adda7 [FIX] fields: conversion of Many2oneReference value
The value of that field can be given as a dict containing the fields of
the corresponding record.

Co-authored with Michael Mattiello <mcm@odoo.com>

closes odoo/odoo#36779

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-12 12:23:55 +00:00
Xavier ALT 21fa7ca76f [ADD] base: add Luxembourgish language
Add luxembourgish language code in order to be able to translate terms
for that language in Odoo.

closes odoo/odoo#36757

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-12 12:12:17 +00:00
Kaushalya Mandaliya 710406e935 [IMP] website: UX improvements in Optimize SEO Dialog
Added cursor pointer when hovering a keyword in Related Keywords and
added relevant tooltip for the better user experience.

Renamed classes:
js_seo_keyword_suggestion -> o_seo_keyword_suggestion
js_seo_suggestion -> o_seo_suggestion

task-2070946
closes odoo/odoo#36709

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-09-12 10:58:57 +00:00
Sébastien Theys c8f2924c66 [IMP] mail: use _message_log_batch in create
For 1000 records, these specific lines take:

- 2.1s before the commit
- 1.2s after the commit

Almost 2 times faster.

PR: #36654
Part of task-2070602
2019-09-12 08:45:51 +00:00
Sébastien Theys 665c1035fc [IMP] mail: call _add_default_followers only once in create
There was no reason to call the method many times in the loop as its result
does not depend on `vals_list`.

PR: #36654
Part of task-2070602
2019-09-12 08:45:50 +00:00
Sébastien Theys 35ccc8bb06 [IMP] test_mail: update query count to reflect improvements
Set threshold to actual values since these have not been updated after recent
improvements.

PR: #36654
Part of task-2070602
2019-09-12 08:45:49 +00:00
Pierre Masereel dc2e990aec [FIX] delivery: get correct carrier for invoicing policy
The carrier argument passed to the _create_delivery_line function
can be different to the carrier already existing in the sale order
so we should use the correct setting of carrier where we are calling
the function.

closes odoo/odoo#36424

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 05:28:49 +00:00
Joseph Caburnay 26b692cbe2 [FIX] delivery: warning message in the delivery wizard is not updated
When a warning is generated when rating a delivery method, the warning
message remains when changing to a different delivery method that isn't
supposed to give a warning.
2019-09-12 05:28:49 +00:00
Joseph Caburnay bdb1ce15f2 [FIX] delivery: delivery line is not set to zero cost
If the chosen delivery method has free_over active, and if the cost
of the sale over exceeds the free_over amount, the delivery line
should have price_unit of zero.
2019-09-12 05:28:49 +00:00
Ivan Yelizariev c0a897d528 [IMP] point_of_sale: get login_number in the same transaction as update it
Otherwise, if two POS stations are using the same user with the same pos.config,
i.e. create two session AND if you have bad luck, then those sessions will get
same login_number, which leads to losing half of orders, because POS stations
will generate same pos_reference and only first order from the POSes is saved,
while another order is lost without let know to cashier.

closes odoo/odoo#24486

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-12 11:36:39 +00:00
Raphael Collet bf8d288d04 [FIX] base: simplify computation of commercial_partner_id
The computation was using an SQL query to speed it up, but the recent
changes in the ORM have made this optimization useless.

We have benchmarked an import of 10000 partners linked to the same
parent, in a database with Sales and Stock installed.  The import is
slightly faster without the SQL query (7 min vs 8 min).

closes odoo/odoo#36768

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-12 10:28:55 +00:00
RomainLibert 3b08cd15b1 [FIX] l10n_hr: add internal_type to account type
closes odoo/odoo#36742

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-09-12 07:35:41 +00:00
wan 4d38d04d81 [FIX] account: width of scrollbar in account searchpanel
When there is a lot of data to be displayed in the searchpanel, the scrollbar appears. The with of the scrollbar takes too much space compared to the width of the custom searchpanel.
This commit reduces the size for Chrome and Firefox >= 64

closes odoo/odoo#36758

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-09-12 09:29:01 +00:00
Julien Castiaux 51a602824c [FIX] account: inherits key is define in the backend
Install Account, do an invoice, send and print it. Install
snailmail_account, do the same process. The wizard refuses to send the
email because the Compose field is empty.

The `account.invoice.send` model is defined with an `_inherits` to
`mail.compose.message` on the `compose_id` key. When the model is first
created, that `compose_id` key is left unpopulated on the view as the
referenced model is not created yet. Hence posting the view is
impossible as it fails the form validation.

closes odoo/odoo#36715

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-12 07:46:39 +00:00
Joseph Caburnay 25b7494e77 [FIX] point_of_sale: make the email button behave as the invoice
This commit makes the email button to behave consistently with the
invoice button. Basically, if there is no selected customer when
invoicing, the UI should direct the user to select a customer. This
behaviour is implemented with the email button with special check on the
validity of the customer email.

closes odoo/odoo#36681

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 08:21:44 +00:00
Laurent Smet 7965c890c4 [IMP] l10n_generic_coa: Improve demo data
To get a better overview of the groupy view like "Sales Journal",
we need some attachments on invoices.

Furthermore, the product's label was missing on all invoice lines.

closes odoo/odoo#36573

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-11 14:26:52 +00:00
wan 92d661b427 [IMP] account: allow partial reconcile with same amount_currency
Task 1902206
When importing from winbooks, there might be entries with the amount_currency that matches but with an exchange difference that was not yet created. This commit allows to do a reconciliation without trying to do a full reconcile if it is the case

closes odoo/odoo#35055

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-06 15:15:50 +00:00
wan ef94a64754 [FIX] mail: bad indentation
The indentation leaded to
UnboundLocalError: local variable 'attachement_values_list' referenced before assignment
2019-09-06 11:50:23 +00:00
wan 54bfa09570 [FIX] account: constraint _check_duplicate_supplier_reference using wrong field 2019-09-03 13:36:41 +00:00
wan 390af4f6cb [REF] account: allow to add steps in onboarding
Task 1902206
2019-09-03 13:36:18 +00:00
wan 5a83187773 [IMP] account: remove old followup variable and methods
Task 1986647

With the reworking of the account_report_followup module, these variables and methods are no longer needed. Now everything is done with followup levels, with only one level by default
Also rename account_report_followup to account_followup.

closes odoo/odoo#35772

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-10 10:59:01 +00:00
Joseph Caburnay c7ee7ce8e0 [FIX] pos_adyen: active constraint if the identifier is empty
Disqualify the constraint in the adyen identifier if it is empty because
it is not needed in other payment methods that are configured with other
payment terminal.

closes odoo/odoo#36702

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 05:34:09 +00:00
Joseph Caburnay a0c5a3cc4a [FIX] point_of_sale: payment terminal credentials in cash payment method
Hide all fields related to payment terminal if the payment method is
cash.
2019-09-12 05:34:09 +00:00
Mitali PatelandMohammed Shekha a3845ae3f0 [FIX] base: ask to discard before leaving settings
In a settings form view, do some changes, then click on a button
or link in the form (e.g. 'Manage Users' in General Settings).
We now ask if the user wants to discard the changes before leaving
the page.

Task 1921574

closes odoo/odoo#34799

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-09-12 06:21:41 +00:00
Pierre Paridans 1609d705c2 [FIX] point_of_sale: crash on PosModel#destroy
During PosModel#destroy some undefined methods are called.

This commit replaces them with the correct one.

closes odoo/odoo#36706

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-11 13:09:37 +00:00
RomainLibert bc407fd18e [FIX] hr_holidays: do not create activities automatically
closes odoo/odoo#36720

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-11 14:59:26 +00:00
Yannick Tivisse 46bd223a4b [FIX] hr_contract: Fix kanban_state layout issue
closes odoo/odoo#36713

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 14:08:40 +00:00
Antoine Prieels 9fff495927 [FIX] hw_drivers: Fix get_wifi_essid helper
The `get_wifi_essid` function was moved to the helpers file, but the
`self` argument was not removed from the function's signature.

closes odoo/odoo#36710

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-11 13:47:36 +00:00
Jairo Llopis 4497077f55 [IMP] base: allow private addresses for contacts
For contacts without company, it was not possible to modify the type
and set a private address

opw-1944234

Closes odoo/odoo#31491

closes odoo/odoo#36701

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-11 12:51:42 +00:00
jbm-odoo 73498572c3 [IMP] hr: Employee Profile set readonly attribute on readonly field
closes odoo/odoo#36698

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 14:00:39 +00:00
Thibault Delavallée c3b5f31307 [FIX][IMP] website_slides: move youtube dependent tour in its own tour and test
Contacting youtube API sometimes fails making falsy red runbot. In this commit
we remove video from member tour so that it tests the interface. Some demo
slides with youtube video are added in another course and new test is added
that crawls that channel.

Task 2066565

closes odoo/odoo#36697

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 12:39:26 +00:00
Jairo Llopis eebb8e1484 [FIX] *: remove buggy calls to with_context
When .with_context() is called with a dictionary as 1st positional
argument, it will replace context (and not modify the referenced keys)
It may create bugs when losing the content of the context (e.g. remove
partner's language)

This is a cherry-pick to saas-12.5 of odoo/odoo#36164 of the logistic
part as discussed

closes odoo/odoo#36690

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-11 11:17:50 +00:00
RomainLibert f2b4d98871 [FIX] l10n*: use standard account type instead of specific one
Some l10n were creating a specific account type for the off balance
    accounts, there is now a new account type defined for thsi in the
    account module

closes odoo/odoo#36432

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-10 12:42:47 +00:00
David Beguin 3cd5107316 [ADD] website_crm_livechat : add sessions stat button on lead form view
To ease the marketing and lead follow up, a stat button about
livechat sessions of the lead (that comes from the website_visitor model)
is added to the crm.lead form view.

This button displays and redirect to a list of all the sessions
from all the visitors related to the lead.

Task ID : 2057428
PR #36180

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 14:12:07 +00:00
David Beguin 7759db881d [REF-IMP] website, website_crm : handle visitors at merge leads and readd page_views stat button on leads
In order to keep all the visitors from all the leads to merge,
the relation between leads and visitors becomes a many2many.
So that after the lead merge, a lead can have multiple visitors.

This commit re-add the page view stat button that were removed
during website_visitor introduction and page tracking refactoring.
This button counts all the pages views from all the visitors linked
tho the current lead. Clicking on it redirect to the complete
navigation history, from all visitors linked to the lead.

Task ID : 2057428
PR #36180
2019-09-11 14:12:06 +00:00