Commit Graph
139851 Commits
Author SHA1 Message Date
Laurent Stukkens (LTU) 009bcc59fe [IMP] sale_timesheet: adapt timesheet sections in portal
Prior to this commit:

    * The portal timesheet section was only visible in invoices when
      invoicing policy was set to delivery.
    * The portal timesheet section was not visible on orders.

After this commit:

    * The portal timesheet section will be displayed for both delivery and order invoicing
      policies.
    * The portal timesheet section will be available for orders.

task-2388500

closes odoo/odoo#62516

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-25 18:13:11 +00:00
Denis Roussel 788930d7d2 [FIX] sale: Wrong argument in untaxed_amount_to_invoice computation
closes odoo/odoo#62503

X-original-commit: 0ddad8128d3ea4ab75b98bea8da3c1de676c1b5d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-27 10:31:00 +00:00
Anh Thao Pham (pta) ec04b04b1e [FIX] website_slides: fix quiz karma won
- Install website_slides
- Connect with an user (i.e. Mitchell Admin)
- Go to Website and open a Course quiz for the first time
(i.e. "Test Yourself" from "Basics of Furniture Creation" Course)
- Answer correctly
The number of won karma is the one from the last attempt reward and is not saved
in user's total xp.

When submitting the quiz, quiz_attempts_count is incremented via a SQL query,
but its value is not updated in cache directly.
When the karma gain is computed from the attempts count, the value used is the
old one in cache.

opw-2389969

closes odoo/odoo#62500

X-original-commit: d8254c130d4b04a0f1ff80990fe28e795bf9ad51
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-27 10:20:32 +00:00
Lucas Lefèvre 058ba7b907 [FIX] web: mock all name_get behaviors
The mock implementation of `name_get` does not fully reflect
the real server implementation.

The real implementation is described in tests added in
this commit.

Note: in my wildest dreams, the mock server tests would be run
against the real *and* the mock implementation to ensure they
do not diverge.

closes odoo/odoo#62430

X-original-commit: c8f59bfd5c8ddb7c7abf1108111507e667393208
Related: odoo/enterprise#15017
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2020-11-26 15:29:52 +00:00
Williams Estrada 7464f09545 [CLA] add Williams Estrada signature to Vauxoo's CCLA
closes odoo/odoo#62499

X-original-commit: 4fe35257c3c126c12a3f4663ed8ff4d2195ca1f2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-27 10:13:26 +00:00
Leo Tran 8dfaf830fc [CLA] Viindoo signs Odoo's CCLA
Done at #62137

closes odoo/odoo#62480

X-original-commit: 60d723cbc0887904b31e88f766e127504f71246b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-27 08:16:12 +00:00
Christophe Monniez 4b8504a8c8 [FIX] requirements: remove gevent double requirements on win32
Fixes #62214

closes odoo/odoo#62477

X-original-commit: 45afa3a20693ebed11ad2fa7ebd1b73772ca5b3d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-11-27 07:45:10 +00:00
nie 9d0773b6ab [FIX] base: company not deleted on linked partners
Steps:
- Install Contacts
- Have Multi-Companies enabled
- Go to a Contact of type "Company"
- Click "Sales & Purchases"
- Assign it the company you're on
- Save and Edit again
- Remove the assigned company
- Go to a contact of type "Individual" linked to this company
- Click "Sales & Purchases"

Bug:
The company has not been deleted on the linked Individual

Explanation:
When we delete the company of a contact, the value of `vals.get('company_id')` is `False`.
This is why it didn't enter the propagation process.

opw:2391464

closes odoo/odoo#62464

X-original-commit: 80902bee453cf485906bb07be6af9072aee2e76f
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-11-26 17:54:26 +00:00
Sébastien Theys 9c4df33e20 [FIX] web: fix discuss click all test
task-2292595

closes odoo/odoo#62473

X-original-commit: ea2d1484fcd91efe89306d6106c01fcdde1c20c3
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-11-27 07:03:52 +00:00
Jairo Llopis 00f7bd66be [IMP] website: add o_default_snippet_text to mega menu snippets
This makes the act of replacing the dummy text easier.

@Tecnativa

closes odoo/odoo#62453

X-original-commit: 08b79883d44e44791760cfbba498eb9a3f47f945
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 17:14:35 +00:00
Vishnu Vanneri d311632b60 [FIX] account: restrict deletion of fiscal positions
Fiscal positions shouldn't be deleted if used by existing account moves

closes odoo/odoo#62443

X-original-commit: 6b2d0faf170f7b5061f5facbaa3818e529a2de4c
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-11-26 16:26:05 +00:00
Stephane Mangin 9cc886e5eb [CLA] add Stephane Mangin to Camptocamp CLA
closes odoo/odoo#62441

X-original-commit: 52cd0a7407eb4bea0c4deb8eaedfcf9331d2c5d6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-26 16:19:15 +00:00
Benoit Socias 190eebca44 [FIX] website_sale: use image from first available variant if no default
Before this commit if a product template has no image, no image was
displayed in the website shop for the product

After this commit if a product template has no image, the image of the
first variant is displayed in the website shop

https://github.com/odoo/odoo/issues/52463

closes odoo/odoo#62440

X-original-commit: 643c8a9dce9455fe614f73ed97a793856e3608e7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 16:14:21 +00:00
Achraf (abz) 2bc6d668b7 [FIX] calendar, google_calendar, hr_holidays: lost attendees after sync
What are the steps to reproduce your issue ?

    1. Install "google_calendar"
    2. Log in with "admin"
    3. Create an eventX with "admin" and "demo" has attendees
    4. Run "Google Calendar Synchronization" from "Scheduled Actions"

What is currently happening ?

    eventX is successfully added to Google but without admin
    if you sync Odoo to Google one more time, Google will overwrite eventX
    and it will remove admin from attendees

What are you expecting to happen ?

    Sync Odoo to Google and Google to Odoo without lost attendees

Why is this happening ?

    Because there is a filter that prevent addition of current user to the attendees

How to fix the bug ?

    Remove the filter

This reverts commit 287ee0f83ae6fd457e5356860c8a8ab5a4e66754.

opw-2382443

closes odoo/odoo#62416

X-original-commit: f6a610d0b1379aa97ad97fb7494a5d269da87775
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-26 14:41:30 +00:00
Didier (did) 31e015f80f [FIX] mail: mark document as read when open
task-2387820

closes odoo/odoo#62429

X-original-commit: fe3dbfb77eb403bb6eb69cd9d667fd8baa714ff7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-26 15:29:28 +00:00
Nicolas Galler cc17685ba0 [FIX] stock: remove leftover print statement
Leftover from commit b5e39fc

closes odoo/odoo#62415

X-original-commit: 7b8abac93a588a7a2a653275dd1e2f33c876ff52
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-26 14:41:04 +00:00
Ivan Yelizariev 7d163a6e07 [FIX] purchase_stock: use max() to compute purchase date
STEPS:
* Create a BoM with two components purchased the same vendor, but with
different "Delivery Lead Time". First component must have lower value
* Create Manufactoring order, Mark as ToDo
* Open created purchase order

BEFORE: Order Date	is equal "MO planned day MINUS delivery lead time for the first component"
AFTER: Order Date	is equal "MO planned day MINUS maximum amout delivery lead
time for the components"

---

opw-2388031

closes odoo/odoo#62411

X-original-commit: 8f0cc3609ce7a02d0e3f39586a7b0299ab221d48
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-26 13:47:28 +00:00
Ravi Gohil 123c7bf83d [IMP] l10n_il: make it multilingual
Also, translated CoA, taxes, fiscal positions etc. in Hebrew language.

closes odoo/odoo#62325

Task: 2393564
Related: odoo/upgrade#1976
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-25 13:14:19 +00:00
Adrien Widart aa00c30c18 [FIX] account_check_printing: print check of payment group
When some bills are not paid, some with due date, some without, when registering the payment of these bills as a group payment with checks, it is not possible to print the check

To reproduce the error:
(Need account)
1. Go to Invoicing > Vendors > Bills
2. Create a new one
    - Add at least one line
    - Add the Payment Terms
3. Save & Post
4. Duplicate it, then Save & Post
5. Go back to Bills
6. Select the two bills
7. Click on Action > Register Payment
8. Select Checks, enable Group Payment
9. Click on Create Payment
10. Click on Print Check
11. Click on Print

=> An Odoo Error is raised

The user should be able to print it.

OPW-2389368

closes odoo/odoo#62391

X-original-commit: 4dc4dc3d20114bea54266d97de29565a1a1ac230
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-26 13:07:00 +00:00
Didier (did) e68ccce1c2 [FIX] mail: attach the dropzone to the chatter
Before this commit the dropzone was relative to div.content. This would create
some bad position where the dropzone was covering the form view but not the
chatter.

task-2389929

closes odoo/odoo#62402

X-original-commit: bb650a9a1f4ff8280bd1e3467624991bc87517b9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-26 13:06:42 +00:00
Swapnesh Shah f55d1a0d52 [FIX] website_forum: do not copy fields
Fields `views`, `closed_reason_id`, `closed_uid` and `closed_date` should not be copied while copying post.

closes odoo/odoo#62401

X-original-commit: d35acd37720e8f498f5eef319c50780eaa7cb72e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 13:06:17 +00:00
Benoit Socias 61b846463c [FIX] web_editor: avoid translation of ACE warning close button "icon"
Before this commit the close button cross/multiply character was wrongly
translated in some languages (e.g. Spanish)

After this commit the close button cross/multiply character is not a
translatable text anymore

https://github.com/odoo/odoo/pull/60268
task-2365792

closes odoo/odoo#62400

X-original-commit: 517e272da81e4f5ad958d896a75d4f32b44083e5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 13:05:52 +00:00
Swapnesh Shah 5e4e4836ed FIX] website_sale: prevent website with no pricelist in multi company
Followup on 911ada2d02b24778435fd9174441a6834da2effa

When modifying the company_id of a pricelist, the check to ensure a website
has a pricelist available wasn't triggered.

This commits ensures the Each website has Valid Pricelist with Correct or
Empty company.

Fixes #50707

closes odoo/odoo#62359

X-original-commit: f196430baa8c5e2ce403808adc26d90fe84665fa
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-11-25 19:15:32 +00:00
Bruno Zanotti (ADHOC) 6f65923696 [IMP] l10n_ar: Add missing AFIP documents types
closes odoo/odoo#62396

X-original-commit: 8fdf193caf4dae0147543c1fcce7330aad81dff2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-26 12:16:24 +00:00
William Henrotin bebe4bd591 [FIX] mrp: open component quantity for kit
The 'On Hand' button triggers action_open_quants on product model. It
do not explode the kit into its component

closes odoo/odoo#62390

X-original-commit: 49b965eb1ec6a7ec6c07fa643cc6ae35ee8b5d91
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-26 11:33:00 +00:00
Thibault Delavallée 31b2c5925f [FIX] test_mail_full: fix overlapping class names
It is better to use another naming than re-using class names. Somehow it
seems sometimes we have MRO issues.

Task ID-2390314
PR odoo/odoo#62384

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-26 11:00:25 +00:00
Thibault Delavallée 7ca9cdd392 [FIX] mail: fix composer default values computation
As default is called numerous times with sometimes all fields, sometimes
only one field we have to ensure we avoid computing and setting unnecessary
or wrong values. We suspect this comes from default_get being called more
often at creation time since Odoo v14.

Default values for some fields in mail composer are dependent on each other.
Especially composition mode and model / res_id(s) are important for some
fields as behavior is not the same in comment or mass mail mode (subject
set / not set, template values rendered / displayed raw, ...).

Especially subject is wrongly computed in mass mail mode. For example use a
mass mail composer action on leads without template. Indeed a default_get
is called on subject alone. As web client adds active_model / active_id
automatically default returns a value for subject while it should not as
other values (model, res_id) are not asked and therefore not correctly
computed. It makes composer compute values in comment mode while it should
stay in mass mode.

In this commit we fix that behavior by

  * computing only requested values (better match returned values and asked
    fields);
  * avoid computing values if context values are not given (model, res_id or
    res_ids, composition_mode);

Task ID-2390314
PR odoo/odoo#62061

X-original-commit: 1c8ca358d75c9fe00631731d5061674c0a3a040b
2020-11-26 10:43:08 +00:00
Thibault Delavallée 1e53dd9adb [FIX] test_mail: make tests reproducible and independent from bus state
Some tests are currently dependent on bus state when computing number of
notifications sent. For example install Crm then test_mail_full. Some
tests crash as too much notifications are found in the bus.

We therefore clean remaining bus notifications before running tests to
ensure we check notifications during test itself. This make tests more
easy to reproduce.

Task ID-2390314
PR #62061

X-original-commit: 92ff1379b0492765fd0ba9863a9ce13fba7eeb4a
2020-11-26 10:43:07 +00:00
Thibault Delavallée 20674c891d [IMP] test_mail: add new mail composer tests for its internals
Purpose is to have some low level tests for composer itself allowing to
ensure its behavior. We add tests notably about default values computation
in mass mailing mode as well as template_id change and values synchronization
in composer model.

In a near future composer will probably be improved (use computed fields,
rewrite part of its logic to improve performances). Having tests done before
those tasks ensure we notice every change that might happen.

Task ID-2390314
PR odoo/odoo#62061

X-original-commit: def98d2375a8a906092293f0aa1ce03bf948d2d3
2020-11-26 10:43:05 +00:00
Stefano Consolaro dbca2d7371 [CLA] signature for mymage
closes odoo/odoo#62381

X-original-commit: 73293a2b0265b1795744258be3eceed593faf5ce
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-26 09:57:18 +00:00
alt-odoo 6b0017ffda [FIX] account: wrong number of statement lines to check in dashboard
On the accounting dashboard, for bank and cash journals, we are
displaying the number of items to check. Since commit https://github.com/odoo/enterprise/commit/b2dd65b9a9c054570d5796a81f2c390c4d8cb6c4,
when getting bank statement data, we are filtering the ones that
are not reconciled using is_reconciled computed field. We should
also include is_reconciled = False when getting dashboard data.

closes odoo/odoo#62373

X-original-commit: 8c0e92cdcdf98daa3c841af97e0bd2e4b015a1b9
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-11-26 09:05:54 +00:00
Florent de Labarre 5fcb340546 [IMP] purchase_stock : simplify compute
During a return the purchase_order_line field is propagate, order_line.move_ids include returned move, that why use returned_move_ids is not mandatory.

closes odoo/odoo#35878

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-30 18:58:16 +00:00
Nicolás Mac Rouillon 51897a1499 [FIX] l10n_latam_invoice_document: Wrong calculation for the subtotal in the invoice report.
For this case, if the invoice currency is different from the invoice company currency, the tax calculation is considered the value in a different currency, and the subtotal is the sum of the amount untaxed + the taxes (wrongly in company currency) result in an incorrect value. This is verified when printing the invoice report

closes odoo/odoo#62388

X-original-commit: 91f152f479923a1d28dadcb3ded7c0296cc585fc
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-26 11:23:25 +00:00
Benoit Socias ccfca271b9 [IMP] website: keep loader alive until editor is opened
Before this commit the navigation toolbar was accessible after selecting
a theme before the editor was opened, which on slow connections made it
possible for users to leave the screen and miss the tour

After this commit the loader animation of the theme installation is
blocking the access to the screen until the editor is opened thus
preventing user to navigate elsewhere before seeing the tour

task-2387608

closes odoo/odoo#62029

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 09:28:14 +00:00
Tiffany Chang (tic) 274dd3bf50 [IMP] stock: improve SN quant restriction
This commit makes it so the quantity of a SN in a location is now
restricted between -1 < quantity < 1 (previously it was only quantity <
1). This change provides stronger protection against a duplicated SN
(e.g. a quantity of -2 means that the SN was somehow moved from that
location twice). This restriction was also relaxed to not include
location.usage='inventory' because this could prevent the user from
fixing a duplicated SN (since they were prevented from creating a
quantity of 2+ in an Inventory Loss location).

closes odoo/odoo#59834

Task: 2336455
Related: odoo/upgrade#1839
Related: odoo/enterprise#14667
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-24 10:42:28 +00:00
Tiffany Chang (tic) cf39afacf7 [IMP] stock: add auto inventory for conflicting SNs
Add a new feature to automatically create/update/delete an inventory by
company for products with conflicting serial numbers. The goal
of this is to help track inventory discrepencies and prevent duplicate
serial numbers across different locations.

This follows the same logic as the negative qty count auto-inventory
feature where a dupe SN inventory will be auto-generated / auto-updated
/ auto-deleted when the "Inventory Adjustment" button is pushed and when
the scheduler is run. Note that -1 quantity of an already in use SN
counts as a duplication of a SN.

Note: a new many2many field `lot_ids` was added to inventory to more
easily track which conflicting SNs to do the inventory on.

Task: 2336455
ENT PR: odoo/enterprise#14667
Upgrade PR: odoo/upgrade#1839
2020-11-24 09:38:37 +00:00
Tiffany Chang (tic) 684bbda313 [IMP] stock: add auto inventory for negative quantities
Add a new feature to automatically create/update an inventory per
warehouse specific to products with negative qty in any of its
locations. The goal of this is to help track inventory discrepencies
and prevent appearance of being out of stock when there is still stock
left. This is done by having the inventories update/create whenever
the "Inventory Adjustments" menuitem is clicked. Since we don't know
when a product's stock becomes non-negative, we always re-write all the
neg products to existing draft neg inventories and remove any
pre-existing draft inventories that haven't been updated since they no
longer have any neg qty products anymore.

Scheduler will also trigger this recalculation in hopes that it will
reduce having a large number of inventories to create when the inventory
menuitem isn't opened very often.

Note: a flag `is_conflict_inventory` was added to avoid conflicts with
manually generated inventories.

Task: 2336455
ENT PR: odoo/enterprise#14667
Upgrade PR: odoo/upgrade#1839
2020-11-24 09:38:37 +00:00
Tiffany Chang (tic) 3d2429f69a [IMP] stock: add cyclic inventory for locations
Add a new feature to allow automated (as part of scheduler) generation
of inventory adjustments based on user set value for how often they should
be done for 'internal' and 'transit' locations.

- When is the inventory created?
When cyclic frequency is set to a non-zero value, the next date an
inventory should be automatically generated for a location is based on
whether or not a previous inventory for that location was completed.
If an inventory is overdue based on the previous inventory date, one
will be scheduled for tomorrow. If no previous inventory date exists,
schedule the next one based on today's date. A new inventory will be
created by the scheduler if there is not an existing in progress
inventory for the location (to avoid a conflict).

- What about descendant locations?
Descendent locations will not have an inventory created if their
ancestor is supposed to have a cyclic inventory done at the same time.
Note this includes when that ancestory already has an in progress
inventory and isn't having a new one created.

- What about cleaning out of date cyclic inventories?
This automation will also delete existing draft inventories that include
this location (created before the day the scheduler is run) or any of
its descendants (i.e. inventories with only that descendant location
selected to avoid deleting obviously manually created inventories).

Task: 2336455
Upgrade PR: odoo/upgrade#1839
2020-11-24 09:38:37 +00:00
Joseph Caburnay b1dff85a85 [FIX] point_of_sale: error in pos.config form when editing/discarding
Prior to 28762b79e3, `_enableButtons`
method is mainly called after saving changes in the record,
now, it is also called when discarding such that its argument can
become `undefined`. This causes error in pos.config form because it
uses a custom form which hooked to the said method in order to
reload the window when a module_ or group_ field is modified.

This commit prevents this error by having a fallback empty array
when `changedFields` is `undefined`.

closes odoo/odoo#62366

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-26 07:13:53 +00:00
Goffin Simon 1736a15c7c [FIX] purchase: Wrong UOM conversion when creating a vendor bill
Steps to reproduce the bug:

- Let's consider a product P with purchase UOM = Unit
- Let's consider a UOM called Box such as 1 Box = Units
- P is invoiced according to its ordered quantity
- Create a PO for 1 Box of P and confirm it
- Create the bill B from PO

Bug:

The quantity of B was 10 and its UOM was Box

PS: When creating a bill from a PO, by default the quantities on the lines of B are always expected
in the UOM of their respective PO line

Introduced by: https://github.com/odoo/odoo/commit/d0455ae64ba3800c8a13c60c6b68a5638ed5d552

opw:2391243

closes odoo/odoo#62356

X-original-commit: 669d1ee563ad123a1db417306191c670ea741925
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-25 17:23:35 +00:00
Nicolas Martinelli 78d2fa9016 [FIX] delivery: default invoicing policy
Since commit https://github.com/odoo/odoo/commit/3ad4abe171e8e7e86ed0e7b7f000e734d8a2ad92
the default invoicing policy of a product is set to 'delivery'. This is
not ok for the delivery products: a delivery product is never delivered.

This is confusing to end users, because they do not realize that a
delivery line is not included in an invoice. This is especially true if
the delivery is free.

This commit sets the default policy to 'order' for master data and for
newly created products from the shipping form view.

opw-2387437

closes odoo/odoo#62357

X-original-commit: 4c2768846809f6687d03eb0d7f501e57c2c93a90
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-25 17:23:58 +00:00
Nicolas Martinelli 835846f1c2 [FIX] account: suspense account type
The suspense account created doesn't have the type corresponding to the
domain:

https://github.com/odoo/odoo/blob/658d0fa32f35f4c4f9a1828b11fa383d3dad3b46/addons/account/models/account_journal.py#L97

opw-2387857

closes odoo/odoo#62351

X-original-commit: b2596ce81490cd3b8e1218cfd19d2843fa1a6f04
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-25 16:39:08 +00:00
Adrien Widart 031718f638 [FIX] stock: set default lot company
On a mobile, when editing a transfer operation, it is not possible to create a new lot/serial number.

To reproduce the error:
(Need a single company configuration)
1. Inventory > Configuration > Settings
2. Enable "Lots & Serial Numbers"
3. Inventory > Products > Products
4. Create a new one
    - Set "Tracking" to "By Lots"
5. Operations > Transfers
6. Create a new one
    - Add the product and set a demand
7. Save & Mark as todo
8. Enable the mobile mode of your browser & Refresh the page
9. Edit the transfer
10. On the product line previously added, click on details (to set the quantitiy done)
11. Click on "Add"
12. Click on "Lot/Serial Number" field
13. Create
14. Save

=> Validation Error (field Company is missing)

OPW-2389965

closes odoo/odoo#62301

X-original-commit: 6f0c3e9b23d785d5348817d9a23e34f7d4c1f835
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-25 09:39:13 +00:00
Achraf (abz) df312153d4 [FIX] mrp_workorder: Start and pause work order without attached PDF
What are the steps to reproduce your issue ?

    1. Install 'Manufacture' and enable 'Work Order' in settings
    2. Create product 'ProductA', enable 'Manufacture' in 'Inventory' tab
    3. Create a BOM for 'ProductA'
    4. For that BOM, create a new operation called 'OperationA' with PDF worksheet but don't attach any PDF
    4. Go to 'Manufacture' and create a MO with 'ProductA', the 'OperationA' is automatically set in 'Work Orders'
    5. Start the work order

What is currently happening ?

    When you try to pause, an error is raised.
    'TypeError: Cannot read property 'pdfViewer' of undefined'

What are you expecting to happen ?

    Start and pause the work order even without attached PDF.

Why is this happening ?

    'this.pdfViewer = existing.data('PDFViewerApplication').pdfViewer'
    When there is no pdf attached. The data 'PDFViewerApplication' does not exist.

How to fix the bug ?

    Change worksheet default value to text, and make the field mandatory in case of a PDF type

opw-2387428

closes odoo/odoo#62350

X-original-commit: 8597aada3d9bacc3cff4707bb78a7bc48d723cfb
Related: odoo/enterprise#14992
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-25 16:38:06 +00:00
Jeremy Kersten 3de58cf56e [IMP] web_editor: shape - merge some style + fix color
Blocks and Rainy / Airy and Zigs merged together
Fix color of Bold 5 and bold 6 shape that are not easy to use due to contrast
with black, now it is grey by default.

task-2357174

closes odoo/odoo#62352

X-original-commit: 978fcbd4f6ba9f618b69560cb5fbe26602828bcb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-25 16:39:42 +00:00
Benoit Socias 8c2dd4aa03 [FIX] web_editor: make Bold shapes 10 & 11 transparent
Before this commit Bold shape 10 & 11 had no transparent color

After this commit Bold shape 10 & 11 have a transparent color instead of
their former color #3 (#F6F6F6)

task-2357174
https://github.com/odoo/odoo/pull/59613

X-original-commit: 71b3b2d61b7acad601da38457671a20357298587
2020-11-25 16:39:41 +00:00
Didier (did) 756e3daa00 [FIX] mail: avoid notification if the channel is not a chat.
task-2387822

closes odoo/odoo#62348

X-original-commit: 8ad230ad64557798df09e28677f05a9f41773ead
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25 16:37:14 +00:00
Sébastien Theys 2522a7b35e [FIX] mail: remove illegitimate followers from chats
task-2392114

closes odoo/odoo#62349

X-original-commit: 26a76f81590ae92f5bec51be1441d6779b1afe85
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-25 16:37:40 +00:00
Victor Feyens 1bca602046 [FIX] pad: valid field parameters for pad mixin
closes odoo/odoo#62344

X-original-commit: b9779f39188a52f50f255832b5dfa0fb3a5ad15b
Related: odoo/enterprise#14986
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-11-25 15:48:40 +00:00
Adrian Torres 49bd732de1 [FIX] core: allow writing to delegated m2o fields on records
Before this commit, it was impossible to write to a delegated m2o field
if the length of the recordset was greater than 1.

The reason was because the special case for delegated fields inside
fields.Many2one.convert_to_cache would check for `record.id` which is a
bit misleading, since record can be greater than one.

The solution is to check whether any of the records are real records
instead, as if all of the records are NewRecords, then the parent is a
NewRecord too.

Fixes #62069

closes odoo/odoo#62343

X-original-commit: 76bf9dc94165c79be873a8864bfdb50a0a636084
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-25 15:48:11 +00:00