Commit Graph
131116 Commits
Author SHA1 Message Date
Arnold Moyaux 2cf3377fdb [FIX] sale_stock: so line creation launch procurements twice
Use case to reproduce:
- Create a SO and confirm it
- Add a new line with a consumable/storable product

-> The delivery order contains the new lines but with the double of
required quantity.

Due to commit cb618e9a99 that try to lauch procurement in bacth.
Howerver The create from sale.order.line was not removed and the
_action_launch_procurement were launched twice (in sale.order write +
sale.order.line create).

The fix could remove the create function from sale.order.line but
the drawback is that everytime a sale.order.line is created/edited then
it should pass through the sale.order 'write' method.
That would create a lot of issue in the future compare to the small gain
of performance for a correction.

Task-2077129

closes odoo/odoo#38187

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-08 11:38:42 +00:00
Andrea Grazioso (agr-odoo) 1ac5ba040e [FIX] account,mrp,payment,purchase,purchase_stock,sale,sale_stock: studio crash on new view
Install stock and purchase. Make a RFQ for just one product, coonfirm
and receive in one transfer. Click on the delivery (should be only 1).
The picking will display. Open studio, select view, activate list view.

Javascript traceback will popup. Moreover the view of the stock
module will be altered in a faulty way (can be recovered from "Window
Actions", looking for the stock.picking action with external id
"stock.action_picking_tree_all" and removing the last added tree from
"View Mode").

This is caused by studio not detecting all the active views, thus giving
the possibility to add an already active view, because when there is just
one picking all other views are filtered out.
Changing the way the form view is retrieved in case of a single picking
fix the issue.

opw-2076241

closes odoo/odoo#38093

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 13:18:20 +00:00
mreficent 827b533662 [FIX] base: fix user view upgrade for migration
Fine-tuning of a8dbbc029d1e86c84, similar to d76cd50f0e
Avoid error of 'user_type_readonly' referenced before assignment.
This can happen during database migration or if the module category is deleted.

closes odoo/odoo#38190

X-original-commit: cf1e5198e32e9239a6d3cbbfdc325dbd3e0952de
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-08 11:45:57 +00:00
Simon Lejeune 2c22675ead [FIX] stock: remove move 'without package' properly
This revert the revert 61fa590e67 now that
400efc4d40 is merged.

closes odoo/odoo#38184

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-08 11:25:57 +00:00
wan 2a868edfdd [FIX] mail: position of composer tools
After commit ef46378, the position of the composer tools of the chatter
was below the text area instead of at the right of it. This is because
one div inside the flexbox was no longer diplayed as a flex or absolute.
By setting that disabled textbox to position absolute, the flexbox can
be displayed normaly again.

closes odoo/odoo#38183

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-08 11:08:50 +00:00
fw-bot d38e32c85a [FIX] mrp: avoid double write on production orders
Small improvement in order to not trigger twice the write
function on state

close #34884

closes odoo/odoo#38177

X-original-commit: d45d50b4f145a0bfb60465f7eb783a3c5fd85e6c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-08 10:17:05 +00:00
William Henrotin 8303b1a69e [FIX] stock: immediate transfers in the future
Immediate transfers only fill the quantity done of stock moves/stock move lines
Those transfer are thus not taken into account for the forecast computation if they
are not validated. Indeed, the stock quant are not yet updated and the initial demand
is left blank.

This commit duplicate the quantity done of immediate transfer on their initial demand
this quantity is still hidden in the view but can now enter in the forecast quantity.

closes odoo/odoo#38169

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-08 09:35:36 +00:00
Aurélien Warnon aeda568fe8 [IMP] web: add test case to the kanban records_draggable option
This commit adds a test case for the recently introduced 'records_draggable' option in the kanban
view.

Initial test was not written because of social app rush before 13.0 release.

'records_draggable' feature introduced by 869a5b83a5

Task#2082068

closes odoo/odoo#38166

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-08 09:07:37 +00:00
fw-bot f22ccb624c [FIX] web: calendar first day of week from res.lang domain
The feature that allows res.lang's first day of week parameter
to be the reference point of web calendar
has been introduced at 27b30daea5
A few other came on top of it to fix a few things

Before this current commit though, only Fullcalendar was
rendered using that initial value, nothing was done
to actually fetch the right data

After this current commit, we fetch data from the server
according to the range displayed by the calendar

OPW 2072872

closes odoo/odoo#38131

X-original-commit: 0bd82ef6489f3ea1da26fb6ee337b15e3f13d4e5
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-08 09:52:06 +00:00
Romain Derie 9f5fd9e2ed [FIX] web: add missing utils dependency
Since bb37077610 (apparently), trying to regenerate the assets through the
crash manager result in a traceback.

Indeed, utils was not defined.

closes odoo/odoo#38129

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-07 17:08:32 +00:00
Victor Feyens 09221fe246 [FIX] doc: fix some sphinx warnings.
closes odoo/odoo#38170

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-08 09:36:59 +00:00
Nicolas Martinelli df38b57557 [FIX] website_sale: missing structured data
The `image` structured data is set on the `<div>` element, therefore it
is not recognized by web crawlers. We add it to improve the SEO.

Reference: https://search.google.com/structured-data/testing-tool/

opw-2076934

closes odoo/odoo#37870

closes odoo/odoo#38121

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:18:59 +00:00
Nicolas Martinelli 030f2654a5 [IMP] web: add support for itemprop on img
Take the following QWeb snippet:

```
<div t-field="product.image" itemprop="image" t-options="{'widget': 'image'}"/>
```

When the image is rendered, the `itemprop="image"` remains on the
`<div>` tag, it is not set on the `<img>` tag.

We add the support of the `itemprop` option, so it can be added to the
`<img>` tag:

```
<div t-field="product.image" t-options="{'widget': 'image', 'itemprop': 'image'}"/>
```

opw-2076934
2019-10-08 08:17:05 +00:00
Nicolas Martinelli e42aa1e344 [FIX] hr_attendance: do not allow grouping
The user for the kiosk mode must have access to personal information of
the employees. To avoid easily leaking information, prevent grouping.

Fixes #34231
opw-2079330

closes odoo/odoo#38120

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:13:21 +00:00
Nicolas Martinelli 8d910c59b5 [FIX] stock: route_sequence in multi-company
- Go to Inventory > Configuration > Warehouse Management > Routes >
   Make To Order
- Edit
- Swap two rules with the handles
- Save

An access error is raised.

This is due to the recomputation of `route_sequence` which is performed
on all companies.

Setting it as `compute_sudo` solves the problem.

opw-2072159

closes odoo/odoo#38104

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:09:50 +00:00
Raphael Collet f064437f06 [FIX] test_mail: query counts
closes odoo/odoo#38034

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-10-07 13:43:21 +00:00
Raphael Collet 818168198b [FIX] fields: enable inverse on inherited readonly fields 2019-10-07 13:43:20 +00:00
Raphael Collet 400efc4d40 [FIX] models: make inverse of x2many fields work 2019-10-07 13:42:52 +00:00
Swapnesh Shah db1c909f33 [FIX] web: Support integer group name
Fixes https://github.com/odoo/odoo/issues/37998
Follow up on https://github.com/odoo/odoo/commit/5c4544fb2943e63fc1e0f5ae1e7e250a5a2b2cf1
As Integer fields are Supported for "Group By", they should be used as Group name

closes odoo/odoo#38007

Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-10-07 16:32:01 +00:00
jbm-odoo dc8cbe3940 [FIX] sale: Color column invisible in product attribute
Before this commit, when we click on a item in the tree view of
exclude item of product attribute value view, we got a traceback.
It come from the attribute column_invisible. This attribute was
used the remove the color column if the display type was not
color. But each line can have a display type different, so we
can't use invisible_column, we must use instead invisible
attribute.

After this commit, the invisible attribute is use, and each line
will display or not the color column, depends his display type.

closes odoo/odoo#38157

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-08 07:45:36 +00:00
fw-bot 2a60e82e98 [FIX] account: display button in 'matching number'
When a move line has been partially reconciled, it shouldbe accessible the button.

closes odoo/odoo#38155

X-original-commit: 0c1972144ce61a5baad35742c02678cbff75c9ea
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-10-08 07:32:20 +00:00
Swapnesh Shah 6f128fa959 [FIX] hr: Display archived employee on user form
closes odoo/odoo#38143

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-07 19:53:55 +00:00
fw-bot 2b830e5d41 [FIX] mail: translate assignation msg in recipient lang
Before this commit, when assigning a user onto a record,
through the field user_id, the email was sent
in the current user's language

After this commit, it is sent in the partner's language

OPW 2060898

closes odoo/odoo#38142

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-08 07:52:13 +00:00
Nicolas Martinelli 383b1d873f [FIX] l10n_es: Switch reconcile flag for direct VAT accounts
As the vat result is cleared at the end of the perior to the account 4751, there's
no sense to have these intermediate accounts with the reconcile flag, as they are
not going to be reconcile at all.

This has been also reported to be unperformant on enterprise reports where this
flag is used for obtaining the records to show.

4751 account already has the reconcile flag, and it's the one which is reconciled
on the bank reconciliation process when the fiscal authority (AEAT) charges you
the result.

closes odoo/odoo#38101

X-original-commit: e84d9c366e5c4c1a25aad28b85b96431b8f208d5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 13:55:11 +00:00
Swapnesh Shah 47d2cc9400 [FIX] hr_recruitment: Initialize company_id correctly
Fix "UnboundLocalError: local variable 'company_id' referenced before assignment"

closes odoo/odoo#38135

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-07 18:03:34 +00:00
Arnold Moyaux 1ac00874a5 [FIX] stock: manual inter-company flow
Usecase:
- Create a route without company
- Create a push rule for company B from intercompany to stock
- Apply the push rule on product and set in on a product.
- Connect with a user in company A
- Create a move from stock(company A) to intercompany.
- Confirm the move

-> The receipt for company B is not created.

Multiple issues:
- The rule is not found because it belong to the other company and is
filtered by the record rules. -> Aplly the seach as sudo if the move
is going to a location without company.

- Record rule error because a move from intercompany to company B is
created with a user from company A that has no access to company A.
-> Search and read company values and create the move as super user.

Based on work from Simon Lejeune <sle@odoo.com>

closes odoo/odoo#38124

X-original-commit: a80262e8b97256cac4bc5c406bc74a05f7189a00
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-07 16:38:18 +00:00
Goaman f2c38d517b [FIX] web_editor: link from the web editor
Before this commit, the feature for selecting a link and then clicking
on the "link" button or hitting the CTRL+K was partially broken.

The method "commonAncestor" was not returing the expected value.

This commit add a check in the method "showLinkDialog" to prevent
this error to happen.

closes odoo/odoo#38103

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-10-07 13:50:44 +00:00
Jigar Vaghela 2cc2fca17a [FIX] l10n_in: Fix report query
this is removed in https://github.com/odoo/odoo/commit/3936d655c4bfd845b6ead724cecdc8e7c62816eb#diff-10f4702f062a1eab9a272542d2914710L231
but need to group by parent tax_id if available

closes odoo/odoo#38094

X-original-commit: 79ea0b379c87103c6b9167f53722f195b444b0fb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-10-07 13:13:44 +00:00
Goaman 52ec2d378c [FIX] web_editor: highlight selected pictogram
Before this commit, the selection of a pictogram in the media
dialog of the website builder and the mass_mailing was not
working.

The pictogram already has the class "o_we_attachment_selected"
upon selection. This commit allow the class "font-icons-icon"
to be included in an existing selector.

closes odoo/odoo#38085

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-10-07 12:48:09 +00:00
Mathieu Duckerts-Antoine b919d438c7 [FIX] web: repair keyboard navigation in filter menu
Before this commit, invisible filters were rendered by
QWeb but hidden in the filter menu. This used to break
the keyboard navigation in the filter menu.
Now we don't render at all those filters since they were
completely useless anyway. This fixes the original
problem.

Task ID: 2057012

closes odoo/odoo#37567

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-01 08:32:14 +00:00
Swapnesh Shah 76e941cf84 [FIX] mail: Add required argument redirect
Fixes https://github.com/odoo/odoo/issues/38144
_login_redirect expects redirect

closes odoo/odoo#38145

Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2019-10-07 20:37:07 +00:00
Alexey Pelykh 41ccb00400 [IMP] sale_timesheet: provide hooks when billing a project
This commit restructures some code part in the "create SO
from project" wizard, in order to make this feature
extendable and adds new billable type or other checks.

Closes #31047

closes odoo/odoo#37796

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-10-07 15:32:10 +00:00
Alexey Pelykh 089755c1fa [REF] project_timesheet_holidays: provide hooks
This commit provides some hook to extend values when a leaves
generates timesheets. It also use dates directly, rather than
converting them to string.

Closes #30867
Closes #30872
2019-10-07 15:32:10 +00:00
Jairo Llopis 9a787b985e [FIX] website_sale: Instruct crawlers to not sort
Follows https://github.com/odoo/odoo/pull/35852. More useless crawls saved.

closes odoo/odoo#38114

X-original-commit: 42cbe36f6fff02b71d549caf77d92f776d615863
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-07 15:03:00 +00:00
fw-bot f248684c50 [FIX] web: Reset correctly the selection on reference fields
Backport of 64f6e50d0c, with a test!

Closes #27109

Purpose
=======

If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.

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

By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.

closes odoo/odoo#38109

X-original-commit: b5b992d9c4e85c224ded795ff9ce14d1608b3ed6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-07 14:52:38 +00:00
Ivan Yelizariev 236b8f120b [IMP] web: print js logs on warning in UI
It helps easily catch an error in headless tests

closes odoo/odoo#24792

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-07 11:37:34 +00:00
fw-bot 0b973f7461 [REF] mail: separate button rendering
original PR: https://github.com/odoo/odoo/pull/25801

closes odoo/odoo#38141

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-07 20:00:58 +00:00
Sébastien Theys cc0eb76726 [FIX] base: remove duplicate image_1920 field in partner view
Since the field was defined twice the view was not working properly.

Closes #37999

closes odoo/odoo#38108

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-07 14:43:27 +00:00
fw-bot 7b020ed318 [IMP] account: Invoice tax block is split into two pages
closes odoo/odoo#38102

X-original-commit: 724407453a8aba284c9b7edc46ec12c13b25d33d
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-10-07 13:56:26 +00:00
fw-bot 2083f8b0d8 [FIX] mail: filter void attachments when sending mail.mail
In some cases you may have a void attachment (datas being False) that you
try to send through the mail.mail send flow and this make crash the send
process. This commit fixes that behavior by filtering void attachments.

closes odoo/odoo#38098

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-07 14:07:11 +00:00
Florimond Husquinet (fhu) e21efb18d4 [FIX] sale, delivery: invoice status updated when adding note
-Create a sales order.
-Add product E-COM11 (invoicing policy "Delivered quantities").
-Add Delivery method "Normal Delivery Charges".
-Confirm Sale.
-Sale Order Invoice Status = "Nothing to Invoice" (OK).
-Now Open Sales Order again in Edit mode.
-Add Choose "Add a note" in the order line section and add a random note and
don't save yet.
-Check the "Invoice Status" in the "Other Information" tab.

Before this commit:

-The status of the invoice changed to "Fully Invoiced".
-If you save the invoice with the new note, the status changes to "To Invoice".

After this commit:

The status stays "Nothing to Invoice" in both cases.

closes odoo/odoo#38097

Opw: 2078581
X-original-commit: 86301d36fa7b0b6f7f524fff2623077c4366273a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 13:37:32 +00:00
Laurent Smet bb53ee456d [FIX] account: Fix missing parenthesis in reversal wizard
closes odoo/odoo#38095

X-original-commit: 431d6058afe71efa6078cb5d18c547ee2a910484
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-10-07 13:14:02 +00:00
Laurent Smet a5dba54232 [FIX] account: Fix reversal with group of taxes
Reversing an invoice using a group of taxes leads to a traceback as the taxes
are not flattened explicitly.

X-original-commit: fb3b1697ed1b3fc411b42d0b6624e1907dd0824c
2019-10-07 13:14:01 +00:00
Denis Vermylen 0ea67467b1 [FIX] config: expand logfile argument
Previously, the argument

--logfile=~/logs/odoo.log

Would create the <cwd>/~/log/ directories with the odoo.log file in it,
which is typically not the behaviour one would expect.

closes odoo/odoo#37194

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-09-20 13:36:28 +00:00
Parth Choksi c73d5cb1d6 [FIX] *: removed activity exception filter from searchviews
*: account
   crm
   event
   fleet
   hr_expense
   hr_holidays
   hr_recruitment
   mail
   maintenance
   mrp
   note
   project
   purchase_requisition
   repair
   stock_landed_costs
   stock_picking_batch
   survey
   website_event_track

This commit is making sure that the exception activities filters are
only defined where it make sense (i.e. where the system can actually
create an exception activity).

We have therefore removed 'exception activities' filters where the
system won't be creating any.

Task-2056425

closes odoo/odoo#36027

Closes: #36027
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-07 12:31:01 +00:00
Parth Choksi b65d94c89a [FIX] *: ux improvements in activities
*: mrp
   product
   purchase
   stock

Renamed the 'activities_exception' filter to 'Warnings' and moved it
to the bottom of the filters, isolated by separators

Task-2056425
Closes: #36027
2019-10-07 12:30:22 +00:00
Florimond Husquinet (fhu) db1bef9166 [FIX] purchase: missing variant description in portal view of purchase order
- Set Joel Willis (the portal user) as a vendor.
- Create a purchase order and add a line with a variant product, such as the
conference chair (aluminium).
- Confirm the order.
- Then switch user to the portal user.
- In the portal view, go to the purchase orders and select the purchase order.

Before this commit:

the product line does not show the variant, only the base name of the product.

After this commit:

the product line now shows the vendor specific product name and product code.
To set this name and code, go to the Purchase tab of the product, and add a
line for the vendor in the Vendors table, or modify the existing line for
the vendor.

closes odoo/odoo#38082

Opw: 2076962
X-original-commit: c2f2169ab7574c49fa6b544299aab7214b1f4698
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 12:31:01 +00:00
Lucas Perais (lpe) 5fe83fc6a4 [FIX] web: dropdown boundary overflow
Open a search view modal ("search more" on a m2o)
Select a filter that will make records fall to zero
The modal will shrink
Trigger the opening of a dropdown (Filters), and make sure
that there are many many menu items there (many filters)

Before this commit, the dropdown was bigger than the modal
which had a scroll bar,
however, the dropdown itself was not scrollable properly
So, clicking in it to select a menu item will fail when scrolled
all the way down, because elements did not actually followed the scroll

After this commit, the dropdown follows the scroll, and it is possible
to use it even way down

We use a behavior of bootstrap 4 itself:
FIX: https://github.com/twbs/bootstrap/pull/24976
ISSUE: https://github.com/twbs/bootstrap/issues/24251

OPW 2076337

closes odoo/odoo#38080

X-original-commit: c3273b7a1c0c09aeef23df4ba4be8d68fd46a6f3
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-07 12:27:03 +00:00
fw-botandRomainLibert 82b24f3c77 [FIX] hr_holidays: improve action_draft and action_refuse
This is a manual forward port of #28226

Closes #28226

closes odoo/odoo#38075

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Co-authored-by: RomainLibert<rli@odoo.com>
2019-10-07 12:11:34 +00:00
fw-bot a9adfbaa18 [FIX] pos_restaurant: faulty behavior of newly created table
When a table is created, the new table appears to be selected but the
capability to resize and drag is not active. As a result, when this new
table is dragged, it is unselected instead. This is because of the call
of `save_changes`. The table widget is rendered but the event handlers
for resizing and dragging are not assigned. After this commit, the
created table can be resized and dragged immediately after creation.

closes odoo/odoo#38068

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 11:47:26 +00:00