Commit Graph
128195 Commits
Author SHA1 Message Date
Aaron Bohy e2893ce386 [REF] web: factorize no content helper
Different templates were defined for graph, pivot and cohort views
for the no content helper. Those templates were similar (only the
message sometimes slighlty changed). This rev. creates one generic
template used by those three views.

closes odoo/odoo#34916

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2019-07-17 06:54:49 +00:00
Robot Odoo 00c966b69a [ADD] iot: add iot serial drivers
So far there are no IoT drivers for serial equipment.

This adds a base IoT serial driver as well as a base IoT serial scale driver and drivers for the two previously supported scales. For the moment the scale drivers support both the old routes and the new event and action routes.

Task: 1892412

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#33800

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-07-17 15:34:26 +02:00
pha-odoo f87a443551 [IMP] pos: use iot scale
Before this commit the continuous reading of the scale
was started directly in `show`.

In order for us to be able to use the scale with IoT drivers
this piece of code needs to be overriden, so it was moved to a separate function.

Task: 1892412
2019-07-17 08:02:13 +02:00
pha-odoo c4aade63fd [IMP] iot: add iot serial drivers
This commit adds a base serial and a base serial scale iot drivers,
as well as drivers extending them for the two previously supported scales
(ADAM EQUIPMENT AZEXTRA and TOLEDO 8217).

Since just adding the new drivers creates a race condition
between the old drivers and the new, the old drivers need to be removed.

The IoT scale drivers need to be backward compatible and compatible with the community version,
so client using an IoT box with those versions can still connect a scale to the PoS.

Task: 1892412
2019-07-17 08:02:13 +02:00
David Beguin a0fc2210e6 [FIX] mail : enable to start livechat conversation
The public user doesn't have an email address.
To start a livechat conversation, the email of the user that start the
conversation is used. As the conversation was started in sudo,
the system user's email address was used.

But, since changes with sudo() and with_users(),
the public user is not able to start a livechat conversation
as the system email is not used anymore in this case as sudo is not
changing the user but only skip the user's access right.

To start a livechat conversation, and to post a message, at least
email_from must be filled in.
Anonymous name is used to fill in email_from to bypass the checks
and to build the author given back the thread window.
If anonymous name is empty, we fallback on the company's catchall email
from the mail.channel create user.

Pre-required for task ID: 2028059
Fix Task : 2037048
PR #34918

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-16 15:23:36 +00:00
Simon Lejeune ee50b4a20c [REF] stock_landed_costs: enabled for AVCO
mostly thanks to rev 168f4d75ef

task-1985422

closes odoo/odoo#34795

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-16 14:19:41 +00:00
Thomas Binsfeld d7b0e4b5b7 [IMP] point_of_sale: add hook for load_new_partners domain
To be able to change the domain

closes odoo/odoo#32982

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 13:26:45 +00:00
Martin Trigaux 5d57e1862f [MERGE] Forward port of saas-12.4 to master up to beba36416f
closes odoo/odoo#34924

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 15:45:24 +00:00
Martin Trigaux beba36416f [MERGE] Forward port of saas-12.3 to saas-12.4 up to 40421be73c 2019-07-16 16:36:40 +02:00
RomainLibert 02c48e71f0 [IMP] hr_timesheet: Improve general module UX (back2basics)
TaskID: 2025197

closes odoo/odoo#34855

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-16 12:03:42 +00:00
Martin Trigaux 40421be73c [MERGE] Forward port of saas-12.2 to saas-12.3 up to cf8e74a1a7
closes odoo/odoo#34907

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 11:44:38 +00:00
Martin Trigaux cf8e74a1a7 [MERGE] Forward port of 12.0 to saas-12.2 up to 1bd434da34
closes odoo/odoo#34901

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-16 09:14:17 +00:00
Martin Trigaux 1bd434da34 [MERGE] Forward port of saas-11.3 to 12.0 up to d8072d54ac 2019-07-16 09:22:49 +02:00
Lucas Perais (lpe) c8d10d228e [FIX] web: boolean widgets in editable list should activate the row
Put toogle_button or a favorite widget to handle a boolean field in an editable list
click straight up on the widget's button or link

Before this commit, the widget changed its appearence, but the changes were not
propagated to the model. This is because the controller will not force_save if its mode is edit
(to let changes piling up and save everything when clicking save), which is the case
of the editable list

After this commit, following what has been done at 2f5e44d40b
clicking on a widget in an editable list just activates the row for editing
but doesn't change the widget's value

OPW 2033700

closes odoo/odoo#34878

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-15 13:53:48 +00:00
Hetal Dhanak 044904b9d5 [FIX] purchase_stock: fix traceback upon changing schedule date
previously, when user tried to change the schedule_date, it
was being passed as a string instead of datetime. corrected
that.

Task-2034542

closes odoo/odoo#34873

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 13:38:59 +00:00
Martin Trigaux d8072d54ac [MERGE] Forward port of 11.0 to saas-11.3 up to d5dd136ba0
closes odoo/odoo#34872

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 13:32:07 +00:00
Martin Trigaux d5dd136ba0 [MERGE] Forward port of saas-15 to 11.0 up to 1d9f64c91e
closes odoo/odoo#34868

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 11:56:22 +00:00
Xavier-Do dd85e312cd [FIX] core: backport of 62533ec7 and f167ae7d
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.

In JS tests, when the ready code takes too much time, a warning is
logged. As a consequence, the runbot updates the github status as a
failure, causing real pain to people who simply wants to merge their
features.

With this commit the warning is changed into an info and the runbot will
be happy.

closes odoo/odoo#34865

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-15 11:37:14 +00:00
Martin Trigaux 1d9f64c91e [MERGE] Forward port of saas-14 to saas-15 up to 5d4c30cb59 2019-07-15 13:15:12 +02:00
Martin Trigaux 5d4c30cb59 [MERGE] Forward port of 10.0 to saas-14 up to bb712ad701 2019-07-15 13:10:00 +02:00
Aaron Bohy aac3059873 [FIX] web: wrap char fields in list views
This fix is similar as 793933a1, but for char fields. It prevents
cells containing char fields with long value from overflowing.

closes odoo/odoo#34739

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-15 09:45:31 +00:00
Goffin Simon 0e44904267 [FIX] stock: Delivery slip with serial number
Steps to reproduce the bug:
- Select template type boxed in general settings
- Select show serial/lot number in Delivery slip (in inventory - settings)
- Print the delivery slip with a non tacked product

Bug:

The delivery slip report displayed wrong columns.

opw:2031985

closes odoo/odoo#34852

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-15 08:43:59 +00:00
Arnold Moyaux ccbd6712f6 [FIX] mrp: MO change the quantity to 0
Usecase to reproduce:
- Create a MO for 5 final units
- Reserve all the components
- Produce 3 units
- Post Inventory (debug mode)
- Edit/Unlock
- Edit a line to consume to an arbitrary amount of quantity
- Change the product qty and set it to 3.

At this point, the reserved quantity and the quantity to consume
still the same than intialy even if the final quantity was updated.

- Mark as done

Then a move is marked as done withtout quantity done and still have
reserved quantity.

It happens because the _update_raw_move function do nothing if the
new quantity to consume is equals to 0.

The arguments returns in _update_raw_move still exists for override
but are not used by the chang_prod_qty method. It's not possible to
cancel the move and then find its parents in order to log the activity.

opw-2023653

closes odoo/odoo#34471

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-15 11:52:47 +00:00
mreficent d9b7cc7ab7 [FIX] purchase: not setting domain is not empty domain
Previous versions of this action had a domain. It was removed at 2d3e6d7383
Set explicitly an empty domain to force the removal when upgrading the module
Similar to 2d03ed43a5

closes odoo/odoo#34581

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 10:02:28 +00:00
Daniel Blanco 0eadcb9c53 [CLA] signature for Blanco Martin & Asociados Signing CLA
closes odoo/odoo#34844

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:30:05 +00:00
Grégory Schreiner 6a2be418f9 [CLA] signature for gregory-moka
closes odoo/odoo#34803

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:48:10 +00:00
bumanit eab60bd2e0 [CLA] Update bumanit CCLA
closes odoo/odoo#34713

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:46:00 +00:00
Nicolas Vannieuwerburgh 43bec98da8 [FIX] hr_timesheet_attendance: Allow update module
In PostgreSQL, we can't CREATE OR REPLACE VIEW if there is the type of the column change.
To fix it, just drop the view before creating it

closes odoo/odoo#34851

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 07:04:26 +00:00
Odoo Translation Bot 4fc83f62fa [I18N] Update translation terms from Transifex 2019-07-14 06:08:03 +02:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Martin Trigaux 30f760d534 [FIX] doc: adapt header to the new eLearning
closes odoo/odoo#34837

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 14:44:38 +00:00
RomainLibert a1d6927b90 [FIX] account: add the invoice onboarding banner
Since the conversion from account.invoice into account.move the new view
displaying invoices wasn't showing the onboarding banner

closes odoo/odoo#34819

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-12 14:04:22 +00:00
Jérémy Hennecart e6940be20b [FIX] crm: allow to unselect all predictive lead scoring settings
Now we can deselect all the optional fields to compute the predictive
lead scoring.

Task 2028666

closes odoo/odoo#34614

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-15 08:41:08 +00:00
Martin Trigaux 1f5a4649a6 [MERGE] Forward port of saas-12.3 to saas-12.4 up to 87fc1554d6
closes odoo/odoo#34820

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 13:59:35 +00:00
Nans Lefebvre 1c51963cab [FIX] website_sale: _compute_abandoned_cart with multiple records
This is an api.multi method, which should therefore not call self.field.
Fortunately there's a loop just below.

opw 2035374

closes odoo/odoo#34832

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-12 11:43:21 +00:00
Xavier-Do 87fc1554d6 [FIX] core: avoid writting sources during tests
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.

_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.

Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.

cherry-pick of b295723c99

closes odoo/odoo#34823

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-12 10:02:32 +00:00
Nicolas Seinlet 80fa405af5 [FIX] mail: message_unsubscribe takes 3 parameters
don't know why you try to use 4 parameters with a function that requires
3 of them:
https://github.com/odoo/odoo/blame/saas-12.3/addons/mail/models/mail_thread.py#L2283

closes odoo/odoo#34639

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-12 09:09:27 +00:00
Xavier-Do 6532b87165 [FIX] core: avoid writting sources during tests
Future runbot improvement may share sources between build,
meaning that sources will be readonly to avoid any interaction.

_touch() was supposed to handle ro filesystem but
f7130556 introduced a new test that was not working
in this case.

Instead of trying to touch file and pseudomocking the result
if the filesystem is readonly, this commit add a real patch
on getmtime.

cherry pick of b295723c99

closes odoo/odoo#34815

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-07-12 08:47:40 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Simon Lejeune 22221a2b57 [REF] server: better warnings when using --test-file
We add two warnings to make the --test-file argument more user friendly:
- one when the test file does not exist
example:
./odoo-bin -d master --test-file ./addonss/stock/tests/test_quant.py
before:
INFO master odoo.service.server: loading test file ./addonss/stock/tests/test_quant.py
after:
WARNING master odoo.service.server: test file ./addonss/stock/tests/test_quant.py cannot be found
- one when the test file is not a python file

In both cases, nothing was being tested but the server did not say why.

closes odoo/odoo#34808

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-07-12 07:14:38 +00:00
Kevin Baptiste 50163143a9 [IMP] lunch: Improve the general UX (back2basics)
- Reorganize configure your order screen
- Alert users through chat: Alerts can now be configured to
send a chat message to the employees.
- Replace toppings by extras

closes odoo/odoo#34470

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-16 11:44:35 +00:00
Victor Feyens 8f137f66bc [IMP] purchase: responsiveness (+mobile)
> support kanban view for order lines in puchase form view.

closes odoo/odoo#34737

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-16 08:38:30 +00:00
Ravi Gadhia 561829849f [IMP] purchase: add section and note on order line 2019-07-16 08:18:55 +00:00
mgh-odoo 6b7d9901eb [IMP] sale_coupon: add quick search to coupon programs
- after this commit, a user can search for the coupon by name from
the search panel.
- some typo fixed

task-1972686

closes odoo/odoo#34372

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-07-16 07:45:15 +00:00
RomainLibert f732984da2 [FIX] various: fix typos
In https://github.com/odoo/odoo/commit/8514ef827e1fcc2224aa0f4e6c2849819005c27d
noCreate should have been spelled as no_create to work this commit fixes
that

closes odoo/odoo#34897

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-16 07:55:57 +00:00
Sébastien Theys 87f2004902 [IMP] product: optimize create_variant_ids by doing batches
Perf for the creation
=====================

The biggest impact of this change is when each template has only very few
variants to generate and there are a lot of such templates.
And when few templates generate a lot of variants this is potentially just a bit
better than before, and not definitely not worse.

The opposite change was done in commit f8dad1bb4b
due to an issue with unlink but since the unlink is changed to use dichotomy now
we have the best of both solutions.

For example when creating 10000 products, few with a lot of variants (max 1000)
and many with few variants (or only one), the time it takes goes down from at
least 10min (the attempt was canceled before the end) to only 25s.

Perf for the unlink
===================

For the following test case:

- create a template
- give it 3 attributes, 10 values each
- -> that generates 1000 variants
- add the first variant to an order to test it
- not happy with the config, remove one of the attributes from the template
- -> that removes the 1000 variants

This is slow because of the `savepoint` used to archive if `unlink` fails.

With dichotomy it takes 14s.
With a loop (one by one) it takes 5min.

Part of task-1918881

closes odoo/odoo#34650

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-15 16:28:35 +00:00
RomainLibert 8514ef827e [IMP] various: Make some small tree views editable
Purpose
=======

Some formviews are useless since there are so few relevant fields https://nimb.ws/1EdMV7

For instance, to create a new lost reason the user is forced to:
1. Hit create
2. Type in the name of the record
3. Hit save
4. Go back to the treeview
While he could simply type them away in an editable treeview.

The goal of this task is to allow for creation/edition of records in such models
directly from the treeview.

Specification
=============

Modify tree views from a given list of models for which the
treeview has to be made editable bottom.

If not specified otherwise, the content treeview should stay the same.

If a field is readonly/required/etc. in the formview, it should be in the
editable treeview as well.

Relabeling has to be done of the field itself, not in the view.

TaskID: 2026126

closes odoo/odoo#34577

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 12:47:03 +00:00
Yannick Tivisse 14067543d0 [IMP] uom: Remove parentheses on uom names
Purpose
=======

Parentheses in the label of units of measure sometimes make
reading needlessly uncomfortable.

Specification
=============

Remove parentheses in the name of every standard uom.uom and hardcoded
occurence on views/field names.

TaskID: 2030444

closes odoo/odoo#34492

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 12:57:34 +00:00
Ghuen Lee 0ab2a7b373 [IMP] account: allow extension of SectionAndNoteListRenderer
Explicitely return the extension of the listview to allow to modify it
in other modules

closes odoo/odoo#34672

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 10:22:22 +00:00
Shreya Modi 783a9b1921 [FIX] lunch: Allow to create and import products on kanban view
-In Kanban view of products, it should allow to create a
product or import it

task-2032878

closes odoo/odoo#34660

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 10:44:37 +00:00