Commit Graph
129123 Commits
Author SHA1 Message Date
David Beguin a8ce2886be [FIX] im_livechat : avoid to send twice first operator message to visitor
What was going on here is that when the operator start the discussion with the visitor
and the visitor navigates to a new page, the livechat button widget checks the
cookie and see there is already a active conversation.

It loads the mail_channel and write all the history of the conversation.
So the first message is writting a first time.

Then, it handles the notifications. As the visitor did not receive the
first message notification yet, the first message notification comes up
and the widget handle it. Adding the message a second time.

To avoid this, we just stop the notification handling
if the message is already present in the conversation.

Task ID: 2028059
PR #34624
2019-08-19 06:33:37 +00:00
David Beguin 498d2a8080 [IMP] website_crm : link crm.lead to website.visitor
If a website_visitor submit a contact form (and becomes a lead),
the website_visitor is linked to the crm.lead.

the website visitor name is than adapted to match the name of
the first crm.lead linked to the visitor, ONLY if the visitor doesn't
already have a res.partner.

A visitor can have multiple crm.lead as he can send multiple
contact form and create multiple leads.

Task ID: 34624
PR #2028059
2019-08-19 06:33:37 +00:00
David Beguin 6bec0e4d29 [IMP] website : add website visitors activity tracking
This commit adds the website_visitor model that will be used
to track website visitor activity (page viewed, number of visits and
more general info about the visitor (country, lang, etc..)

This model will, in later commit, be used to send chat requests
and push notification from the operators (or backend users)
directly to the visitor.

- A website_visitor is created once the visitor is requesting
a website.page that is tracked.
- A website_visitor is considered as connected if his last tracked
website_page request is within the last 5 minutes.
- The number of visits for a website_visitor is incremented
if his last tracked website_page request was at least 8 hours ago.
- A website_visitor is only handled by the system. Users cannot
create, edit or delete a website_visitor.
- A unique website_visitor is created per website.
That means that the same real person can triggers multiple visitor
creation if visits multiple websites.
This is because, for livechat purpose on later commit, for example,
the chat request can be created on the correct livecaht channel
(linked to the correct website)
- The visitor is recognized via his cookie (visitor_id). So if the visitor
flush his cookies, a new visitor will be created the next time he will
request a tracked website_page.
- Link user's res.partner to website.visitor.
    If a website_visitor log in
    (a visitor that has visitor_id in his cookie),
    the website_visitor is linked to the res.partner.
    The website visitor name is than adapted to match the name of
    the first res.partner linked to the visitor.
    A visitor can have multiple partners as the same session
    can be used by multiple person (one PC for a team for example).

To keep a detailed history of the visitor page views,
we add a website.visitor.page model that makes the link
between visitor and website.page but that keeps the visit date.
So that we can see if a visitor went mulitple times
on the same page and when. It's usefull to see his last page views.

Task ID : 2028059
PR #34624
2019-08-19 06:33:37 +00:00
svs-odoo be909644f2 [FIX] sale_stock, stock_account: refund return
When create a return from a delivery order, the field `to_return` must
be True, so the delivered quantity of the sale order will be updated by
default. But it wasn't the case before this commit !
Thus, adds a test to be aware in the case something goes wrong again.

Task #2050183

closes odoo/odoo#35733

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-14 14:41:35 +00:00
Damien Bouvy 9133f120f8 [FIX] payment: hide state for non-available providers
closes odoo/odoo#26427

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-16 15:52:40 +00:00
Damien Bouvy 5193f0d010 [IMP] payment*: better handling of error message
Sometimes there's a title + content, sometimes not; reading the message
itself usually yields a None somewhere which is fugly.
2019-08-16 15:52:40 +00:00
Damien Bouvy c284bda4b0 [IMP] payment: handle pending tx in /pay
let the landing page handle the message to display instead of
intercepting the state in the controller.
2019-08-16 15:52:40 +00:00
Damien Bouvy 45c2e06095 [IMP] payment: allow hiding the error messag in payment_form 2019-08-16 15:52:40 +00:00
Johan Demaret Rivarola e01d559f9d [IMP] payment: support SEPA Direct Debit acquirer
The purpose of this commit is to expose SEPA Direct Debit acquirer to
the Odoo community edition. The dedicated module, though, is restricted
to the enterprise edition.

Minor changes in following modules:

- base: added ir.module.module record

- payment:
  - added data to expose the new payment acquirer.
  - added 'to_buy' field to track whether the payment acquirer is
    restricted to enterprise users.
  - allow multi word payment acquirer name. It was breaking on the first
    underscore.

task-1870363
closes odoo/odoo#26427
2019-08-16 15:52:39 +00:00
Johan Demaret Rivarola d72117dcd0 [IMP] l10n_us: hide aba_routing for IBAN accounts
The field is irrelevant for IBAN accounts.

task-1870363
closes odoo/odoo#26427
2019-08-16 15:52:39 +00:00
Sébastien Theys d0cf08aa57 [FIX] portal: prevent crash on chatter post if no attachment given
Follow up of 3620cb68a0

`split` called on an empty string returns a list containing the empty string.
The previous commit assumed it was returning an empty list.

closes odoo/odoo#35773

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-16 15:26:59 +00:00
lbs-odoo 9a0fedfc65 [IMP] various: improve searchviews UX
Improve searchviews UX in all the modules

TaskID: 2029731

closes odoo/odoo#35700

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 13:35:21 +00:00
shreya thakrar bf347e7727 [IMP] hr_expense: Improve general UX (back2basics)
For better user experience, there should be a 'UPLOAD' button on'hr.expense'
through which user can directly upload a single or multiple documents and
according to the number of documents, blank expense record with attached
document should be generated. These records should be in 'draft' state.

TaskID: 2040887

closes odoo/odoo#35400

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 15:00:13 +00:00
Kevin Baptiste d3a6330b2b [IMP] hr_recruitment: improve usability (back2basics)
TaskID: 2053569

closes odoo/odoo#35767

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 13:22:29 +00:00
Victor Feyens 3bfde1891f [FIX] account,product: product UI
closes odoo/odoo#35756

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-16 10:12:42 +00:00
Victor Feyens 8fd2455742 [MOV] sale_management -> sale: invoice creation from sale_order.
Enable invoice management from sale order in all modules having sale as dependency.

closes odoo/odoo#35658

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-12 10:07:39 +00:00
Victor Feyens c396d806a5 [REM] sale_management: no impact view extension
> invoice_status is never invisible in sale order tree to begin with.
2019-08-12 09:28:52 +00:00
Yannick Tivisse abd73d61a2 [IMP] hr_holidays: Improve general UX (back2basics)
TaskID: 2053585

closes odoo/odoo#35737

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:24:04 +00:00
Prakash Prajapati c058562d73 [IMP] various: Add multi company domains on views
When the many2xxx field relates to a model where company_id is required, set
this  domain [('company_id','=',company_id.id)]

When the company_id field of the related model is not required, set this domain
['|',('company_id','=',company_id.id),('company_id','=',False)]

When setting the domain on a field which is in the treeview of a xxx2many field
evaluate against the company_id of the 'parent'.

Some constraints have been added on sereval models. Take a look at the complete
specification for more details.

TaskID: 2024446
Closes: #35266

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-16 11:17:28 +00:00
Prakash Prajapati 25714692b2 [IMP] base: remove the 'Shared contacts book' general setting
The Common partner contact setting is removed from general settings because its
behavior wasn't really clean from a technical point of view
(disabling the rule on partner access) and wouldn't work as well with new
multi-company logic.

The default logic of sharing partner will be kept, but when someone wants to
limit partner sharing, he will do so partner by partner, by
setting the company_id.
Also, the default company_id on a partner will be blank so default partner
will be a sharable by multi-company.

when the partner is created at the time of user creation then the partner's
company will be the same as user's company.and when the partner is created at
the time of company creation(partner related to company) then the company of
partner will be newly created company.

task-2024446
Closes: #35266
2019-08-16 11:14:58 +00:00
Yenthe666 69f192eeef [IMP] website_forum,slides: add name on main elements for easier xpaths
closes odoo/odoo#35561

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-16 09:12:48 +00:00
Julien Mougenot 955856abf4 [FIX] web: no selected records after multi edition
After editing multiple record, we want don't want any
record selected. This commit ensures that.

closes odoo/odoo#35678

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-16 09:03:49 +00:00
Julien Mougenot dd27b2e9c6 [FIX] web: multi edition in editable listviews error handling
Fixed crashes/incorrect behaviours in multi edition in the list views.
The solution to these problems was mainly to refactor the function
used to save multiple records.

Before this commit:
- Cancelling the confirmation dialog in multi edition caused
the edited record to be editable but disabled
- Saving an empty field in multi edition triggered a JS error
- Static confirmation message ("saving 0 valid records")

After this commit:
- Ability to cancel confirmation
- Proper error display when trying to save empty fields
- Message consistent with the situation
2019-08-16 09:03:49 +00:00
Julien Mougenot 291dad6bc8 [FIX] web: fixed crash in editable grouped lists
Adding a line in grouped listviews caused a crash in some cases.

Steps to reproduce:
- go in any grouped editable list view
- click on any "Add a line" cell, but not on the link itself
- press ENTER

Before this commit:
A crash occured. Unable to add a new line. Needed to refresh the page.

After this commit:
Line addition functionnality properly working even when selecting the outer cell
2019-08-16 09:03:49 +00:00
Julien Mougenot 4817c7f08f [REF] web: fix typos and incorrect variables
In this commit:
- removed an unused event handler
- fixed an overriden variable used in a subfunction
- fixed a variable mismatch

No bug was induced by these issues until now so it doesn't impact
any behaviour. This is just an extra security for the future.
2019-08-16 09:03:49 +00:00
Julien Mougenot 3c372d1da8 [FIX] web: prevent unwanted click on enter keypress
Pressing ENTER on a button element triggers an additionnal 'click' event.
Since this 'unwanted' click caused some issues in a few cases, we prevent it.
Moreover, there isn't currently any known case in which this event is useful.

Before this commit:
No modification of the initial behaviour on ENTER key

After this commit:
ENTER key pressed in abstract fields has its default behaviour suppressed
2019-08-16 09:03:49 +00:00
Julien Mougenot f88577ec70 [FIX] web: correctly display styles in list view
Before this commit, there was a slight offset preceding list selectors,
and the red border of invalid fields was not shown in community.

Now list selectors are correctly displayed as well as invalid fields.
2019-08-16 09:03:49 +00:00
Julien Mougenot b416c15a77 [IMP] web: dialog triggers custom callback on close
Added an option in the Dialog class to give it a function to run
when it's closed by other ways than by its buttons.
Its default value is the "cancel" callback if given, or none.

Before this commit, there was no way to add any callback to run
when the modal wasn't closed by a button.

Now, when exiting the modal by other means (e.g.: "Escape" key),
it will run a given callback.
2019-08-16 09:03:49 +00:00
Julien Mougenot bec84c10a1 [IMP] web: keyboard navigation between searchbar and renderer
This change allows direct keyboard navigation between the current action
searchbar and renderer.

Focus can now be toggled using DOWN arrow when focusing the searchbar
or the UP arrow when focusing the top cell/record of a kanban or a list.
2019-08-16 09:03:49 +00:00
Yenthe666 0aea29da8d [IMP] website_blog: set blog posts as articles with extra SEO tags
closes odoo/odoo#35060

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-16 08:02:42 +00:00
Arnaud Baes b7e37fe608 [IMP] stock: inventory view cleanup
closes odoo/odoo#35719

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-08-14 13:12:58 +00:00
Arnaud Baes a587493a31 [IMP] stock: Forecast Report cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes f60120ff85 [IMP] stock: Variants menu entry cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes fc0ccc0334 [IMP] stock: inventory lines view cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes 10e8e26465 [IMP] stock: product views cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes bee938e03d [IMP] stock: quant views from product cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes 9477e87ec1 [IMP] stock: Reordering rules views cleanup 2019-08-14 13:12:58 +00:00
Arnaud Baes fa859e1220 [IMP] stock: scheduled date on picking 2019-08-14 12:27:05 +00:00
Arnaud Baes a56b62961d [ADD] stock: Delivery Methods setting 2019-08-14 12:27:05 +00:00
Arnaud Baes 2f2e12eea1 [IMP] stock_picking_batch: Views cleanup 2019-08-14 12:27:05 +00:00
Arnaud Baes 5a70d10439 [IMP] product,delivery: package views cleanup 2019-08-14 12:27:05 +00:00
Arnaud Baes 689dab3f26 [IMP] stock,product_expiry: lot views cleanup 2019-08-14 12:27:05 +00:00
Arnaud Baes ced76bddab [IMP] stock, stock_account: move views cleanup 2019-08-14 12:27:05 +00:00
Arnaud Baes 1adee2bd8d [IMP] stock: scrap views cleaning 2019-08-14 12:27:04 +00:00
Arnaud Baes 9aa5410835 [IMP] stock: set move's picking description as optional in picking views 2019-08-14 12:27:04 +00:00
Arnaud Baes a1759efe69 [ADD] stock: Deep Learning to automatically detect the type of the processed quantities 2019-08-14 12:27:04 +00:00
Arnaud Baes dbafe14735 [IMP] stock: hide columns on picking type tree view 2019-08-14 12:27:04 +00:00
Arnaud Baes 062ad598bf [IMP] stock: default sequence for picking types 2019-08-14 12:27:04 +00:00
Arnaud Baes 9410e0ce00 [MOV] stock, stock_barcode: barcode fields in views 2019-08-14 12:27:04 +00:00
Arnaud Baes fcce6a2f82 [REF] stock, mrp: codes on picking type 2019-08-14 12:27:04 +00:00