Commit Graph
129150 Commits
Author SHA1 Message Date
Arnold Moyaux 319ae31860 [FIX] stock: same origin documents
Create two moves with a product MTO and the same SO.
Confirm them. It will generate a new picking without origin.
However the purpose of removing origin on picking is to avoid
an endless enumaration of all documents but if they only have
one origin it should be display.

In this case, the origin was ignored because moves.mapped('origins')
result in a list of ['doc_origin','doc_origin'] and have a length
of 2 because .mapped do not return a distinct set on fields different
than Many2one, one2Many and M2M.
2019-08-19 15:03:59 +00:00
Arnold Moyaux 37200abfc5 [REF] mrp_subcontracting: lot produced/consumed management
Currently, the subcontract picking present multiple difficulties:
- The user has to introduce multiple time the lot produced.
In register components button and then create a new move line with
the show details operation button.
- Same problem with the correction system. The user has to modify the
lot in details operation and then go on the subcontract production and
unlock and edit it.

In order to facilitate those behavior. A move line will be automaticaly
created during the register components process. Also the subcontract
moves for components will be available in the detail operations tab.
2019-08-19 15:03:59 +00:00
Arnold Moyaux 6c09ffb634 [FIX] mrp_subcontracting: remove hook
The hook only generate a useless rule. It has been already
generated in stock_warehouse.py. Also remove the hook method
and add it in data file.
2019-08-19 14:14:13 +00:00
Arnold Moyaux abc8253448 [FIX] mrp_subcontracting: extra move correctly handle.
Usecase to reproduce:
- Create a receipt of 1 units of a subcontracted product
- Receive 2
- Validate the receipt

-> An extra move for subcontractor of 1 has been validated but a
new move of 2 still in waiting availability and can not be
validated.

It happens due to action_done that will validate existing subcontract
order (with the initial quantity). Then the move is validated and an
extra move is created and merged in the first one. This new merged
move of 2 is then confirmed and validated. That will recreate a
subcontract order of 2 that will not be validated since it was validated
in the picking action_done at the start.

This commit will modify:
- action_done on move in order to validate the subcontract order after
the move validation and the new subcontract order creation too.
- action_confirm in order to create the subcontract order with the
additional quantity and then merge it to the existing moves.
2019-08-19 14:14:13 +00:00
Arnold Moyaux 44507c039e [FIX] mrp: change production quantity is wrong on finished moves
Usecase to reproduce:
- BoM -> 1 component for 1 final product
- Create a MO with a quanity of 5
- Update the quantity to 6

-> The move finished has an initial demand of 4
2019-08-19 14:14:13 +00:00
Janusz Harkot 876c7522fc [CLA] signature for trilab
closes odoo/odoo#35787

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-19 14:24:29 +00:00
Pragya Ladda 438724b71f [IMP] event: add kanban view for attendees
Stat button "Attendees" of an event now redirects to Kanban view
of attendees (previously redirected to List view).

Task-ID 1935268

closes odoo/odoo#31621

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-19 13:57:30 +00:00
Robot Odoo aefc608a0f [IMP] mail: mobile: adapt discuss for mobile
Task ID : 1895453

closes odoo/odoo#35583

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-19 17:14:30 +02:00
Romain Estievenart 3ad7706560 [IMP] mail: adapt responsive rules to allow swipe
Removing these margins makes swipe on 'o_mail_preview'
nicer in enterprise without having blank spaces.

Note that these rules should be in enterprise.

Task ID : 1895453
2019-08-19 13:01:30 +00:00
Romain Estievenart f7fa3b7677 [REF] mail: MessagingMenu: extract "mark as read" code to dedicated method
This allow us to reuse this logic in enterprise when you swipe.

Note that we could have directly called the handler but the name
wasn't appropriate. So we preferred to extract some code in a
well named function.

Task ID : 1895453
2019-08-19 13:01:30 +00:00
Romain Estievenart dfa64cb7fe [MOV] mail: move dedicated mobile file 'discuss_mobile.js' to mail_enterprise
These files are moved to be able to add some new responsive features
implemented in enterprise.

Task ID : 1895453
2019-08-19 13:01:30 +00:00
Yannick Tivisse e631dbc182 [IMP] hr: Improve general employee form UX (back2basics)
TaskID: 2054559

closes odoo/odoo#35802

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-19 11:10:03 +00:00
Wolfgang Taferner 02f2691bff [REF] l10n_at: complete refactoring
As the available Austrian Localization was very basic and migrated for
years without any contribution or consolidation, a complete refactoring
was contributed by WT-IO-IT GmbH to move forward.

closes odoo/odoo#35642

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-19 09:54:06 +00:00
Meghna Jaswani 9b49f00078 [IMP] l10n_multilang: Added translate True on account.tax.report.line
Both the name and the tag_name need to be set as translatable.
As the tag_name is seen by the user for the configuration.

Unlike the financial reports that are linked to multiple countries,
the tax report is linked to just one country. This way it makes sense
to only make it translatable in multilang.

Task: 2042430

closes odoo/odoo#35436

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-05 14:38:52 +00:00
Martin TrigauxandRaphaël Collet 7593b887df [REF] fields: use ir.model.fields.selection
The selection values of a selection field are now stored in database in the
model ir.model.fields.selection

This will allow to have a modular approche on selections and each selection
is now linked to the module that declared it.
Previously to this change, the selections were linked to the field, meaning
uninstalling a module had no impact on the selections stored on database.

With this change, the selections will now be translated in the correct module
(having an external id) and the records having a used selection will now be
reset to null.

closes odoo/odoo#30228

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>


Co-authored-by: Raphaël Collet <rco@odoo.com>
2019-08-19 11:44:34 +00:00
Pierre Masereel a248171d96 [IMP] point_of_sale: improve consistencies between models
The deletion of some records can create inconsistencies in the
point_of_sale.

It can create inconsistencies when a session is open, for example if you
delete a partner that can be set on a pos order. You'll also got
problems if you remove an employee and this employee can be used in an
open session.

We also avoid to get point_of_sale config inconsistencies, by deleting
models required by it. If you delete a picking type used in a pos
config or a sequence.

To avoid all this consistencies, we have restricted the deletion of some
records in specific cases.

TASK-ID: 1879971

closes odoo/odoo#35793

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 08:04:31 +00:00
Damien Bouvy 1699be05da [FIX] sale_crm: wrong date field since 0cc30bf
closes odoo/odoo#35798

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-19 08:39:17 +00:00
Hardik Prajapati 230c544caa [FIX] website_slides: fixed the traceback when add a new section on a course
in this commit, we have set the correct attribute(field's name) to fix
the traceback while we adding a new section on a course using website

task-2053822

closes odoo/odoo#35786

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-19 06:21:06 +00:00
Antoine Prieels 8710a28b29 [FIX] point_of_sale: CSS for receipt was not loaded correctly
The CSS for receipts to be printed was not loaded correctly in the POS.
The format of the receipt was wrong and the printing failed.

closes odoo/odoo#35768

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-08-16 13:46:20 +00:00
Joseph Caburnay 2913337fd7 [IMP] point_of_sale: B2B ease navigation within PoS
TASK-ID: 2050245

closes odoo/odoo#35716

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-19 07:27:13 +00:00
MaxLarue 632c04a1cc [IMP] project: increase task kanban readability
The goal of this commit is to provide better readability on kanban cards.
It will:
- move deadline to the bottom of the card
- add a line-break between project and customer
- display task deadline not in italic

related task 2009563

closes odoo/odoo#34599

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-08-19 06:40:39 +00:00
MaxLarue 9b8d7259fe [IMP] web_gantt: allow to show thumbnails on gantt
For some fields (especially employees) it is nice to see a picture of the model on the gantt row in order to quicly identify which record is concerned. This is obvious for employees where we display their avatar picture but might be handy for other models as well. This commit introduces this functionality.
In order to activate it you should declare a avatars attribute on the gantt arch.
It is a python dict which keys are the fields name for which a thumbnail should be displayed (ie: 'employee_id') and the values are the fields on that model that hold the image (ie: 'image_small).

If none is defined or the row isn't currently grouped by this field, nothing is displayed.

NB: it is expected that the field name (key) is a relational field to another model which has a *image* field.

related task 2009563, 2000719, 2024216
2019-08-19 06:40:39 +00:00
MaxLarue 279d32beab [IMP] project: update task report for easier override
Aliasing the fields in the select clause of the task report allow to do joins latter when inheriting from this object without getting ambiguous fields errors.

related task 2009563
2019-08-19 06:40:39 +00:00
Romeo Fragomeli 6e04e59ec5 [REF] web: calendar: allow to override popover
This commit move some code to be able to override
Bootstrap popover in web_enterprise for mobile.

Task ID: 2052506

closes odoo/odoo#35727

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-19 06:10:27 +00:00
Robot Odoo a01b834e08 [MERGE][IMP] website, website_crm, website_livechat : add website visitors tracking and chat request from operators
This merge 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.

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 useful to see his last page views.

If a website_visitor submit a contact form (and becomes a lead),
the website_visitor is linked to the crm.lead.

If a website_visitor logs in,
the website_visitor is linked to the user's res.partner.

This also allows a livechat operator to send a chat request to a
connected and available website_visitor.

See sub commits for more detailed informations about functional flows
and technical changes/decisions.

Task : https://www.odoo.com/web?#id=2028059&action=327&model=project.task&view_type=form&menu_id=4720

Linked to enterprise PR odoo/enterprise#4834

closes odoo/odoo#34624

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-19 10:42:54 +02:00
David Beguin 3977e28baf [MOV-IMP] crm : move crm.lead.lang_id from enterprise to community
Since introduction of website_visitor,
we don't need to identifiy the lead with a lead_id cookie.
The visitor is identified and if a lead is created with the
contact form, the lead is created and linked to the visitor.

To avoid losing data, each time a visitor send a contact form,
it creates a new lead. All those leads are linked between them
via the website_visitor.

As the website_visitor already has the lang set on itself,
there is no reason to keep the lang_id of crm_lead at enterprise
side. So that lang_id on crm.lead has been moved to community.

This commit is directly linked to another one in enterprise
See https://github.com/odoo/enterprise/pull/4834 to get more details.

Task ID : 2028059
PR #34624
2019-08-19 06:34:20 +00:00
David Beguin 78e6ce3c3f [IMP] website_livechat : allow to send chat request to a website_visitor
This commit allows a livechat operator to send a chat request to a
connected and available website_visitor.

A visitor is considered as connected if his last tracked website.page request
was within the last 5 minutes.
A visitor is available if he doesn't have an active livechat conversation
(mail_channel with type = livechat).
  - If another operator sent him a chat request
  - Or if the visitor asked himself to speak with an operator
    (via the normal and existing flow)

A livechat conversation is active while the visitor haven't left the conversation.
An operator cannot leave a livechat conversation, only the visitor can.

The flow to send a chat request:
  - On the visitor view (tree or form), operator click on 'send chat request'
    (button or livechat icon)
  - A empty conversation with the visitor pops up at operator side.
  - While the operator didn't send a message, the visitor won't see the conversation.
  - The operator can type a message to the user
  - If the operator close the chat without sending any messages,
    the chat request AND the mail_channel are both deleted.
    In this case, the visitor is then available to send him a new chat request.
  - If the operator send a message, at the visitor's next action
    (page navigation on pages that allows livechat, based on livechat rules),
    the conversation will pop up at visitor side, using the livechat button widget.
    The visitor won't be able to request a livechat conversation with an operator until
    he leaves the chat requested by the operator.
  - Once the visitor leaves (with or without rating) the conversation :
        - the operator is notified that the visitor has left the conversation
        - the chat request is deleted to keep the chat request table clean and minimal
        - the livechat conversation if set to inactive.
  - The visitor is now available again to send him a chat request.

This feature uses the already existing livechat_session cookie mechanism,
so no further code modification was needed to make this work.
It's directly integrated is existing livechat flow.

The chat_request model is only useful to quickly check if a visitor has a chat request
and to send the livechat conversation info to the visitor via the livechat_session cookie.

This commit also add a website_visitor banner info on discuss view :

To be able to quickly see all the relevant information of a website visitor
while talking with in discuss view, a fixed banner have been added.
Only the discuss view will benefit from this because detached chatter window
is to small to display such banner.

Task ID: 34624
PR #2028059
2019-08-19 06:33:37 +00:00
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