Commit Graph
140385 Commits
Author SHA1 Message Date
Aymane (ayt) f61a123ece [FIX]Web:background parm independent of zoom param
Setting the Zoom parameter for the image widget is no longer required to be able to use the background parameter.
This has been done to accomodate changes required for Task#2296173 as setting the zoom value to false was preventing proper display of the employee image.

closes odoo/odoo#55966

Related: odoo/enterprise#12437
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-01 09:40:38 +00:00
Mohammed ShekhaandDhruv Patel 8c2eda42f9 [FIX] web: blank value in many2many_tags for multi_edit popup
Let's assume a list that is multi editable and contains a m2m field
displayed with widget many2many_tags. Moreover, there are enough
values in the comodel s.t. the 'Search More' option is available
in the many2many_tags dropdown, and field 'display_name' isn't
in the list view that opens in dialog.

Enter multi-edition, edit the many2one field to add a value
(click on 'Search More', and pick a value from the list): the
picked value isn't correctly displayed in the confirmation dialog.

The issue occurred because we didn't wait for the display_name to
be fetched before opening the dialog.

Task : 2150384

closes odoo/odoo#57483

X-original-commit: ccf5834045d8b4fff9af7ddf60814c3a640e8318
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Dhruv Patel <dhp@odoo.com>
2020-09-11 08:56:11 +00:00
oco-odoo b0bd0cc5d2 [IMP] account: reconcile model form view: hide 'amount matching' setting for write-off rules
closes odoo/odoo#57358

X-original-commit: 10f58e490f3a7b7621b3cea9ef183ba8fa53d32f
Related: odoo/enterprise#13083
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-09 13:15:56 +00:00
oco-odoo a22e7e4c85 [FIX] account: reconcile models: inject selected partner and write-off details in the values sent to the widget
Before that, write-off rules with partner mapping did not work properly, as the partner they selected got lost when passing the values to the widget, which later made a second rpc call to fetch the write-off details. Now, we pass all the values directly, including the selected partner. This way, we remove the need for a second rpc call when processing the results for the reconcile models, and the partner is handled properly.

X-original-commit: d74db80d11e603719eefa5799ac1f8ac2afa2540
2020-09-09 13:15:56 +00:00
Ibrahima Gueye fffe2fcd0b [CLA] add new contributor in Optesis Signature
closes odoo/odoo#57471

X-original-commit: 37a54aca8b89f30d42b8ed5a2912461de0551bdb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-11 07:07:53 +00:00
Xavier Morel bc683db88c [IMP] web: log error when generating a report fails
For reports fetched through this endpoint, the error would only be
reported to the client, which may well ignore it entirely (e.g. show a
completely generic message which might as well be unhelpful and at
worst aggressively misleading).

Log the error locally before returning it to the client, so the info
is at least in the logs.

closes odoo/odoo#57411

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-10 10:53:31 +00:00
Swapnesh Shah 1bd00f4dc2 [IMP] stock: use the same label than product.template
Before this commit, the labels for the field `virtual_available` of
product.product and product.template were different.
Unify both labels

closes odoo/odoo#45560

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-11 06:22:54 +00:00
gaikaz 4072a1825c [CLA] Update Via laurea signature
closes odoo/odoo#57465

X-original-commit: 3c2fbda0b5b32d4c9e04a0afe5c12121e4533424
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-10 18:00:20 +00:00
Raf Geens 6d2488bb08 [FIX] doc: 'nusery' typo in examples
closes odoo/odoo#57454

X-original-commit: 3b4a0ab81a667c75ce11b8eec0cbf2469bc76f61
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-09-10 15:46:27 +00:00
Raf Geens 06a18aa092 [IMP] doc: How to add a print action on a report record
If you define a report using `<report>` it will implicitly add that
action to a Print menu in the model's views. If you use ``<record>`` to
do the same, that won't happen unless you also set `binding_model_id`.

In older versions that wasn't really an issue because people mainly used
`<report>`, but it was deprecated in 13.5, hence this update. And it
applies to versions older than 13.5 as well, I tested until 11.0.

X-original-commit: 6768d4190993e95b50785ac4ebf3be7213ef5e3f
2020-09-10 15:46:26 +00:00
Didier (did) 7352aa6e26 [FIX] mail: move attachment icon on the right (chatter top bar)
task-2333122

closes odoo/odoo#57453

X-original-commit: 0708b38d2512900d3456a9560673171c1286e571
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-10 15:38:12 +00:00
Xavier Dubuc 48bce60f02 [FIX] mail: remove no more needed root div node in moderation dialogs
task-2310610

closes odoo/odoo#57448

X-original-commit: 76c2eb1590b360a874ef5ccb0df7edf0f1b84bab
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-10 15:02:33 +00:00
Fabrice Henrion 118edc831b [IMP] payment: use a better tooltip
closes odoo/odoo#57390

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-10 15:31:08 +00:00
Didier (did) 2559787fc9 [FIX] mail: allow overflow on the chatter
task-2333128

closes odoo/odoo#57447

X-original-commit: d04d2933d72376c80ceb2f1e6769d4a5785f08dc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-10 15:02:07 +00:00
Nasreddin (bon) 4d902b9d35 [FIX] delivery: No option of delivery packaging when "Based on Rules"
Issue

	- Ensure that the provider of "The Poste" delivery method is "Based on Rules".
	- Create a quotation with "The Poste" as shipping method.
	- Confirm, then click on "Delivery" stat button.
	- Click on "Put in Pack" and create a "Delivery Packaging".
	- Save, go back to quotation and duplicate it.
	- Confirm, then click on "Delivery" stat button.
	- Click on "Put in Pack".

	The "Delivery Packaging" created previously is not available.

Solution

	If 'current_package_carrier_type' is equal to 'fixed' or 'base_on_rule',
	replace it by 'none' since there are the equivalents in
	'package_carrier_type' for 'delivery_type'.

Related fix : https://github.com/odoo/odoo/pull/37427

opw-2310258

closes odoo/odoo#57444

X-original-commit: 5898d31025eacad3e8c37f7a105e20c81831ed17
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-09-10 14:50:10 +00:00
Benjamin Frantzen (bfr) 2b3c6a2d7f [FIX] l10n_be_edi, account_edi_ubl: fixed dependency to account_edi_ubl and fixed call to '_' in qweb
closes odoo/odoo#57260

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-10 13:28:34 +00:00
Benjamin Frantzen (bfr) c95a3e20d3 [IMP] account_edi, account_edi_ubl, account_edi_facturx: added helpers to retrieve partner, product and taxes
When parsing XML to import invoice, different edi will need to find records for partner, product and taxes based on the values on the xml. The helpers avoids code duplication.
2020-09-10 13:28:30 +00:00
wan 68eb3a988a [FIX] account: saas-13.5 release fixes
Task 2327599

* The date is not copied on duplicate of account.move
* Do not throw traceback if we remove the invoice date of an
  invoice/bill
* Add extra triggers in account_tour to ensure it is done in the right
  view
* Update the position of some tour indicators
* Move the Product Categories in the Management menu
* The accounting onboarding is only visible on customer invoices list
  view
* Switch the position of banc and bic

closes odoo/odoo#57420

Related: odoo/enterprise#13122
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-09-10 12:32:29 +00:00
wan 421acfcbb2 [IMP] web: add the raw value of selection fields
Task 2327599

It is used in the selector of a tour to know the type of a document.
2020-09-10 12:32:21 +00:00
wan 7ceb7782b4 [IMP] web_tour: rainbowManMessage as a function
Task 2327599

In some cases, we want a function to evaluate the string shown by the
rainbow man.
For instance, if the message should depend on the state of other tours.
2020-09-10 12:32:11 +00:00
Xavier Morel 9c58c51179 [IMP] auth_totp: totp screen layout when website is installed
Apparently website's login layout removes the "card" around the login
form, and only the inner login form remains and is centered.

Put the card-title inside the login form, it doesn't seem to affect
the web layout in noticeable ways, just fixes the layout when website
is installed.

closes odoo/odoo#56144

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-10 12:49:00 +00:00
Xavier Morel 6f4f8f0265 [IMP] auth_totp: notify user on activation and deactivation of OTP
Was not super visible, especially without HR as the dialog immediately
closes (limitation of the web client), or when an administrator user
massively disables totp.

Show a toast notification indicating the success of the action.

Also fix the logging of `totp_disable` so it correctly handles being
called on more than one record, and change the logging data to
<browse_record> (<logins>) across the board.

Also add a way to provide an action to execute after a notification:
by default nothing happens, which leads to dialogs not closing and
forms not reloading, and there is no good way to show a notification
and/then do some other thing, which is inconvenient.
2020-09-10 12:49:00 +00:00
Xavier Morel 3e7d096f32 [WIP] base, auth_totp: add doc links for 2FA & API keys 2020-09-10 12:49:00 +00:00
Xavier Morel eac225e3ea [IMP] auth_totp: label of totp_enabled field & show status in form
Use same look in form as in preferences dialog, just without the
buttons to enable / disable it (technically could have the button to
disable with the correct group I guess?)
2020-09-10 12:49:00 +00:00
Xavier Morel ba03154d63 [IMP] auth_totp: better issuer label
The "issuer" being the user's company is not necessarily helpful as
e.g. the company might have multiple services which all use 2FA.

Use the domain name instead (fallback on the company if for some
reason we're in a situation where this is computed without a request).
2020-09-10 12:47:42 +00:00
Xavier Morel 70b6ac5009 [IMP] auth_totp: allow spaces in totp code input
TOTP programs generally group the code into two groups of 3 digits,
but we'd only allow a single group of 6 digits.

Allow spaces in the value for a bit of flexibility, and fix
placeholders to look like codes (also turns out @placeholder on a
field doesn't do anything, not sure where I got this idea).

Also improve the label slightly in the login flow:

* add information to the label itself
* properly link the label & input via an `id`
2020-09-10 12:47:15 +00:00
Xavier Morel 011d55d3e1 [FIX] auth_totp: session update after enabling or disabling totp
bfcc7dee8f tried to fix the session
disconnection issue, but the fix only worked in single-process (either
threaded or workers=1): because the cache was cleared but the update
not flushed, since `_compute_session_token` uses SQL directly it would
recompute the old session_token which it would cache, and thus the
process would carry-on with the old token just re-set in the session
and cache.

Meanwhile in multi-process, odds are good that the next request will
be on a different worker which *will* see the change, and will
immediately complain & destroy the session.

Add the missing flush calls right before recomputing the session token
so the SQL "sees" the correct state.
2020-09-10 12:46:10 +00:00
nie 15f0b69c8f [FIX] account: Invoice in Documents not linked to the original invoice
Steps to reproduce the bug:
- Install Accounting and Documents
- Go to Documents configuration
- Enable Files Centralization > Accounting and save
- Still in Documents configuration, into "-> Journals", create a new Journal to Synchronize with:
  - Journal: Customer Invoices (USD)
- Go to Accounting > Customers > Invoices
- Create a new invoice with any customer and product and save
- "Post" then "Send & Print"
- On the dialog, "Send & Print" (confirm the report template if necessary)
- Go to Documents

Bug:
The document is missing the "related resource" link shortcut

Cause:
The context key `default_res_id` is propagated up to:

https://github.com/odoo/enterprise/blob/a6606f000e66e72b9f89d353552950652ab2045f/documents/models/document.py#L364

Consequently, the corresponding document is created with a `res_id`, but no `res_model` as `default_res_model` is not set.

By adding the `default_res_model` context key, the document is created with the right `res_model`. Note that another solution would be to remove `default_res_id` from the context before creating the `documents.document` and leave the `_compute_res_record` do the job. However, this could have a larger impact since it would affect all document creations.

opw:2332596

closes odoo/odoo#57410

X-original-commit: 82cb5066de1081886f1e6277159248bf0d0e4330
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-09-10 10:50:30 +00:00
Christophe Monniez fd31c1e5b3 [FIX] website_event_questions: add wait for confirmation step
During the `test_01_tickets_questions` a tour is started as a portal
user to reserve tickets for the newly created event.
At the end of the tour, a modal is opened and once filled, the `continue`
button is used. The problem is that the tour stops without waiting but
the python tests continues. If the HttpCase session is cleared before
the tickets are registered, the test fails with a `400 Bad Request:
Session expired` warning and the next python assertion cannot be
fullfilled.

closes odoo/odoo#57400

X-original-commit: 33896d8f0d60bfa26601f1c5ca49009fcf735ab0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-10 09:38:25 +00:00
KENLYLST 3f954ae580 [CLA] signature for KENLYST
closes odoo/odoo#57297

X-original-commit: 7ee9e547e85b1578d32ee33f08d77e121fd4905c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-08 22:33:14 +00:00
Olivier Dony d362eb4b85 [FIX] http: always salt CSRF token
1af543a399 removed the default time limit
for CSRF tokens, because of the usability issues and the limited
security benefit.

However the timestamp that was used to implement the limit also served as
a salt, making the CSRF token variable for each request. This is a
desirable property that can help mitigate some attacks, such as BREACH.

This patch re-introduces the variability by including a distant expiry
(1 year) when no specific time limit is passed. The purpose isn't to
expire the token, but simply to serve as a salt.

closes odoo/odoo#57395

X-original-commit: 136e4f66cd5cafe7df450514937c7218c7216c93
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-09-10 08:24:01 +00:00
Nicolas (vin) 8a99e5f587 [FIX] account: make post all entries works again in move list
Recent changes to make post all entries works from the dashboard broke
it when used from the move list.

This commit will fix that and make sure it works in both situation

closes odoo/odoo#57249

closes odoo/odoo#57352

X-original-commit: fcadd448741d354c44a17a89819c95c7b124a3b7
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 12:32:49 +00:00
Nicolas (vin) 87e5255d9e [FIX] account: properly set up exchange accounts in the chart template
The recent changes in misc improvements broke the loading of the exchange accounts in the chart template.
This change aim to fix that by moving the setup of those accounts back where it was originally done.

Taks id #2319601

closes odoo/odoo#57351

X-original-commit: ac328eba96c6f2e34f18f3d4671290683a090c08
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 12:32:24 +00:00
Nicolas (vin) 88bae9969c [FIX] account : fix domain of accounts in the automatic entry wizard
Two account.account M2O where authorizing off-balance accounts while
they should not be selectable. This change aim to fix that.

closes odoo/odoo#57345

X-original-commit: cd25dba354b9d2a83e6b7ab45434bb2879984e33
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Nicolas Viseur <vin-odoo@users.noreply.github.com>
2020-09-09 10:16:12 +00:00
wan eeaeaa7214 [FIX] account: order in move _compute_name
Because we are using self[0], we need to ensure the order to have
something deterministic. We want the first entry of the perdiod to have
a sample name.

closes odoo/odoo#56895

X-original-commit: 00693dc0b36bebb6b04ef8e81291486334dd4dba
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-09-01 13:58:27 +00:00
Xavier Morel f3574caf7c [IMP] auth_totp: import qrcode lazily
fp request

closes odoo/odoo#57377

X-original-commit: e10cbc792f8f6432f8ee5d8065cd4a123f2a4754
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-09 15:23:01 +00:00
Victor Feyens ebfd6d4ac2 [FIX] doc: binding_model_id isn't mandatory on actions.
Remove this incoherent comment, and move the interesting information in
the dedicated section.

closes odoo/odoo#57383

X-original-commit: 1be2806045a6d92416a63364391e035ed36589f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-09 17:33:11 +00:00
Anh Thao Pham (pta) b9e988040e [FIX] hr_timesheet: fix timesheets encoded in days
- Go to Timesheets > Configuration > Settings and select Days as Encoding Unit
- Go to Project and create a Project with Timesheets activated
- Open the created Project and create a Task
- Edit the task and encode a timesheet line with 1 Day duration
"Hours Spent" and "Remaining Hours" have incorrect values.
The 1 day encoded is computed as 1 hour.

Reverting: https://github.com/odoo/odoo/commit/2a7ec79c6a4563b608a4525ebccdea5978799caa

opw-2328603

closes odoo/odoo#57379

X-original-commit: 8b3eed7418d6eea870f5e65ae238a304c88bd9f5
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-09-09 15:55:42 +00:00
Joseph Caburnay 359d0990ab [FIX] pos_restaurant: random fails when transferring order to other table
To transfer an order from one table to another, we first select the order,
then we click the 'transfer button', then we are shown the table selection.
The moment we click the 'transfer button', two simultaneous rpc's are made
for the same method (`create_from_ui`). This method deletes and recreates
the orderlines in database. The 2nd request fails because of the deletion.
But despite the failure, the server retries the rpc after a random amount
of time in sec: `wait_time = random.uniform(0.0, 2 ** tries)`.
If the user immediately (within the `wait_time`) clicks the new table where
the order is to be placed, the problem happens - the transfer of order to
the new table fails. This is because of the 3rd rpc whose result is used
for the actual order transfer. If the 3rd rpc happens before the retry of
the second, the transfer fails.

The randomness of `wait_time` (time-to-retry rpc) results to the random
runbot error. The solution is to prevent the 2nd (redundant) request
because it is not actually needed. This commit tries to accomplish that.

closes odoo/odoo#57370

X-original-commit: af7e7899124d2d8e3d4526d7de1c93158878f6e6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-09-09 14:27:10 +00:00
Benjamin Vray b308ddfbf8 [FIX] website: fix edit message button in countdown snippet
This commit fix a style issue with the button to edit the message
displayed at the end of the countdown

task-2312878

closes odoo/odoo#57364

X-original-commit: 282b7abd7e1c195cfe8199c52447ff7eff8e8abc
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-09 14:00:49 +00:00
yhu-odoo f20dded993 [FIX] stock: inventory report form editable
In inventory report, when groupby setted and no data, the create button
will open a new form instead of create a new line. Since now our form
view is not editable, no record can be created.

In this commit, add a new editable form view to solve it.

Task 2310494
PR #55910

closes odoo/odoo#57344

X-original-commit: 4a4e60c65049082855414941642dadce8b413475
Related: odoo/enterprise#13067
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-09 10:15:32 +00:00
yhu-odoo 81f86adf1f [IMP] stock,mrp,product,pruchase,repair: improve empty screen
Improve empty screen, add sample data.

Task 2310494
PR #55910

X-original-commit: 762457f1edd84208f43bd85de6be7316cfd20780
2020-09-09 10:15:32 +00:00
David Beguin 2430416ab0 [FIX] website_event_track_exhibitor: fix flag url in exhibitors templates
Since 0bee745c36c3cf8c411ffb65fab66ebd005ae274, flags images are not stored anymore on the res.country model.
This commit adapts exhibitors templates to correctly use the new "image_url"
field instead of the old "web/image/" route that tries to access the image
on the model.

Task ID: 2336225

closes odoo/odoo#57347

X-original-commit: 9ceb725e3872e24f37ed8ef3d233e70ab21daf52
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
2020-09-09 11:01:24 +00:00
Goffin Simon 403c687869 [FIX] mrp_subcontracting: Error Message with partial delivery
Steps to reproduce:

- Create a product P with route 'Resupply subcontractor on an order'
- Let's consider a BOM for P with type 'Subcontracting'
- Create a PO with subcontractor set on that product and process with Qty > 1,
- Validate a receipt with partial Qty and no backorder

Bug:

An error was raised because no production_id was set when trying to create a mrp.product.produce

When function _action_done is called with cancel_backorder = True, the function _action_cancel is called on the new_move
with no backorder and it called the function _action_cancel defined on model stock.move in module mrp_subcontracting
This function called _action_cancel on the mrp.production record MP
And finally this function called action_cancel on model stock.move on all finish_moves and raw_moves of MP

This line unlink MP of finish_moves and raw_moves

move.move_dest_ids.write({'move_orig_ids': [(3, move.id, 0)]})

That's why production_id was not set

PS: In this way, we don't cancel a MO when it is still used by other moves.

opw:2322278

closes odoo/odoo#57346

X-original-commit: e4d22d390c8aa8edf757e36704a9e04b2b89f115
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-09-09 10:29:26 +00:00
f12751aee3 [FIX] web: no more double discard dialog
This issue only occurred in community.
Steps to produce:
1) Create/Edit any record.
2) Change the menu using menu switcher
3) You will get the discard dialog at the instance and after some
   time it will also display another duplicate discard dialog.

So, we have one extra redundant discard dialog on menu switching.
It is working fine when we have dirty form and then click on the
breadcrumb or click on any internal child menu.

Task : 2312437

closes odoo/odoo#57359

X-original-commit: df37ce50e847e3489eb43d1ef6fc1bac6d6af333
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-09-09 13:16:39 +00:00
Tiffany Chang (tic) fc3b82115c [FIX] stock: make orderpoint qtys depend on move product_uom_qty
Orderpoint qtys were not updating when an already saved stock.move has
its demand updated. This was leading to new orderpoints being created
when there is already an existing one. This commit fixes this bug by
adding the missing dependency.

Steps to reproduce:
- Create a product
- Create a delivery with the product > Mark As Todo
- Go to replenishment report (product should be added)
- Go back to same delivery > unlock > increase the existing move line
  demand amount
- Return to replenishment report.

product now has 2 orderpoints instead of just 1.

Additionally this commit fixes a column mislabeling in the "Reordering
Rules" tree so that it now matches the "Replenishment" tree

closes odoo/odoo#57355

Task: 2327726
X-original-commit: 1429a7d3029fff1c6cac8fbe98b00eb931d43604
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-09 12:37:05 +00:00
Nathan de Pryck 9bee0b4752 [FIX/IMP] partner_autocomplete: vat for free
In this commit, we ensure that the vat is
added to the company data if an error occured
when contacting iap-services.

task~2092378

closes odoo/odoo#57335

X-original-commit: 848733b758063307bbbbf69eee10cd2426e9c017
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-09-09 09:22:20 +00:00
Tiffany Chang (tic) e6255e09b8 [IMP] mrp(_subcontracting), stock: MO reserve and replenish automatically
This commit does 3 things:

1. When 'action_confirm' is triggered in a manufacturing order, any
   'move_raw_ids' (components) that are unable to be fully reserved
   when `action_assign` is triggered will be checked for an automatic
   reordering rule (RR). If a rule exists it will be auto-triggered.
   This includes subcontractor manufacturing orders. Relevant test
   updated to match this.
2. When a MO is completed, auto check if there are corresponding
   confirmed stock moves that can be populated by the completed products
   and trigger their 'action_assign' to reserve the completed products.
3. If a new move line is added to an already confirmed MO, then do same
   auto-RR check/trigger. (note will occur for pickings without extra
   code since `stock_picking.action_confirm` is triggered again in this
   case.)

This reuses similar logic as odoo/odoo#52433 from task 2244230.
Originally this was done in the `action_assign`, but has been moved to
`action_confirm` so as to imitate the now archived MTO process with RR.
Overlapping logic has been moved into stock_move for easier reusability.
Note that this now means editing existing moves' `product_uom_qty` (i.e.
Demand) will not have a flow to auto-trigger their RR.

Subcontracting test updated to match + new mrp test added for this new
feature.

closes odoo/odoo#57334

Task: 2322496
X-original-commit: 2688cd1bae489b1dec8862f4de727ac20514844c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-09 09:21:55 +00:00
Rémy Voet (ryv) 2270406c48 [FIX] mrp: force the UoM in case of serial number tracking
In case of manufacturing a product tracked by serial number,
there is no reason to be able to make it with a different UoM of
the product (which lead to rouding issue).
Then when we confirm the MO in this case, the UoM and quantity
will be converted to product UoM.

PR #56000

closes odoo/odoo#57333

X-original-commit: f0da27e7eb474e6db4cd999306c420804aaa6f9b
Related: odoo/enterprise#13059
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-09 09:21:12 +00:00
yhu-odoo 2c5ce41c42 [IMP] uom: change default rounding to two
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000

X-original-commit: 460ec0402a2352a5b179d81935f7230f6bc97cb7
2020-09-09 09:21:12 +00:00