Commit Graph
126133 Commits
Author SHA1 Message Date
Nicolas Lempereur a540f7864a [FIX] account,sale: colspan revert part of e2e27b41a
In e2e27b41a variable `colspan` and several `<t t-set="colspan"/>` were
removed replacing `t-att-colspan="colspan"` with `colspan="99"`.

- sale_management.sale_order_portal_content_inherit_sale_management has
  `<t t-set="colspan" t-value="colspan+1"/>` overidding the portal view
  sale.sale_order_portal_content which so may result in error 500
  because colspan variable does not exist

- when doing a customization adding a column, adding:
  `<t t-set="colspan" t-value="colspan + 1"/>` was the expected behavior
  which after colspan change would break

So this changeset reintroduce `<t t-set="colspan"/>` tag up to not
including master, they will have no effect but possible existing xpath
or use of the variable colspan will no longer cause an error.

note: for 12.0 up to saas-12.3 (not necessary in master)
opw-1965886
closes #32539

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-09 08:29:39 +00:00
Aaron Bohy 7d31b863ca [FIX] web: list: re-evalute modifiers depending on id
In an editable (main) list view with modifiers depending on the
record id, add a new record. While the record isn't created yet,
the modifiers were correctly evaluated. However, they weren't
re-evaluted when the record was saved (thus getting an id), and a
reload of the view was necessary for the modifiers to be correctly
applied. With this rev. they are now correctly re-evaluated when
the record is saved.

closes odoo/odoo#32483

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-08 11:32:18 +00:00
Aaron Bohy 8d34eb1328 [FIX] web: editable list: shift-tab and readonly fields
Before this rev., navigating with shift-tab didn't produce the
expected result when there were readonly fields on the way. For
instance, pressing shift-tab on a field:
- to the right of a readonly field: the focus was kept in the
  current field, whereas it should have been moved to the first
  editable field to the left of the readonly one
- in the editable first cell of a row, with a readonly field in
  the last column: the focus was moved to the previous line,
  which is ok, but on the first editable cell of it, whereas it
  should have been on the last editable cell.

@KangOl this commit needs to be forwardported up to saas-12.2, not
later (the code slightly changed in saas-12.3, and we did another
version of the fix).
2019-04-08 11:32:18 +00:00
Laurent Smet 1a871d7243 [ADD] l10n_be_edi: allow import of XMLs as Vendor Bills
Task 1823110
New module to import bills in the belgian e-invoice format.

Author: las@odoo.com
Co-Author: wan@odoo.com

closes odoo/odoo#24303

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-05 09:08:09 +00:00
Vincent Schippefilt eebb0c6152 [FIX] web: corrected the order of icons in systray
Since the merge of JQuery 3, the building of systray icons is non
deterministic.

After this fix, the menus are loaded correctly in order.

Task-ID: 1960741

closes odoo/odoo#32382

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-05 10:13:41 +00:00
Christophe Simonis f2be461f09 [MERGE] forward port branch saas-12.1 up to f2d0995362 2019-04-05 10:50:56 +02:00
Damien Bouvy a25abec95c [FIX] orm: don't crash on index creation
For existing installations, creating indices might not always be
possible, e.g. if you have a Text/Char field that has an index=True
set on it in a field override and pre-existing rows longer than
the pg supported size , the index creation will fail.

Instead of failing miserably during the schema modification, simply
log the problem instead and keep going.

closes odoo/odoo#32442

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 07:53:07 +00:00
Hetal Dhanak 8b7f88edd2 [IMP] stock : Route button on consumable products
-Previously, route state button was visible only on stockable products but now it'll be visible on consumable products too.
This task is related to task id: 1945832

closes odoo/odoo#31623

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 07:02:54 +00:00
Sapan Zaveri 1208d7f839 [IMP] base: contacts email and phone clickable
Purpose of  this task is,
Before this task, the customer was able to click on on the email of a contact from the res.partner view.
But, he wasn't able to click on this same email when the modal of a contact was open.

For the phone it's the opposite. You can't click on the phone from the res.partner view but well from the contact's modal.

So, I made both the fields clickable in both (res.partner view and contact's modal)

Task ID: 1965730
Closes: #32586

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-10 13:10:15 +00:00
Mitali Patel b50ffac657 [IMP] sale_management: fill the mandatory field 'applied to' with 'sale order' when create new confirmation email template
Purpose of the task is to fill the mandatory field 'applied to' when create new confirmation email template
from quotation template.

Related Task ID #1934678 closes #31350

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-11 05:18:07 +00:00
qsm-odoo 54ae48f2ce [IMP] website: make text snippet's col full width
task-1967273

closes odoo/odoo#32609

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-11 04:50:49 +00:00
Swapnesh Shah f5c6c68165 [FIX] stock: Fix typo on field's attribute
closes odoo/odoo#32562

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-09 20:06:03 +00:00
Kirti Choudhary 0152e95eb3 [IMP] hr_timesheet: hide remaining hours if planned hours not set
If the planned hours are not defined on a project.task, the remaining hours should be hidden.

Task ID - 1930975

closes odoo/odoo#30802

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-10 09:26:29 +00:00
Kazantcev Andrey 6b73d23f7a [IMP] http: code cleaning
reuse current_thread result
No needed to call threading.current_thread() on evry arg setting

closes odoo/odoo#32000

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-10 07:18:59 +00:00
Heckad 1656557e81 [CLA] signature for heckad 2019-04-10 07:16:42 +00:00
Cedric Snauwaert 60dc5df281 [FIX] l10n_be: remove duplicated tax groups
There was one tax group per tax which was strange, so remove all duplicated tax group and only keep one tax group per tax percentage (0%, 6%, 12%, 21%)

closes odoo/odoo#32517

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-08 13:57:19 +00:00
Suraj Shukla dc2a93792a [IMP] web: properly set margin for the kanban dropdown
While everything looks pretty perfect without this commit,
setting margin on `.dropdown-toggle` and not on its parent
`.o_dropdown_kanban` itself will cause glitches in Studio.

While selecting the dropdown using Studio, the class responsible
for displaying outline (that indicates the selection) is applied
on '.o_dropdown_kanban', which is okay, but the actual child is
positioned using margin, so the outline on parent div looks ugly.

This commit fixes the issue by applying the margin on the proper
selector.

Task 1916583

closes odoo/odoo#30049

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-09 12:44:01 +00:00
Suraj Shukla 13222fcd68 [IMP] web: better ModelFieldSelector layout
This commit improves the usability of ModelFieldSelector widget
with following points:
- add a placeholder on the input for searching fields
- add more height to the same input for consistency
- properly show 'X' sign within header

Task 1916583
2019-04-09 12:42:40 +00:00
mgh-odoo b993a2d9c8 [IMP] website_sale: restrict deleting/archiving pricelist for ecommerce
Before this commit, if none of the pricelist is available for the website
then frontend ecommerce will crash. This issue is arrived from #30675 PR.
The reason behind crash is, if there is no pricelist associated with
the website then the ecommerce will not get the currency and breaks the
frontend shop.

This commit will restrict user from making those changes which breaks the
frontend shop. We will ensure that atleast one pricelist is available for
each website.

task-1966811
Closes: #32534

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-10 06:49:37 +00:00
Christophe Simonis 214e819c1b [MERGE] forward port branch saas-14 up to 6e0c89867e 2019-04-04 19:34:35 +02:00
Christophe Simonis 6e0c89867e [MERGE] forward port branch 10.0 up to 60592561d7 2019-04-04 18:33:42 +02:00
wan 6940cfddbc [IMP] account: visible but not required bank account on payment
When making a manual payment with account_sepa we want to allow people to add a bank account as it might display the European QR code for banking app, but this should stay optional.
So we made sure that the conditions making the field visible and required weren't the same.

part of task #1918423

closes odoo/odoo#32198

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-04 12:46:20 +00:00
wan 3c2e3b8c5a [REF] account: simplification of payments objects
simplification of payments objects and refactoring of the code

* registering payment(s) from the list of invoice now generate a single payment per invoice selected
* no more abstract object for payments/payment wizard as the logic is now really simple:
    - group_invoices option is now removed and we never try to group payments based on the currency/customer of whatsoever (see above),
    - the payment amount is the full residual amount of invoice and users cannot change it anymore
* partner_bank_account_id not required as soon as visible (depends on the payment method)
* refactoring to name tags and allow easier inheritance via xpath

part of task #1918423
2019-04-04 10:42:41 +00:00
William Henrotin 2190568d9e [IMP] mrp: suggest lot on workorder
On a manufactoring order, 'checking availability' will make the reservation of
the components to consume. If those components are tracked by lot or serial numbers, the
reservation will also set a available lot/sn on the move lines and workorder lines.

The reservation already works on product produce wizard lines and workorder line
(form view). We need this commit as preliminary work to being able to suggest them
on the workorders tablet view too.

In case of requesting the reservation after planning the production (applying
reservation on already created workorder lines and checks), we deleted all lines
not yet consumed. They are then recreated with the reservation.

The user can obiously still use the lot/sn he wants by changing it onto the
workorder.

Task : 1891864

closes odoo/odoo#28020

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-04 11:32:42 +00:00
William Henrotin 7556938fc7 [IMP] mrp: multiple finished product lots
This commit allows the user in charge of manufacturing products to
split his production into different lots if this production is done via
workorders. Using a lot in a workorder will adds constraint to all the
other ones. It will also prefil the final lot field and matching quantity
to produce for futur workorders.

This commit uses workorder lines (in another one2many as standard workorder_line_ids)
to register lot/serial number and produced quantity. Prefill lots and
quantities are all read from those lines

Task : 1891864
2019-04-04 11:13:41 +00:00
William Henrotin 108ee65af2 [IMP] mrp: block creating lot from workorder/produce wizard
When registering lot or serial number for a component in a workorder,
the manufacturer can create it on on the fly. We would like to give this
ability a restriction depending on the picking type.
This commit blocks the creating by default but leave the possibility to
tick a new checkbox on the manufacturing picking type to allow the
creation of lot and serial number for components inside the production process.

Task : 1891864
2019-04-04 11:12:29 +00:00
Thanh Dodeur f2d0995362 [FIX] mail: fixes document viewer's url preview
This commit fixes the document viewer: the document viewer
was altering the `type` key of attachment objects, this issue was causing
matching errors in some cases.

With this commit, the document viewer widget uses its own key `attachment.fileType`
to store the information that used to override `attachment.type`

closes odoo/odoo#32414

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-04 10:35:54 +00:00
Christophe Simonis d29e8cf423 [MERGE] forward port branch 12.0 up to 7e4b0350c3 2019-04-04 19:01:12 +02:00
Xavier Morel 7e4b0350c3 [FIX] core: handle multi level o2m in SSF
Technically it does 3 different things:

* switch from 1 level of o2m to 2 levels of o2m when recursing
* handles `parent.<xxx>` readonly modifiers on o2m subfields
* handles `id` readonly modifiers on o2m subfields (already worked in the
  normal case but not for o2m records from default_get)

The last two especially are temporary quickfixes, that will need proper fixes.

closes odoo/odoo#32428

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-04 14:20:51 +00:00
Nicolas Lempereur 95c9227cb3 [FIX] payment_authorize: >1m partner ok transaction
When creating a customer profile in Authorize.Net we specify a field
merchantCustomerId that is composed of:

  ODOO-{partner-id}-{8-random-characters}

But the limit of this field is of 20 characters:

https://developer.authorize.net/api/reference/index.html#payment-transactions

So if we have 1 million partner, we may have eg. a partner 1000005 that
would result in an ID `ODOO-1000005-af123c5b` that is too long and
results in an error.

With this changeset, the generated ID is truncated to 20 characters so
this should theorically be alright for up to 9.99*10^15 partners (the
postgres limit for an integer is 2.15*10^9 so this should be safe
enough).

opw-1962422
closes #32423

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-04 12:46:00 +00:00
Christophe Simonis dea85bcb1c [FIX] stock_account: adapt new test to new version
Oversight of previous forward-port.
2019-04-04 14:27:59 +02:00
Christophe Simonis ab0babf3e9 [FIX] purchase_stock: move code at the right place
Oversight of previous forward-port.
2019-04-04 13:43:20 +02:00
qsm-odoo 60592561d7 [FIX] web_editor: support youtube-nocookie.com
closes odoo/odoo#32332

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-04 09:21:09 +00:00
Christophe Simonis d32420397d [MERGE] forward port branch 12.0 up to 251021796c 2019-04-04 11:20:03 +02:00
Julien Castiaux fde76dd9b8 [FIX] board: action domain
The board created out of a tree view wasn't taking the default domain of
the view.

opw-1958349

closes odoo/odoo#32240

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-04 08:29:08 +00:00
Priyanka Kakadiya 2a7a6c096e [FIX] purchase: do not set currency_id to false
- currently, cuurency_id has default value as currency of user's company id. but, when there is no partner set then 'onchange_partner_id' will trigger and set currency_id to false.
- so, set user's currency_id instead of false if no partner set.

Related to Issue: 1948645

closes odoo/odoo#32415

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-04 10:30:55 +00:00
Robot Odoo 251021796c [FIX] base, base_address_extended: optimisation of partners import
If bulk-importing clients with a parent_id set, there's a ton of extra /
post-processing work which is not batched and "de-optimises" the
batching added to import.

High-level comparison of performing a "Test Import" on a synthetic test
file of 10000 partners (all with a parent_id set to a pre-existing
record) went from ~30mn to ~8mn on my machine.

Fixes #31549

closes odoo/odoo#31876

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-04 09:28:12 +02:00
Goffin Simon 94d15e037c [FIX] account_set: Wrong recomputation of the depreciation lines
When a asset is confirmed, it's not allowed to link it to an invoice.
Side effect, it recomputed the depreciation lines of the confirmed asset.

opw:1961468

closes odoo/odoo#32388

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-04 07:02:53 +00:00
Christophe Simonis 27ea18a21b [FIX] website_sale: correctly convert currency
Oversight of previous forward-port.
2019-04-03 20:27:50 +02:00
Christophe Simonis f36175dd8f [MERGE] forward port branch saas-11.3 up to b3d4c2d178 2019-04-03 18:46:36 +02:00
Lucas Perais (lpe) bf0bb534bf [FIX] base: Arabic generic World locale is ar_001
Before this commit, the "unitag" notation "xx_AA" was used for arabic generic locale
Since it is not an official Unicode CLDR notation, some other modules
may, and did crash (babel)

Instead, we prefer to use Unicode CLDR compliance
i.e. World regions should be "_001"

http://www.unicode.org/reports/tr35/#unicode_region_subtag
http://www.unicode.org/reports/tr35/#unicode_region_subtag_validity
BCP47: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

This commit should invalidate the commit made by #32344
which was a hack for stable versions

It should also be taken into account in migration scripts

closes odoo/odoo#32393

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-03 14:24:34 +00:00
Aurélien Warnon eec46c4774 [FIX] (website)_sale: fix p. configurator related tours
Task#1963335

Now that the product configurator has its own module, the tour
"tour_shop_custom_attribute_value" needs to be split in two parts
to handle the optional products.

The "sale_tour" also needed to be adapted to handle the fact that
the product input can also be a product_template input.

The "shop_buy_product" had its 'add_to_cart' step changed to handle
possible optional products window.

closes odoo/odoo#32368

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-04 08:47:37 +00:00
wan 01d0523fd7 [IMP] account, account_facturex: import customer invoices in XML
Task 1942983

Accounting firms need to upload PDF of customer invoices and refunds (not only vendor bills). For that, we now allow to
* define a mail alias on sale journals
* upload customer invoices from list view
* check for `facture X` XML attachments in PDF of customer invoices

closes odoo/odoo#31655

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-04 07:30:43 +00:00
Lucas Perais (lpe) 0e85b5b132 [FIX] odoo: patch babel for "World" language territory
Following c844d66091
where generic Arabic (World) is coded ar_AA
but babel doesn't support this

Instead, babel understands xx_001 for World generic languages

http://www.unicode.org/reports/tr35/#unicode_region_subtag
http://www.unicode.org/reports/tr35/#unicode_region_subtag_validity
BCP47: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

OPW 1961396

closes odoo/odoo#32344

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-03 14:03:00 +00:00
jem-odoo e24a16858d [FIX] sale_timesheet: include correct empty lines in overview
When confirming a second SO, with its project set as the project of a previous SO (so they
can share the same project, and all their task created end up in the same project), we want
to see the sales line without timesheet on the table of the project overview.
Before this commit, it only takes the empty lines of the origin sales order, not the ones from
the second. This commit fixes that by including 2nd SO's service lines in the empty lines to
display.

Task-1915660

closes odoo/odoo#32391

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-03 13:55:39 +00:00
Antoine Prieels b28d14bf08 [REM] mrp: product location on routing
product_location was confusing, not correctly working and is now
replaced by a new feature to manage subcontracting correctly.

TaskID: 1915022

closes odoo/odoo#32390

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-03 13:53:52 +00:00
Arnaud Baes dc7c4ef52a [FIX] stock: move_ids_without_package locations
Since the package level task, most time it is not move_lines which is
displayed in the form view but move_ids_without_package. We apply the
weird write override to this field too, and we'll apply the comment in
the code (change this override by a proper onchange) someday in the
future.

Task 1831382
2019-04-03 13:53:52 +00:00
Arnaud Baes 46f2628ee3 [FIX] mrp: hide order when its picking type is archived
We may want do disable a picking type. In this case, we don't want the
linked manufacturing orders to appear on the main view of the
manufacturing orders (not through the inventory dashboards but through
the "manufacturing orders" menu item).

Task 1831382
2019-04-03 13:53:52 +00:00
Simon Lejeune e1a29b83be [ADD] purchase_mrp_subcontracting
With this module we can now add the price of the subcontracting on the
subcontracted move by using the `extra_cost` field on the MO and the
unit price of the PO.

We also enhance the view of the supplier info to display a checkbox if
the linked partner is a subcontractr, for clarity sake.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:53:52 +00:00
Simon Lejeune d91db5bde6 [ADD] mrp_subcontracting
In a few words, it allows to send components to a subcontractor partner
and receive a finished product. The production is managed through classical
manufacturing orders where the raw and finished location is the
subcontracting location. When creating a receipt picking for a
subcontractor partner, the location_id of the moves will be set to the
subcontracting locations by using the property_stock_customer and
property_stock_supplier of the partner. An override of _action_confirm
will create the manufacturing order.

When a subcontracted bom contains tracking, the produce wizard is
available from the picking to record which lots were produced/consumed.

New type on the BoM: subcontract
New type on res.partner: subcontactor
New location per company (we still own the components stored at the
subcontractor so they're still valued)
New routes created to resupply the subcontracting location on order or
not (through a reordering rule).
Override of res.partner to set the property_stock_customer/supplier on
subcontactor partners.

Proper tests were added too.

Joint work with: Arnaud Baes <arb@odoo.com>

task 1831382
2019-04-03 13:52:22 +00:00