Commit Graph
141473 Commits
Author SHA1 Message Date
Rémy Voet (ryv) 326ae2a725 [FIX] mrp_subcontracting: fix flow with only tracked finished product
Step to reproduce:
- Create a subcontracting BoM by partner A,
for a tracked product B (by serial or lots)
- Create a incoming transfer coming from A and mark as todo.
- Fill the move with move lines with lot + quantity.
- It is impossible to validate the transfer, "You need to supply lot..."

Also at the creation of the picking a warning popover indicate that
the previous operation (the hidden MO) is set after the transfer.

These issues comes from the refactor of mrp for v14 and the part of
subcontracting wasn't complete obviously.

Fixes done:
- Rewrite the code of the `_action_done` for subcontracting. It is for
the case of tracked finished product without any tracked component,
there wasn't any code to manage that. Now manage it by backorder MO
feature. Fix the main bug
- Set finished_date_planned before the transfer to avoid the alert
popover.
- Avoid to write activity in channel about the hidden MO in case of
cancelling.
- Fix `action_record_components` to manage multiple subcontracting
products with tracked component.
- Remove the `priority` field from the wizard MO (in case of tracked
product. Also the wizard is not really a wizard, just a weird hybrid
MO form)

PR: odoo/odoo#61606
task-2357115

closes odoo/odoo#62109

X-original-commit: 1a34e46eaca14aec981dd0f162e8014c7cb0abea
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-11-20 16:07:14 +00:00
jev-odoo 5a2e675f14 [FIX] service: rpc call with empty array (php)
Before this fix, trying to authenticate via
xml-rpc call from PHP following the documentation at
odoo.com/documentation/14.0/webservices/odoo.html#logging-in
raised an error:

    > $uid = $common->authenticate($db, $username, $password, array());
    TypeError: 'list' object is not a mapping

Because PHP doesn't have separate array and mapping types, the
XML-RPC encoder disambiguates based on the existence of
key => value pairs, such disambiguation yields an empty xmlrpc
array for an empty PHP array, which is unexpected on the Python
side.

Relax the check on the Python side:

* fixing this on the client side requires adding arbitrary and
  meaningless key => value to the empty array to force the
  correct disambiguation which is ugly and weird
* the example code has been there for a long time, so there's
  probably lots of such PHP code in the wild

opw-2388141

closes odoo/odoo#62101

X-original-commit: 9f97b7435977c81a079004b7c2186ce75526490c
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-11-20 14:21:36 +00:00
Antoine Guenet 4cedbe173c [FIX] web_editor: properly update the image options on replace image
Prior to this fix, replacing a jpeg image with an svg illustration
didn't properly update its mimetype in its dataset. As an effect, the
jpeg image options still appeared, that were irrelevant for an svg.

This was caused by a premature update of the image in Jabberwock's vdom,
before the mimetype was updated, and by the fact that the current image
was not being passed to the constructor of the media dialog, causing it
to create the image from scratch on save instead of replacing the src
attribute of the current image like it did before introducing
Jabberwock.

closes odoo/odoo#62082

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-20 12:25:45 +00:00
Thibault Delavallée bf242ba1dc [FIX] event: allow de installation of all track submodules at once
Website event track module is an advanced event module that is required notably
in some sub modules: live, quizzes, exhibitors.

When unchecking Schedule & Tracks in event settings, submodules checkboxes
are hidden. It means that currently you may uncheck module_website_event_track
while still keeping sub modules (_track_live, _track_quiz, _track_exhibitor)
checked. When saving, modules are uninstalled, then installed again if one
of sub module is still checked.

In this commit we add an onchange so that unchecking track also unchecks all
its sub modules to effectively remove them all.

Task ID-2389569

closes odoo/odoo#62027

X-original-commit: 29f12da08dbbe6037e530dcae9cf570b71894136
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-23 08:02:44 +00:00
Gorash 42d0f6449b [FIX] Web_editor: table options button should be inside the toolbar
closes odoo/odoo#61529

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-09 10:37:43 +00:00
Andrea Grazioso (agr-odoo) b24ac9259e [FIX] stock: avoid recomputing qty_to_order when not in scheduler
Configure a reorder rule and a restock route for a product A
Go to Inventory / Operations / Replenishment
Remove all filters, find product A and under column 'To Order' input a
quantity, then hit the button 'Order Once'

The user quantity will be overwritten by the '_compute_qty_to_order'.
This is a fine tuning of f505444655

opw-2375317

closes odoo/odoo#61952

X-original-commit: 0d4ab53b3f7400151105461973d54c6015550b2f
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-18 14:45:21 +00:00
Andrea Grazioso (agr-odoo) d50a840c21 [FIX] mrp: double consuming in backorder operations
- Create product FP product to manufacture
- Create BoM:
  - 10 units of FP
  - Product CP (component)
  - two operations.
- Create MO for FP and plan.
- Complete operation 1 for the 10 units
- Complete operation 2 for 4 units only
- Mark MO as done for 4 units
- Click Create Backorder
- Check backorder MO

Operation 1 is present, marked todo for 6 units,
but it was completed for all 10 units.

With this commit the quantity todo for the corresponding operation in
the backorder is updated to match the qty already produced

Removing `qty_producing` as it is computed according to
https://github.com/odoo/odoo/blob/ff648a0ace9cf72274211662707e7ee33fc73252/addons/mrp/models/mrp_workorder.py#L50

opw-2374640

closes odoo/odoo#61841

X-original-commit: a32bdf257d7a960fcd96cf6d32443bfe0295a296
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-17 11:31:36 +00:00
Nicolas Lempereur 64d9120ed2 [FIX] sale_product_configurator: no 40 attribute limit
Set a arbitrary 10000 limit instead of 40 for the configurator
product_no_variant_attribute_value_ids (attributes that do not create a
variant) and product_template_attribute_value_ids (attributes that
create a variant) fields.

With a limit of 40, when we edited a variant (eg. on sale order) with
more than 40 create_variant=never attributes, the widget
ProductConfiguratorFormView that work with this data would only received
40 attributes so there would be an error message:

  "The combination does not exists."

which would prevent edition of the variant.

opw-2333091
closes #58493

closes odoo/odoo#58670

X-original-commit: 295884ce154990ecb51d3fc7c39aeeb21dc11f03
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-09-28 12:17:11 +00:00
Jeremy Kersten 3685b9c85b [FIX] website: only toggle view in toggle state
Before this commit, we write on each record the value, whatever the current value.
Now we check if it is necessary to avoid useless fork.

The first change on header was slowly.

closes odoo/odoo#62119

X-original-commit: e18c43d217be89b35213236038e72bc8298061a0
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-20 16:56:54 +00:00
Jeremy Kersten c9042aa2a3 [FIX] website: non group_system should see the button 'quick create'
Code has been optimized to make only one request in the past (5da1b96fbf), but
all modules that replace in the past the groups='base.group_system' by
groups='website.group_website_designer' has not been adapted.

By consequence, now only a user with group 'system & designer' can see the
'quick create' button.

We remove the optimization in stable to make the fix with a minimal diff, but
optimization will be done in master, without forget to adapts all modules this
time.

task-feedback

X-original-commit: 23c643a5d7ade6b0c481a47cf152624775d2e736
2020-11-20 16:56:53 +00:00
Samuel Degueldre b0f95a7ace [FIX] website_blog: make twitter share string translatable
Previously the default message when sharing a blog article was
hardcoded, meaning it was always in English and not translatable, this
commit fixes that.

Closes https://github.com/odoo/odoo/issues/31173
task-2369420

closes odoo/odoo#62118

X-original-commit: fab72412b973eeec503279f498d18006a584c1c0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-22 14:03:33 +00:00
IEL 1051b28970 [FIX] web_editor, website_form: speed up and robustify form editing
STEPS:
* open website page with a form (e.g. /contactus)
* click edit
* slow down connection speed
* click fast between form input lines or change order of the lines

BEFORE:
* 7 svg files are requested every click
* get_authorized_fields is called every click
* random error "'classList' of undefined" in SelectUserValueWidget::close
* random similar errors when a method is called before initialization

AFTER:
* svg and get_authorized_fields are requested once
* random errors are no reproduced or it's hard to do it
* performance of switching between inputs doesn't depend on connection
speed (though, still not instant)

WHY:
* about changing in SelectUserValueWidget::close: posible reason why
this.menuTogglerEl may be undefined is because method start is async
* the other updates just implement caching

---

opw-2368928

closes odoo/odoo#62115

X-original-commit: 710784da1f02d45cbe898da426ba7e2ac63dc711
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-22 13:58:44 +00:00
qsm-odoo dfa043feb3 [FIX] web_tour: better point at the anchor element
Before this commit, tips were bouncing from 6px from the anchor to 0px
from the anchor. Now they bounce from 3px from the anchor to 3px
inside the anchor.

closes odoo/odoo#62122

X-original-commit: 34f2303327e8f2b9b7e95bc33c6246d52a633dc1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-20 17:42:28 +00:00
Didier (did)andSébastien Theys 544cec54d8 [FIX] mail,sms: avoid event propagation on avatar click in message list
Before this commit, when a user click on the author avatar inside the message
list, it trigger the o-clicked for the message.

task-2341603

closes odoo/odoo#62125

X-original-commit: 69432fbe47f8cf6ca89f018e38961fdeba8b0fc7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2020-11-20 18:33:53 +00:00
Xavier Dubuc 2cf0390100 [FIX] mail: prevent multiple send of message by spamming send button
task-2388702

closes odoo/odoo#62123

X-original-commit: 909b66883c1085c3eba59452fd89f1328948acab
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 18:18:11 +00:00
bit-odoo a37c11e113 [FIX] mail: new message should not suggest partners without users
Before this commit:

New message from "messaging menu -> chat window" or "new chat" in discuss,
should not suggest partners that don't have a dedicated user.

After this commit:

It will not suggest partners that don't have a dedicated user.

Task-2363463

closes odoo/odoo#62116

X-original-commit: 13819e6afab1d30b644e79cfb1112478cfa5b32d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 16:55:17 +00:00
Nicolas Galler 09782ba740 [FIX] calendar: invalid accept link in reminder email
Behavior prior to the commit:

- the accept link in the reminder email for a meeting has a parameter
`event_id`, instead of `id`, which causes an error 500 when the user
tries to accept the meeting

Behavior after the commit:

- the accept link uses the correct `id` parameter

opw-2366173

closes odoo/odoo#62087

X-original-commit: a1073325ed7cb231dcce27c8b2d2df67821bbdf4
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-20 16:58:10 +00:00
Didier (did) 66de13d461 [IMP] mail,hr: implement required field in JS models
Fields can now be marqued as required inside a field definition. If the field
value is `undefined` or updated to `undefined`, an error will be throw.

```
stringifiedDomain: attr({
    default: '[]',
    required: true,
}),
```

task-2323665

closes odoo/odoo#59094

Related: odoo/enterprise#13883
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-16 13:41:13 +00:00
Nicolas Galler ea5131c18f [FIX] stock: shipping entire package does not update delivered quantity
Behavior prior to this commit:

In the following scenario:
- order of 10 widgets
- delivery using an entire package of 15 widgets (by adding the package
under the "Packages" list and checking the "Done" checkbox)

The delivery, when validated, does not update the delivered quantity on
the sales order, and generates a warning about not shipping enough
product.  We expect instead the sales order to be updated with the
actual quantity that was shipped (i.e., 15), and a warning about
shipping too many products.
Additionally, when adding the package, the picking reverts to a "Draft"
state and we have to click "Mark as Todo" again.

Behavior after the commit:

When adding one (or more) entire package in the packages list, and
marking them as Done, their entire quantity will be marked as Delivered
on the Sales Order, and no warning about not shipping enough product
will be shown.  Of note, if the package also contains products that are
not on the SO, they will be marked as shipped as well (in that case the
picking will indeed revert to draft since we will have added a new
product).  However they will not be automatically added to the SO.

Technical details:

When adding a package under the picking it needs to, eventually, reflect
on a stock move.  Prior to the commit, the system would add a new stock
move.  This had 2 problems:
 - the generated move did not carry back to the SO,
 - it would flip the picking back to draft (under certain circumstances
 it was possible to circumvent that and have a package level, and a move
 line, that was not tied to a stock move and thus would automatically
 reattach itself when the picking was validated, and sort of work, but
 it was more of a happy accident and relying on the steps being followed
 in a very precise order).

With this commit, we do not generate the stock move as soon as the
package is added.  Instead, that is done when the picking is marked as
done, either by relating it to an existing stock move, or by generating
a new one at this time.

opw-2367893

closes odoo/odoo#62112

X-original-commit: 173bfe6764a554d601d2c7edac2a4c79e2faaa83
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-20 16:27:03 +00:00
Anh Thao Pham (pta) d897c73852 [FIX] account: fix 0% taxes shown on invoice print
- Install Invoicing
- Go to Invoicing > Configuration > Taxes
- Create a Tax 0% with its own tax group
- Go to Invoicing > Customers > Invoices
- Create an Invoice with a line having a normal Tax and several lines with Tax 0%
- Confirm and print Invoice
On the Subtotal section of the printed invoice, for the label of the Tax Group of Tax 0%,
only the amount of the first line having this tax is shown.
(i.e. "Tax 0% on $ XXX", where XXX should be the sum of all lines on which Tax 0% is applied)

opw-2381051

closes odoo/odoo#62106

X-original-commit: 9e244ae3053f46fc22b8e9a75015d57cd70053b8
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-20 15:06:41 +00:00
Paul Morelle 05b151d4e4 [FIX] mail: avoid a stack overflow during loading
When the amount of mail messages is big enough (about 1500?), the
recursion goes deeper and deeper, until the Javascript limit raises an
infinite recursion error.

This commit fixes the issue by avoiding to run an inner
_flushUpdateCycle with the update if the change is not needed, so the
second time that it is reached it does not start a new update, which
would have run another flush update cycle.

closes odoo/odoo#62096

X-original-commit: 14b1bbb248b39e0ddef4f3eb1f0f130f650ebdd4
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 13:36:00 +00:00
Didier (did) a24cd324c0 [FIX] mail: fix image width inside the chatter
Web editor hard code the width inside the image html. This `max-width`
constraint the image inside the chatter and avoid unwanted horizontal scrollbar.

task-2389432

closes odoo/odoo#62095

X-original-commit: 352e868f320344b06c4d44fd2df452080446dbb6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-20 13:35:36 +00:00
Rémy Voet (ryv) 70c721e5a2 [FIX] stock: make do_unreserve faster than ever
`do_unreserve` is a action that can be made in the tree view of
`stock.picking` but it was very slow and not batched.
For 80 picking with -/+ 10 `stock.move.line` related each
(calculate on 5 sample of 80 pickings):
It took 17947 +- 2741 SQL requests, 7.37 +- 1.09 sec of SQL
and 8.13 +- 1.31 sec of python execution (+- 15.5 sec in total)

Make some  change to speed up the unreservation of
multiple picking/move:
- Batch the call of `_do_unreserve` of move in picking
- Use OrderedSet instead of RecordSet to reduce the complexity of
`_do_unreserve`. (Become significant when len(recordset) > 1000)
- Add `.with_prefetch()` in the unlink of stock move line
to patch issue with prefetching + unlink + cache.
- Batch `_recompute_state`
- Also batch the `do_unreserve` of MO

Result after change in the same samples:
It take now 1438 +-	20 SQL requests, 0.45 +- 0.02 sec of SQL
and 0.68 +- 0.02 sec of python execution (+- 1.13 sec in total,
13 times faster). Note that the gain increase proportionally.

task-2383111

closes odoo/odoo#62083

X-original-commit: e7a43655448db161150d0c62efa14c54ade0a2f6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-20 12:02:24 +00:00
Antoine Guenet 82cfa94e89 [IMP] web_editor: update Jabberwock library to commit 6853b60
Changelog:
[IMP] Heading, Blockquote, Pre: do not preserve modifiers on end split
[FIX] history: change icon to be compatible with Odoo FA version (1.4.7)
[FIX] table: table-picker rendered under some buttons
[FIX] Odoo: add OdooFields css to OdooWebsiteEditor
[FIX] Color: do not color a ZoneNode
[IMP] Table: add component "Table options" button + visible on group
[IMP] Pre: never duplicate a pre on insertParagraphBreak
[IMP] Blockquote: never duplicate a blockquote on insertParagraphBreak
[FIX] List: should not have the list-style none attribute in the vDoc
[FIX] List: toggle list should removes list-style from li element
[FIX] Iframe: IframeNode should be rendered in the layout.
[ADD] Core: handle deleteHardLine

closes odoo/odoo#61244

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-20 14:26:40 +00:00
Sébastien Geelen (sge) e770066e2f [FIX] website_forum: better css in the JW toolbar 2020-11-20 14:26:40 +00:00
Antoine Guenet eea4601f11 [FIX] website_forum: properly initialize editor 2020-11-20 14:01:15 +00:00
Antoine Guenet 08d72a615f [FIX] web_editor: restore removal of spinner 2020-11-20 14:01:15 +00:00
Odoo's Mergebot 1a43721231 [MERGE] various: clean and optimize constraints
PURPOSE

Perform a cleaning of constraints in various applications to improve
coding style and performances.

SPECIFICATIONS

Support multi recordsets. Otherwise constraints may crash or
be incorrectly applied when creating or updating recordsets
containing more than one item.

Improve performances
  * early raise if a constraint is invalid; avoid looping on whole
    recordset if not necessary;
  * use ORM methods completely (notably _check_recursion
    allowing batch directly);
  * remove duplicates when having both python and SQL constraints;
  * avoid unnecessary calls, notably ref in loops;

LINKS

Task Id: 2328664
COM PR: odoo/odoo#55525
ENT PR: odoo/enterprise#12250

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-20 15:35:58 +01:00
Arnaud Baes c618561c03 [FIX] hr_holidays: write access for approvers
Without write permissions, Time Off Managers are unable to approve
nor refuse leave requests. It seems there was a mismatch with
`hr_holidays.group_hr_holidays_user` as "Approvers" and actual users
at some point.

Bug reported via p/feedback by CMO and LEM after v14.0 migration.

closes odoo/odoo#62084

X-original-commit: 7c32f977aa5233d47ba6aebef56dc70f7b7b9bac
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-20 11:06:34 +00:00
Josean Soroa 0959a7e7ea [FIX] mrp: float formatting
Correctly format the `product_uom_qty` with the appropriate widget.

opw-2382517

closes odoo/odoo#62085

X-original-commit: 042298f8c949fba470eda6ad90f94c95ca291030
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-20 11:14:49 +00:00
Victor Feyens f09afc4241 [REM] resource: remove duplicate constraint
The constraint is already enforced at the SQL level,
there is no need to add a duplicate python constraint to
verify the same thing.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens 52cc073a11 [IMP] *: improve python constraints performance
* Do not load x records from database when one is enough.
Earlier SQL returns when a matching record is found.
* any() can receive a generator as argument
Do not explicitly cast a generator as list when it is not needed.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens 8d32f8724e [FIX] *: adapt python constraints to support multi recordsets
Otherwise, they may crash or be incorrectly verified when
creating/updating recordsets containing multiple records.

Also improve the constraint error messages to be more detailed.

When possible, use a sql constraint instead to speed up the records
validation.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens dce6a8e080 [FIX] google_drive: fix wrong constraint definition
Finetuning of 3174d2f56e

* the constraint method shouldn't return anything, but raise when a record is invalid
* the constraint should work when self contains multiple records
* the message should clearly explain which record is invalid.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens 4f825cbfce [IMP] *: remove useless returns in constraint methods
Constraint methods are not expected to return anything.

* Code cleanup
* Reduce "wrong" constraints definitions due to future c/c.

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens a4fd0ee84e [REM] project: remove duplicate python constraint
The constraint method _check_parent_id was defined twice.
This commit removes the second definition, less efficient because not using
_check_recursion correctly (it can be called on a recordset with multiple records directly).

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:27 +00:00
Victor Feyens 46fa7215ad [IMP] repair: improve constraint error message
* Private method
* Clearer and more complete error message, specifying all erroneous records

Task Id: 2328664
COM PR: https://github.com/odoo/odoo/pull/55525
ENT PR: https://github.com/odoo/enterprise/pull/12250
2020-11-20 10:04:01 +00:00
Paul Morelle 75280cf00e [FIX] event: avoid too large prefetching of event.mail
The prefetching engine wants to prefetch all the registrations to all
the events of all the schedulers, which may make a lot of data.

If the autocommit is on, then all this prefetched data is discarded at
each loop.

This commit limits the prefetching to each scheduler, so that we avoid
prefetching the data unnecessarily.

closes odoo/odoo#62052

X-original-commit: 904a46f28cb64e3bd51c40dc364b256d434d1c93
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-11-19 20:25:10 +00:00
Achraf (abz) 336192256d [FIX] stock: Show only affected products for lot_id name_search
What are the steps to reproduce your issue ?

    1. Install 'stock'
    2. Create 'ProductA' with 'Tracking By Lots'
    3. Create some 'Lots/Serial Numbers', for example 'CodeA0 and 'CodeA1'
    4. Go to 'Reporting/Inventory Report'
    5. Remove 'Product > Location' from the search bar.
    6. Click 'Create' and select 'ProductA' with 'WH/Stock' Location

What is currently happening ?

    When you set 'Lot/Serial Number', the available lots to choose
    are not limited to the selected product only.

What are you expecting to happen ?

    Show only lots of the selected product.

Why is this happening ?

    The domain contained no condition which depended on the product.

How to fix the bug ?

    Addition of a condition that depends on the product.

opw-238143

closes odoo/odoo#62046

X-original-commit: 3b33f1d3f5cb5182d5577176640bcf7427757ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-19 18:03:11 +00:00
Thibault Francois 695e482b5e [FIX] sale_project: Fix access error on action read
Problem
-------
When a sale order has more than one task within the same project
clicking on X tasks lead to an access error since regular user
cannot read action anymore

Solution
---------
use _for_xml_id method to fetch action data

closes odoo/odoo#61953

X-original-commit: ff43c875a7566ef4473452fc359e73fbf589b615
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-18 14:45:44 +00:00
Dominik Rubo f4c1f54223 [FIX] hr_timesheet, project: let user disable Timesheets in config
This change allows uninstallation of hr_timesheet from the configuration of
Project.

Previously, attempting to disable the Timesheets feature from the configuration
of Project resulted in a user error that requested the user to first remove
tasks in projects that were linked to analytic accounts. This was caused by the
removal of demo data during the uninstallation of hr_timesheet, which attempted
to unlink analytic accounts before unlinking the projects that were referencing
those accounts. The order in which demo data are removed during uninstallation
of a module is currently not fixed. This change avoids the problem by instead
removing the explicit creation of analytic accounts as demo data.

Furthermore, hr_timesheet would be immediately re-installed upon uninstallation
through project_timesheet_synchro and project_timesheet_holidays. Disabling
those modules along with hr_timesheet fixes this.

Task 2339016

closes odoo/odoo#60134

X-original-commit: 43db576b7f0efed563ee597ab087e4d7ef5c74d9
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-30 08:32:04 +00:00
Florian Gilbert 442326bc29 [REF] account: adapt main_flow tour and __init__.py for new sync module
This part of the tour can't work with the new online synchronization
module (account_online_synchronization) due to the fact that we are
using an iframe to display the list of institutions and therefore
those steps won't work within the iframe.

Also remove account_plaid & account_yodlee from _auto_install_l10n as
those modules don't exists anymore.

closes odoo/odoo#50267

Related: odoo/upgrade#1780
Related: odoo/enterprise#8200
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2020-11-19 14:13:52 +00:00
Adrien Widart 1902096b8e [FIX] hr_recruitment: set job recruiter on applicantion recruiter
If a job position has a default recruiter, when applying for this job, the application's recruiter is not the correct one.

To reproduce the error:
	(Need hr_recruitment,website_hr_recruitment)
	1. Go to Recruitment > Configuration > Job Positions
	2. Create a new one
		- Fill in the Recruiter field
	3. Save it
	4. Click on "Go to Website"
	5. Publish the job position
		- Top bar: click on "Unpublished"
	6. Log out
	7. Go back on the job position page
	8. Apply
	9. Log in
	10. Open the Recruitment module
	11. Check the applications for the job position

=> The application is created, but the associated recruiter is not the one previously set (step 2 above).

This fix makes sure an application has the correct recruiter when the associated job position recruiter is defined.

OPW-2387888

closes odoo/odoo#62038

X-original-commit: b7deda4185e3c240c3c30c9a570dc7173f9d8aa3
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-19 17:17:07 +00:00
Nicolas Martinelli 0329217db5 [FIX] purchase_stock: vendor code
- Create a product P with a MTO Reordering Rule (Buy Route)
- Add a supplier to P with a specific vendor code
- Create a SO for 1 unit of P, validate

A PO is created for the supplier but without using the vendor code.

It happens because the vendor code is overridden by the product
description.

To avoid losing information and redundancy, we add the line description
only if different from the product name.

opw-2383418

closes odoo/odoo#62037

X-original-commit: 0b138ffa5a1b2b03f03fb5dc51994a3bfc4e5dea
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-19 17:16:41 +00:00
Adrien Widart 24071ff94a [FIX] board: user can add to his dashboard
A user without admin access cannot add any views to his dashboard

To reproduce the error:
1. Connect using an account without admin rights
2. Go to CRM (for instance)
3. Favorites > Add to my dashboard
4. Set name & Save

=> An AccessError is raised

A user should be able to add some views to his dashboard.

OPW-2382713

closes odoo/odoo#62034

X-original-commit: a2d2006f24f56e16007a62cdec5af32a03f5552a
Signed-off-by: adwid <adwid@users.noreply.github.com>
2020-11-19 16:28:21 +00:00
Sébastien Theys 2399b4546b [FIX] mail: fix messaging menu counter by ignoring non-pinned threads
Indeed the non-pinned thread are not displayed in the menu and should not be
taken into account for its counter either.

task-2389824

closes odoo/odoo#62045

X-original-commit: 938d621db5355064e51c4b5e57238a91570aa685
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-19 18:02:28 +00:00
wan e0d09357d0 [FIX] account: deactivate sequence/date sync constraint on statements
opw-2379384
opw-2381830
opw-2381936

closes odoo/odoo#62044

X-original-commit: 6f260124a01879ce39933b2671c002cf1b7d13e7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-19 18:02:05 +00:00
Julien Castiaux 5cc2404889 [FIX] ir_mail_server: Use IDNA for smtp_user
There is a user whose email login is "joe@examplé.com", notice the
latin "é" in the domain. This domain is a valid IDNA-2008 domain but
the smtplib of python is incompatible with such domain and raises a
UnicodeError because the character is not ascii.

Note the removed comment about bytestring is a leftover of a dark
python2 age and is no more valid.

Closes #61972

closes odoo/odoo#62026

X-original-commit: 89a1989bd271f49a9222d5c255e03d4877045621
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-11-19 15:14:10 +00:00
Ipsita Borisagar 397773cf8a [IMP] mail: dynamic placeholder for text input
PURPOSE

The motive is to change dynamic placeholder by giving context to the user for
indicating whom he/she is writing.

SPECIFICATION

Changing placeholder "Write Something..." by "Message person/group..." for chat
and "Message #channel..." for channel.

LINKS

PR https://github.com/odoo/odoo/pull/60582
Task-2361155

closes odoo/odoo#60582

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-17 06:16:34 +00:00
Aurélien Warnon dd7b327eb5 [FW][FIX] crm: change default 'crm_alias_prefix' to 'contact'
This commit changes the default crm alias prefix from 'info' to 'contact'.

As the alias of the default sales team is configured to 'info', also having
'info' for the "crm_alias_prefix" setting was leading to an alias collision.

This change allows an easier configuration by the end user and avoids confusion
when first playing with your CRM settings.

Task 2373095

closes odoo/odoo#62025

X-original-commit: 31497e17e2369147fa40ab8b3f82cb2602ec9012
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-11-19 14:51:49 +00:00