Commit Graph
123567 Commits
Author SHA1 Message Date
Goffin Simon fced5d1e95 [FIX] web: Wrong comparison in invoice analyes
Steps to reproduce the bug:
Let's consider that we are in 2019

- Create two customer invoices: I1 and I2
- I1 with invoice date = 2 april 2019 and amount = 100€
- I2 with invoice date = 2 april 2018 and amount = 1000€
- Go to Reporting > Invoices
- Click on widget "Time Ranges" and set "Based on" Invoice Date and "Range" This Year "Compare To" Previous Year

Bug:

The untaxed total for previous year was 1100€ instead of 1000€ because it counted previous year and this year.

opw:1962027

closes odoo/odoo#32331

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-02 09:27:49 +00:00
Goffin Simon 0218b7fcd3 [FIX] purchase: Labels in purchase.order form view not displayed
The labels Request for Quotation and Purchase Order were not displayed.

opw:1958631

closes odoo/odoo#32281

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-01 06:44:50 +00:00
Lucas Perais (lpe) c8095eb81b [FIX] base: gantt rng option duration_unit
Before this commit, the duration_unit view attribute was not present in the gantt RNG
But the JS code in the framework and in Studio allow for modifying it

So, this commit makes it an optional view attribute

OPW 1946216

closes odoo/odoo#32133

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-03-27 10:19:02 +00:00
Julien Castiaux 7f41a4fd56 [FIX] l10n_in: pretty print HSN code
The HSN code is a code that internationally identify a precific product.
Presently each code for each product is print in the invoice summary.
After the fix it does have a dedicated column in the invoice so it is
print along the product is defines.

opw-1941077

closes odoo/odoo#32042

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-22 11:00:58 +00:00
Nans Lefebvre 6233c37f14 [FIX] sale_stock: hide redundant incoterms_id field
The field incoterms_id is made redundant by the field incoterm_id introduced in
b5bb5bd421. As such, it has been removed in master at: 569a498d36
We make this field invisible,
and synchronize the invoice incoterm_id with the sale order incoterm.

opw 1935573

closes odoo/odoo#32039

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-29 08:33:28 +00:00
Nicolas Martinelli 4da82776ff [FIX] purchase_stock: return dropship
- Set an internal location as a return location
- Create a SO with a dropship product, validate and deliver
- Return the product, and choose the internal location as the return
  location.

The received quantity on the PO is counted twice.

Since the return is an 'in' move linked to a PO, it is automatically
counted as incoming quantity.

This case is quite specific, so we explicitly add an exception in case
the origin move was a dropship, but the return is not a returned
dropship.

opw-1958228

closes odoo/odoo#32205

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-28 12:01:42 +00:00
Nicolas Lempereur 25e16bc668 [FIX] website: tooltip width analytics chart
On the line chart of google analytics account, we have a tooltip with
lines ({date}

sessions: {number of session}) overlapping and going
outside of the modal width.

This does not happen on google examples, the only fix found is to
display the tooltip in HTML instead of SVG.

opw-1961605
closes #32285

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-01 08:02:32 +00:00
Nans Lefebvre 3f9a0d862f [FIX] l10n_generic_coa: fix demo data install
The demo data could crash trying to send a (6, 0, [False]) to the ORM.

closes odoo/odoo#32256

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-03-29 15:04:50 +00:00
Odoo Translation Bot 3f50c16d5a [I18N] Update translation terms from Transifex 2019-03-31 01:32:20 +01:00
Julien Castiaux 3b5f33281d Partial Revert "[FIX] sale: subtotal computation and display"
This partially reverts commit e2e27b41ad.

The commit changes the DOM structure in order to pretty print both
amount (value without tax, B2B setting) and total price (value with tax,
B2C setting). Actually having both (B2B and B2C) is a client
misconfiguration and we do not support that, furthermore changing the DOM
structures can break inherited templates.

The said commit was also fine tunning 716ff76, the fine tune is
related the the removal of the dynamic colspan attribute. The section,
note and subtotal should take the entire width of the table, setting the
colspan to an abritary maximum ensures they fill the entire width.

closes odoo/odoo#32194

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-28 09:36:41 +00:00
Pierre Masereel 09fb2469b4 [FIX] payment_paypal: fix tests
Since changes made in this commit https://github.com/odoo/odoo/commit/fc1389f8d881adfb94ea1b784fb7104b9eee5d2d the value of field 'custom'
is now set and wasn't before.

closes odoo/odoo#32258

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-29 14:35:23 +00:00
Pierre Masereel 095a539f5c [FIX] payment_buckaroo: fix tests
Some values in the form have been changed in this commit:
https://github.com/odoo/odoo/commit/fc1389f8d881adfb94ea1b784fb7104b9eee5d2d
2019-03-29 14:14:07 +00:00
Nicolas LempereurandRomain Derie a4ce56fe56 [FIX] website_sale: pricelist ecommerce 1st install
Since 2d970942ba it is possible among other improvments to have a
pricelist on all website if it has a "code" or is "selectable" and has
no specified website.

Following this, the default "Public Pricelist" is not associated to a
website but since it is not selectable and has no code, we would get no
pricelist on the website on default installation without demo data.

With this changeset, the "Public Priclist" is set to selectable when
website_sale is installed.

opw-1961069
closes #32254

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>


Co-authored-by: Romain Derie <rdedoo@users.noreply.github.com>
2019-03-29 14:49:02 +00:00
Julien Castiaux aa18cac547 [FIX] website_blog: invalid bootstrap id
- Go to Website.
- Open a Blog
- Try to open the Archives Tree an the right site
  (set 'Cuszomize Settings / Archives')
- The tree doesn't open

In Bootstrap 4, and HTML id attribute must start with a letter.

opw-1959770

closes odoo/odoo#32244

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-29 13:13:50 +00:00
Martin Trigaux c9d01b136f [ADD] test_translation_import: add new test
This test also fails before the module extraction commit as the code
translations like the one for 'Ijkl' have no 'module' value during the reimport
and are ignored by the following search

closes odoo/odoo#32022

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 14:50:56 +00:00
Martin TrigauxandRaphael Collet 257ccdf83c [FIX] tools: extract module from po file
When a single po file is processed (i.e. direct po import, not read from a i18n
directory inside a module), there was no module information on code translations

The module information is important for web translations where the list of
modules is given in the call to the route '/website/translations' and
'/web/webclient/translations' and only the web translations of these specific
modules is retrieved and used.

To manually import the translations of a custom module (e.g. openerp_enterprise),
the base.language.import wizard is typically used and the give .po file is
directly imported.
For model and model_terms, the module information is easily deducted from the
the record external id (<module>.<reference>) but for code translation, we
relied on the global variable module_name.

The .po file do contain the module information but this information was ignored.
Real example:

  #. module: openerp_enterprise
  #. openerp-web
  #: code:addons/openerp_enterprise/static/src/js/odoo_enterprise_start_trial.js:249
  #, python-format
  msgid "Please choose your domain name"
  msgstr "Veuillez choisir votre nom de domaine"

Before this commit, the above translation was imported without the module and
was not retrieved in the '/website/translations' call on the /trial page

The global module_name is still used when set for backward compatibility.

Co-authored-by: Raphael Collet <rco@odoo.com>
2019-03-29 14:48:57 +00:00
Martin Trigaux 76264db40b [FIX] project: remove old hack
This code was to be removed in saas-7 (which went the way of the dodo)
project_time_mode_id is now only on hr_timesheet

This was creating an ir.model.data entry with res_id=0 (not record found).
A ir.model.data without id triggers a warning in the trans_generate method when
trying to export the translations of the module project (where the reference
fails to be resolved)
2019-03-29 14:48:57 +00:00
Christophe Simonis 82f8c37f69 [MERGE] forward port branch saas-11.3 up to ec29b4d364 2019-03-29 16:10:42 +01:00
Nicolas Lempereur f2c301557d [FIX] website: "Visits" no overlap "active users" in dashboard
The current style on "Active users: {number}" placed it 60 pixels over
were it should be, so this was:

- overlapping "Visits" title
- not sparing vertical size (since we use "position:relative")

opw-1961605
closes #32245

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-29 12:53:12 +00:00
Martin Trigaux 89347f451b [FIX] im_livechat: do not rename module description
mail.channel module in mail module has the description "Discussion Channel"
(with a capital C) and was overriden in im_livechat to "Discussion channel"
(with a lowercase c).
Installing a module was renaming a field (which is never a good idea, especially
for translated fields)

closes odoo/odoo#32238

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-29 10:39:27 +00:00
Martin Trigaux 0f6038e777 [I18N] *: export 12.0 source terms
Some changes were not reflected in 12.0.
Changes made in .pot in previous versions were not forward ported

Closes odoo/odoo#32238
2019-03-29 10:39:17 +00:00
Christophe Simonis ec29b4d364 [MERGE] forward port branch 11.0 up to 4231103cc9 2019-03-28 18:17:20 +01:00
Christophe Simonis 4231103cc9 [MERGE] forward port branch saas-15 up to 23650d5217 2019-03-28 16:54:21 +01:00
Christophe Simonis 23650d5217 [MERGE] forward port branch saas-14 up to 7dd2a642ed 2019-03-28 16:53:18 +01:00
Christophe Simonis 7dd2a642ed [MERGE] forward port branch 10.0 up to 14a8148e8d 2019-03-28 16:52:53 +01:00
Christophe Simonis 14a8148e8d [FIX] hw_escpos: define used variable
Oversight of #32079
2019-03-28 16:50:16 +01:00
Christophe Simonis a039d657e4 [MERGE] forward port branch saas-15 up to 6b54bd88a9 2019-03-28 16:05:06 +01:00
Christophe Simonis 6b54bd88a9 [MERGE] forward port branch saas-14 up to 78f01e3609 2019-03-28 15:46:55 +01:00
Christophe Simonis 78f01e3609 [MERGE] forward port branch 10.0 up to 6814f27bbc 2019-03-28 15:46:04 +01: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
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
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
Christophe Simonis 0196a6feb5 [MERGE] forward port branch saas-15 up to 6cd6d1d468 2019-03-25 15:12:00 +01: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
Nicolas Lempereur 2a89f0c7f8 [REV] "[FIX] website: language prefixed URL on website"
This reverts commit 5324284f56
This reverts commit ad826f56ba.

If for example we had in a template:

 <script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>

it has been reproduced to be gotten as:

 <script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>

which is unexpected and could cause an error.
closes #32090

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-25 10:53:25 +00:00
Gert Pellin 6814f27bbc [FIX] hw_escpos: opening pulse cashdrawer
Some cashdrawers will not open when the command is send. This can be
solved by sending a longer opening pulse.

Used fix of newer library:
https://github.com/python-escpos/python-escpos/blob/0a89ee2b8610452f18b521af71b1ab1af7932894/escpos/constants.py#L40
Explanation for command:
http://www.beaglehardware.com/howtoprogramcashdrawer.html

closes odoo/odoo#32079

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-25 10:03:54 +00:00
Nicolas Martinelli d3bd48d67b [FIX] stock: has_tracking
The field `has_tracking` should be read-only, there is no reason to make
it writeable.

opw-1958266

closes odoo/odoo#32080

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-25 08:24:01 +00:00
Odoo Translation Bot fa12433867 [I18N] Update translation terms from Transifex 2019-03-24 03:11:51 +01:00
Nicolas Lempereur ad826f56ba [FIX] http_routing: ignore # when checking multilang URL
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.

But with #31792 we should once again prefix URL by the language if
necessary.

The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.

With this fix, `#fragment` is not taken into account when searching
route.

related to #31792
related to opw-1922051
closes #32059

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-03-22 16:51:09 +00:00
Nicolas Lempereur 5324284f56 [FIX] website: language prefixed URL on website
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).

With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:

- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop

With this PR, URLs are prefixed with language once again.

note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).

opw-1922051
closes #31792

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-22 16:14:09 +00:00
Christophe Simonis 3a0bedd655 [MERGE] forward port branch saas-15 up to 48e4c18fc4 2019-03-22 16:26:33 +01:00
Christophe Simonis 48e4c18fc4 [MERGE] forward port branch saas-14 up to cded89b531 2019-03-22 13:26:19 +01:00
Christophe Simonis cded89b531 [MERGE] forward port branch 10.0 up to f1c72ee8ee 2019-03-22 13:25:55 +01:00