Commit Graph
126133 Commits
Author SHA1 Message Date
Mathieu Duckerts-Antoine 98e4540fe9 [FIX] web: call super in AbstractAction willStart
The commit https://github.com/odoo/enterprise/commit/19a144d6af2974e964c6487170e6bca1b14d3898 has
modified how libraries are loaded at several places and has
introduced a bug in sale_subscription_dashboard where the
libraries are no longer loaded at all. We fix that situation
by calling super in the willStart method of AbstractAction
that inherits from Widget. Abstract actions can now also
benefit from the mechanism present in Widget willStart.

closes odoo/odoo#32209

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-03-28 12:47:01 +00:00
Thanh Dodeur 1a5ab92654 [FIX] mail: fixes the download url
Following the changes to the document viewer to make it more flexible
for use in documents (89f20d2c29), the download route wasn't changed accordingly.

This commit fixes this issue so the download route is based on
the model of the viewer.

closes odoo/odoo#32207

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-28 12:25:44 +00:00
Adrien Dieudonne 85b595e6f0 [FIX] web: avoid double margins after Many2ManyTags fields
Before this commit, there was too much space after Many2ManyTags
fields. This was due to the fact that a many2one is embedded in the
many2manytags widget. Therefore, the css rule who add margin-bottom
was applied twice.
e.g.: Tags field in project task form view

To fix this, we remove the margin-bottom from the children widgets.

Note: This bug is not a big deal in previous versions but in 12.2
margins between fields has been increased in mobile and  we clearly
saw this issue.

Task ID: 1944884

closes odoo/odoo#32193

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-03-28 09:21:42 +00:00
Jigar Vaghela a82dbe4d68 [IMP] purchase: Change purchase sub menu string from "Purchase" to "Order"
Purpose :
========
    Maintain the uniformity between the sales and purchase menus

closes odoo/odoo#31482

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-28 06:19:40 +00:00
Jigar Vaghela a018279d77 [IMP] purchase: New products menu and show Products and Product Variants in this menu.
Purpose :
========
    Maintain the uniformity between the sales and purchase menus
2019-03-28 06:12:55 +00:00
Arnold Moyaux 27e9c9e011 [FIX] mrp: unlock a raw move line
Usecase to reproduce:
- Go on a Mo
- Edit and Unlock
- Produce the MO
- Update a raw move and add a move line

User error you quant write on product_qty fields.
product_qty represent the reserved quantity on move line as quant's UoM.
The system requires to write a product_uom_qty that represent the same
quantity but in the move line UoM.

Fix it by removing the fields from the view, so it's no more save.
Also set the quantity done as readonly if the lines are present in
the view.

closes odoo/odoo#32135

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-27 14:02:32 +00:00
William Henrotin 799ab73189 [FIX] mrp: handle multi
The _compute_final_lot_domain method is implicitely multi but doens't manage the loop over 'self'
2019-03-27 13:40:29 +00:00
William Henrotin 419d32207a [FIX] mrp: qty_done and qty_to_consume concistency
This commit ensures the qty_to_consume is always adapted to be the same
as qty_done in the onchange on qty_processing. This patch is needed to
keep the same behaviour before and after the workorder line refactoring
5ef46664a2
2019-03-27 10:29:20 +00:00
Gabriela Mogollón 88f4cfe1a5 [IMP] l10n_mx: add new tag for non-creditable tax (8%)
closes odoo/odoo#32224

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 23:19:34 +00:00
Nicolas Lempereur 03d74f4f76 [FIX] web: drag & drop month calendar->keep time
In fullcalendar, we have in f5b7ad80f fake moments date with UTC time
that are the local time, thus when we move an event to another day, we
need to set it as:

- the selected year-month-day
- the original utc hours (real local hours) -> local hours
- the original utc minutes (real local minutes) -> local minutes
- the original utc seconds (real local seconds) -> local seconds

When it is sent to server, timezone offset will be removed so we will
transfer to server the expected datetime in UTC.

With this changeset we send server the correct time when a fullcalendar
event is "all_day" but the original event was not (eg. drag and dropping
event on the month view).

Added test without change failed with:

 - 4. event moved to 27th nov 16h00 +40 hours timezone
      (expected "2016-11-29 08:00:00", result: "2016-11-27 16:00:00")
 - 5. expected: "event|6|11/27/2016|16:00:00"
      result: "event|1|12/09/2016|08:00:00"
 - 6. expected: "event|1|12/09/2016|08:00:00"
      result: "event|3|12/10/2016|23:55:05"

opw-1955281
closes #32136

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-26 17:49:40 +00:00
Xavier Dubuc 8b13f21679 [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>

closes odoo/odoo#32185

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-28 07:25:06 +00:00
Nicolas Martinelli ad11910040 [FIX] mass_mailing: default value
Do not raise if data have been deleted. Since the fields are not
required, do not fallback.

opw-1959184

closes odoo/odoo#32163

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-27 13:29:48 +00:00
Yannick Tivisse 7c1a9a8204 [FIX] l10n_be_hr_payroll: Hide wage_with_holidays when leaves = 0
Now that we don't take into account the legal leaves, it should be hiddden when the number of leaves is equal to 0 instead of 20.0

closes odoo/odoo#32125

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-26 12:05:33 +00:00
Toufik Ben Jaa a3cdfdc628 [FIX] website_sale: _is_available_on_website access rights issues
- The method `_is_available_on_website` on `product.pricelist` access to
  the field `code` which is limited to the group `base.group_user`.
  This causes issues when the method is called by a non internal user.

closes odoo/odoo#32123

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-26 10:15:43 +00:00
Christophe Simonis 5dbf7bf357 [MERGE] forward port branch saas-12.1 up to f00c490be8 2019-03-26 10:33:26 +01:00
Nicolas Martinelli fa42cebdc9 [FIX] account_payment: pay credit note
Complement of commit 9a450ac162

opw-1958997

closes odoo/odoo#32115

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:41:12 +00:00
Nicolas Martinelli 24961b9e2f [FIX] website_sale_options: striked price
- Set the 'Public Pricelist' with 'Discount Policy: Discount included
  in the price'.
- Go to the shop and search the product 'iPad Retina Display'
- Add product to cart by using the quick add to cart button

The 'Add to Cart' modal show public price & discount to the customer.

Closes #31378
opw-1944362

closes odoo/odoo#32114

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-26 08:00:56 +00:00
Christophe Simonis f00c490be8 [MERGE] forward port branch 12.0 up to 11b1e12cde 2019-03-25 19:45:26 +01:00
Swapnesh Shah a432e5c12a [FIX] hr_holidays: Add missing fields in constrains
closes odoo/odoo#32108

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-25 17:51:43 +00:00
Goffin Simon 00797edd88 [FIX] hr_timesheet: Timesheet user access right issue
Steps to reproduce:
- Create a clean Odoo 12E database and install Project, Timesheets, Accounting, Sales and Purchase applications
- Create a new project (e.g SO 6) and a new task (e.g milestone 1)
- Create a new user with access rights for Project = user and for Timesheet = user, and nothing else
- Login under this user, enter timesheet app and try to add a timesheet line in grid or kanban view

Bug:

An access rights error was raised but when trying to add a timesheet line from the list view, no
error was raised.

opw:1962126

closes odoo/odoo#32427

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-08 07:32:16 +00:00
Vincent 9f0bcabf05 [CLA] Adding Business Solutions For Africa
closes odoo/odoo#32353

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-03 01:20:48 +00:00
Graeme Gellatly 3017aecd09 [FIX] purchase_requisition: super call
Call super on overridden `_prepare_sellers` method in
purchase_requistion.

Closes #31649
opw-1963883

closes odoo/odoo#32470

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-05 14:52:20 +00:00
Odoo Translation Bot 4ccdddcf6b [I18N] Update translation terms from Transifex 2019-04-07 01:27:03 +02:00
Nicolas Lempereur 7a5f1068fa [FIX] stock: return's return ok package location
If we create a package X transfering from location A to location B:

- we create a stock.quant for package X in location B

=> The package is on location "B" (OK)

If then we do a transfer of that package from location B to location A:

- we set the location B / package X quant to 0 size
- we create a stock.quant for package X in location A

=> The package is on location "A" (OK)

If then we do a transfer of that package from location A to location B:

- we set the location A / package X quant to 0 size
- we set the location B / package X quant to package size

=> The package still is on location "A" (wrong)

This is because:

- since c0d7a05730 stock.quant.package field `quant_ids` is a view over
  related stock.quant but filtered on domain:
     ['|', ('quantity', '!=', 0), ('reserved_quantity', '!=', 0)]

- stock.quant.package fields `location_id`, `company_id`, `owner_id` are
  updated when a related stock.quant has fields `package_id`,
  `location_id`, `company_id`, `owner_id` modified

Thus when the `quant_ids` change by changing quantities, `location_id`
are not updated even if it should be.

opw-1963509
closes #32466

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-04-05 13:38:16 +00:00
Olivier Dony 6fa292cec8 [FIX] ir_mail_server, mail: catch SMTPServerDisconnected exceptions
If the smtp session was dead, it would lead the whole mail batch to fail.

opw 1949270

closes odoo/odoo#32424

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-05 14:10:41 +00:00
Nans Lefebvre 552da8dc8d [FIX] account: do not allow a user to have both B2B and B2C groups
We base ourselves on commit f206714af0, which added a check on user groups.
The tax-included and tax excluded displays are meant to be exclusive,
but wily users can add themselves to both groups using the res_users view
in debug mode.

opw 1950833

closes odoo/odoo#32200

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-28 13:04:00 +00:00
Christophe Simonis 11b1e12cde [MERGE] forward port branch saas-11.3 up to e9068c290b 2019-03-25 18:28:16 +01:00
Nicolas Lempereur 5838e47ab5 [FIX] web: modal in modal => no block mobile
On a form view:
- we open a modal form view
- in this modal we open a modal form view
- we close that second modal

=> the modal is closed and the first one is still opened, but on mobile
we can't scroll to above or below the modal.

This is because bootstrap remove .modal-open class on body when we close
the second modal, but this class is necessary to scroll (this is not
much an issue on desktop since scroll is often not necessary).

We already had a fix that was weakened in 02a063fd73.

With this changeset, we keep .modal-open as long as a modal is opened.

Without the change, added test failed with:
  10. Modal is said opened (expected: true, result: false)

opw-1948423
closes #32106

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 16:58:06 +00:00
Christophe Simonis e9068c290b [MERGE] forward port branch 11.0 up to 0196a6feb5 2019-03-25 16:47:05 +01:00
Olivier Colson 2fa9e881f4 [FIX] l10n_fr: fix wrong tag on tax
Before that, the tag set on this tag for its base amount was wrong; it caused it to be reported in the wrong section in l10n_fr_reports.

closes odoo/odoo#32103

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 15:08:55 +00:00
Martin Trigaux 57e6346442 [FIX] web: format date without locale
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"

Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64

Fixes odoo/odoo#32081

closes odoo/odoo#32102

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 14:42:28 +00:00
Isabel Esparza 6155210d12 [FIX] crm: states
Onchange to show only the states of an especific country in
opportunities.

Closes #31993
opw-1958170

closes odoo/odoo#32099

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 14:13:34 +00:00
Christophe Simonis 0196a6feb5 [MERGE] forward port branch saas-15 up to 6cd6d1d468 2019-03-25 15:12:00 +01:00
Thibault Delavallée 02f5b654c3 [FIX] website_slides: fix vote karma
Currently doing a like then dislike does not give a void karma total. Indeed
karma is removed / added only when the vote hits 1 or -1 but does not correctly
take into account the third (void) state. We also avoid adding karma when
upvoting / downvoting an already upvoted / downvoted slide. Interface does
not allow it but avoiding to add karma at model level is always a good idea.

Karma-related tests are improved a bit.

Commit linked to task ID 1958810 and PR #32057

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-25 12:39:32 +00:00
Can Tecim a39b1f4595 [ADD] l10n_tr: add provinces of Turkey
closes odoo/odoo#31592

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 12:38:05 +00:00
Christophe Simonis 6cd6d1d468 [MERGE] forward port branch saas-14 up to 3c7be1e88f 2019-03-25 13:32:17 +01:00
Christophe Simonis 3c7be1e88f [MERGE] forward port branch 10.0 up to a95811eee2 2019-03-25 13:30:34 +01:00
Thibault Delavallée 534822e54c [REF] website_slides: better completion computation
Purpose is to avoid having to recompute too much stuff. Indeed currently
slide.channel.partner completion field depends on its channel number of
slides. It means adding a slide on a channel having a lot of members will
trigger the recompute of all its slide channel information.

Instead completion on slide.channel.partner is now simply the number of
completed slides. Computed (not stored) field on channel that indicates
current user status is now based on total slide (completion / total slides).

Commit linked to task ID 1958810 and PR #32057
2019-03-25 12:18:28 +00:00
Thibault Delavallée eb045af676 [FIX] website_slides: remove unnecessary sudo in computed field
As we always update slide / partner relationship using sudo let us remove
unnecessary sudo in the computed field.

Tests are added to ensure it is effectively working. At least probably.

Commit linked to task ID 1958810 and PR #32057
2019-03-25 12:18:28 +00:00
Xavier Dubuc 46d22fbd4f [FIX] product: template kanban view perf
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.

This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.

opw 1951369

closes odoo/odoo#32048

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 11:44:55 +00:00
Bernard Letourmy 8d95b6c172 [CLA] Signature for bletourmy
closes odoo/odoo#32092

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 11:04:58 +00:00
Nicolas Lempereur e1b1d3cd1b [FIX] web_editor: no lose tooltip on selection
The editor has a tooltip editor wizard "Change media description and
tooltip", but when selecting an image there is also a tooltip:

  "Double-click to edit"

added by the editor.

The combination of the two break the functionality, eg:

- if a tooltip is set with editor, then selecting the tooltip: we see
  the set tooltip and not "Double-click to edit"

- if a tooltip is set with editor, then selecting the image back, then
  opening the tooltip editor => the set tooltip is lost

With this changeset, we just do not show "Double-click to edit" tooltip
if there is a tooltip set on the element.

opw-1946801
closes #32482

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-08 08:17:57 +00:00
Odoo Translation Bot 610ab82b51 [I18N] Update translation terms from Transifex 2019-04-07 03:14:49 +02:00
Jorge Pinna Puissant f666d78ff1 [FIX] base_address_city: city field without CSS class
Have the module 'City Addresses' installed.
Open a contact, with the city field and  the zip code field filled.

Before this commit, there is a display error, the city and the zip code
are bonded. This occurs because the 'City Addresses' module override all
views with the city field. In this override the city field don't had a
CSS class.

Now, the city and the zip code are display correctly.

opw-1958175

closes odoo/odoo#32455

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-05 11:56:22 +00:00
Matthew Watkins 1ad2a864df [CLA] signature for matthewdwatkins
closes odoo/odoo#32435

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-05 09:36:43 +00:00
Lucas Perais (lpe) 6524b79652 [FIX] stock: constrains should raise ValidationError
Before this commit, some constrains rose UserError
Which is not compliant with the api.constrains

After this commit, the constrains raise ValidationError

OPW 1949572

closes odoo/odoo#32444

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-05 08:17:05 +00:00
jev-odoo 741ffc45d1 [FIX] account_payment: invalid partner on payment token
The payment token was created using the partner of the invoice,
not the one really paying the bill.

opw 1938787

closes odoo/odoo#32176

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-05 08:15:58 +00:00
Christophe Simonis e3f5f17561 [MERGE] forward port branch saas-15 up to 214e819c1b 2019-04-04 20:07:27 +02:00
Damien Bouvy ce8d651cce [FIX] orm: don't crash on index creation
Creating field indexes might not always be possible.  For instance,
adding an index on an existing Char/Text field will fail if the column
contains values longer than 8192 bytes (PostgreSQL limit for BTrees).

Instead of failing miserably during the schema modification, simply log
the problem and continue.

closes odoo/odoo#32416

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-04 11:47:20 +00:00
Nicolas Martinelli 8b6be83f70 [FIX] stock_account: zero quantity
- Set up a stockable product for which the product category is FIFO / Perpetual
- Create a PO for this product with a unit price of 100$
- Confirm the purchase order
- Receive the item in stock
- Create a SO for this product
- Confirm the SO
- Deliver the item
- Unlock the delivery order and change the done quantity to 0
- Unlock the delivery order and change again the done quantity to a positive value

A `ZeroDivisionError` is raised.

Since `move.product_qty` is still zero, we fallback to `quantity`.

opw-1963984

closes odoo/odoo#32421

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-04 12:05:39 +00:00