Commit Graph
127612 Commits
Author SHA1 Message Date
Jorge Pinna Puissant 9cf6662880 [FIX] account: compute_fiscalyear_dates non leap years
Before this commit, when the fiscal year was setting to 29/02.
The function that compute the fiscal year dates gives an error.
This occurs when the date passed as parameter wasn't a leap year.

Now, for the non leap years we use the 28/02.

opw-1917035

closes odoo/odoo#29932
2019-01-04 10:23:44 +00:00
Alexey Pelykh 1ffc485689 [FIX] hr_holidays: extra space in state check
The condition was never validated

closes odoo/odoo#29898
2019-01-04 10:18:30 +00:00
Alexey Pelykh 11e5688d0f [CLA] Brainbean Apps OU signs Odoo CCLA 2019-01-04 10:18:24 +00:00
Nicolas Lempereur 27a084eb81 [FIX] web: attach document fix click on firefox
As of saas-11.3 there is a "Attach document" widget that is meant to
more easily add attachment.

But on firefox the click event is coming from the button, where on other
browsers it was possibly from a child element.

So the code expecting the child element did not work on firefox.

opw-1920842
closes #29903
2019-01-03 17:00:18 +00:00
Christophe Simonis d96c42ea88 [MERGE] forward port branch 11.0 up to 22637aadec 2019-01-03 15:31:05 +01:00
Raphael Collet a07a076c45 [FIX] models: avoid prefetch hell when reading fields
The method `read()` may be very slow when reading relational fields and
computed fields, because the computed fields can be computed on a recordset
that is larger than expected.

The issue occurs on model 'res.partner' when reading fields 'child_ids' and
'purchase_order_count', for instance.  Suppose we read those two fields on a
partner with 1000 contacts.  First, the one2many field is read from the
database and stored to the cache; the latter adds the value ids to the
prefetching of 'res.partner'.  Then, the fields are fetched from the cache.
When 'purchase_order_count' is accessed on the partner, the field is computed
on all its children as well...

closes odoo/odoo#29867
2019-01-03 12:45:48 +00:00
Jorge Pinna Puissant 8ac1cdde2e [FIX] web_planner: prepare_backend_url give a bad URL
opw-1920590

Before this commit, the function prepare_backend_url forced in the url
the view_type 'form'. This occurs because a misunderstand between the
fields ir.actions.act_window.view_type (That indicate if an hierarchy
in the view list exists, with as possible values : form and tree, which
can be mistaken as views types) and ir.actions.act_window.view_mode
(which is a list of allowed views).

Now, if not ask otherwise, the function give the url of the first
(the default) allowed view; or one of the allowed view if asked for it.

closes odoo/odoo#29882
2019-01-03 11:16:30 +00:00
Odoo Translation Bot d331d28fdf [I18N] Update translation terms from Transifex 2019-01-06 03:24:31 +01:00
Robot Odoo 5aa16e4507 [IMP] l10n_be_hr_payroll: Update salary rules up to 2019
Update withholding taxes and child allowances for the new fiscal year.

Documentation: https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/precompte_professionnel/calcul

closes odoo/odoo#29931
2019-01-04 15:05:11 +01:00
Yannick Tivisse 3569d053d3 [IMP] l10n_be_hr_payroll: Update witholding taxes reductions up to 2019 2019-01-04 12:37:01 +01:00
Yannick Tivisse 551bffd3a1 [IMP] l10n_be_hr_payroll: Update 'bonus à l'emploi' up to 2019
Documentation: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/deductions/workers_reductions/workbonus.html
2019-01-04 12:37:01 +01:00
Yannick Tivisse a6ba0b6678 [FIX] l10n_be_hr_payroll: Remove wrong rule
This rule is not correct, and shouldn't be applied here.
2019-01-04 12:37:01 +01:00
Yannick Tivisse f543cb2b18 [IMP] l10n_be_hr_payroll: Update salary rules up to 2019
Update withholding taxes and child allowances for the new fiscal year.

Documentation: https://finances.belgium.be/fr/entreprises/personnel_et_remuneration/precompte_professionnel/calcul
2019-01-04 12:37:01 +01:00
David Tran 1377c45f4d [FIX] sale: allow execution on multiple records
avoid singleton error when self contains multiple orders

closes odoo/odoo#29922
2019-01-04 10:47:17 +00:00
Martin Trigaux 838c9e5617 [I18N] export 11.0 source terms
To integrate recent content changes and benefit from cd4080839f and 7f8631a91

closes odoo/odoo#29933
2019-01-04 10:13:05 +00:00
Nicolas Lempereur 3125d20da3 [FIX] web: X2Many read propagates field context
Most operations on X2Many widget possibly propagates a field context
(name_create, name_search, ...) but the original read or read on an
onchange does not.

With this changeset, the field context is also used in these instances.

The assertions added in the added test failed with:
  expected: ["world"], result: [undefined]
  expected: ["world","world"], result: [undefined,undefined]

fixes #29203
opw-1914466
closes #29866
2019-01-04 09:44:49 +00:00
Nicolas Martinelli 04369bab39 [FIX] rating_project: pop group_by
- Go to 'Project'
- Group by 'Manager'
- Click on the rating

A traceback occurs.

This is because the grouping field `user_id` does not exist in the
target model.

Fixes #26060
opw-1920979

closes odoo/odoo#29900
2019-01-03 16:04:50 +00:00
Martin Trigaux 7f8631a913 [FIX] tools: properly verify the size of HTML nodes
Instead of checking the size of text only node, let the xml_translate verify it.

The size verification using etree was introduced at 40efdccc3d but was
probably too simple.
Since 45352512a8, this becomes redundant with the nonspace method which can
be extended.

The re.sub is still relevant as some terms may contain only non-alphanumeric and
use push_translation (e.g. '>=' as a selection or xml terms extracted by babel
in static repository)

closes odoo/odoo#29432
2019-01-03 15:01:10 +00:00
Raphael Collet cd4080839f [FIX] translate: inline elements with translatable attributes only 2019-01-03 13:46:27 +00:00
qdp-odoo 22637aadec [FIX] account: typo introduced in d44437f93830afae60e5354e0b4777413be29c93
closes odoo/odoo#29874
2019-01-03 09:21:50 +00:00
Christophe Simonis a23e8c081a [FIX] account: adapt forward-ported test 2019-01-02 17:11:36 +01:00
Denis Vermylen e1767490e9 [FIX] purchase: loading time on partners with many children
When loading a partner form view, the ORM prefetches the computed fields
purchase_order_count and supplier_invoice_count for all the related
partners as well (parent, children, ..).

Instead of reading the orders and invoices once per partner, we group
them all together.

opw 1919933

closes odoo/odoo#29788
2019-01-02 16:08:55 +00:00
Raphael Collet 1b434ed8c3 [FIX] models: make prefetching more specific in read()
Commit a07a076c45 restricts the prefetching to
`self` when accessing the fields to return.  This is too restrictive, as it
cancels prefetching of secondary records in computed fields.  In this commit we
limit the scope of the restriction to `self`'s model only; this fixes the
original issue without impacting other models.

closes odoo/odoo#30133
2019-01-11 11:01:22 +00:00
Aurélien Warnon e2bdb65321 [FIX] website_slides: hide slide download button if not available
Task #1923443

Purpose
=======

The slides on the website showed the 'download' button regardless of the value of the 'download_security' field.
If the value is 'none', meaning that the slides are never downloadable, the button should be hidden.

closes #29904

closes odoo/odoo#30051
2019-01-10 14:52:15 +00:00
Christophe Simonis e618845112 [FIX] web: adapt forward-ported test 2019-01-02 16:08:25 +01:00
Sanjay Jamod 03b0e153ac [FIX] account_check_printing: Fix traceback on onchange
Method amount_to_text() having self.ensure_one(), it should not be
called with empty recordset

Closes #29854

closes odoo/odoo#29865
2019-01-02 14:46:07 +00:00
Christophe Simonis 79f1ecd756 [MERGE] forward port branch 11.0 up to d82c0d133e 2019-01-02 15:37:01 +01:00
Christophe Simonis 6e933e42ef [MERGE] forward port branch saas-14 up to a80bde859c 2019-01-02 11:44:07 +01:00
Wolfgang Taferner d82c0d133e [FIX] stock: tell the user which product is causing the issue
closes odoo/odoo#29857
2019-01-02 10:36:57 +00:00
Christophe Simonis 7d45e43a13 [MERGE] forward port branch saas-15 up to 6e933e42ef 2019-01-02 13:42:12 +01:00
Enric Tobella c8de59ad2b [CLA] siognature for Enric Tobella
closes odoo/odoo#29593
2019-01-02 10:57:03 +00:00
Christophe Simonis a80bde859c [FIX] base: correct res.partner name_search
Oversight of previous forward-port when adapting cc217569b7
2019-01-02 11:12:37 +01:00
Christophe Simonis 015f2582ad [MERGE] forward port branch saas-14 up to 1d672b33a7 2019-01-02 10:50:46 +01:00
Christophe Simonis 1d672b33a7 [MERGE] forward port branch 10.0 up to 9ef7802520 2019-01-02 10:49:56 +01:00
Nicolas Seinlet 5f6a491265 [IMP] point_of_sale: use read_group
Using read_group outside of the loop make the sum computation in 
PostgreSQL instead of Python, and avoid the ORM to fetch fields of 
records to compute a sum of one field.

closes odoo/odoo#29825
2018-12-31 08:15:14 +00:00
Bohdan Lisnenko 9298c576f4 [FIX] website_sale_comparison: keep attributes order consistent
closes odoo/odoo#30221
2019-01-16 14:47:46 +00:00
Christophe Simonis f03f09cf90 [FIX] purchase: adapt forward-ported view changes to new version 2019-01-16 18:22:32 +01:00
Christophe Simonis 1d05c0a499 [FIX] mrp: correct forward-ported test 2019-01-16 18:19:55 +01:00
Christophe Simonis 378b283c02 [MERGE] forward port branch saas-11.3 up to 83cc046e9a 2019-01-16 17:02:34 +01:00
Lucas Perais (lpe) e79c35dcbc [FIX] stock_account: inventory valuation value in company currency
In multicompany,
Have company B with a different currency than company A
With a shared product catalog
Open the inventory valuation report for company B

Before this commit the stock Value is expressed in company A's currency,
even though the value itself is correct

After this commit, the stock value is expressed in the right currency

OPW 1912511

closes odoo/odoo#30242
2019-01-16 12:06:45 +00:00
Jeremy Kersten 44585c2420 [FIX] website_sale_comparison: compute currency from template
closes odoo/odoo#30238
2019-01-15 17:12:12 +00:00
Jeremy Kersten bdbca1cdca [FIX] website_forum: add level field in gamification form view 2019-01-15 17:12:12 +00:00
Nicolas Lempereur 535da9e78c [FIX] web: no ResizeObserver video error on chrome
When displaying a video, with the browser window at a certain size, or
resizing it (or opening developer tools) we could the following error:

 "ResizeObserver loop limit exceeded"

This can be reproduced in chromium just with this JS code:

  window.onerror = function(e){ console.log(e); };
  document.body.innerHTML = '<div><video controls src="v.webm"/>';

The issue only happen if:

- the video server does not support HTTP range requests
- the controls are displayed on the video
- browser size is in problematic size/resized to problematic size

And the error is raised in window.onerror but not displayed in the
developer console.

With this change, we ignore these errors until fixed in chromium.

chromium bug tracker: https://crbug.com/809574

opw-1928512
closes #30239
2019-01-15 17:01:57 +00:00
Aurélien Warnon b654fabe04 [FIX] event_sale: fix event registration confirmation modal
Task #1910927

Purpose
=======

When confirming a sale order with event tickets, a modal is supposed to be shown to be able to
confirm the event registration.

That modal was not shown anymore.

To solve it, we split the '_action_confirm' to run the actual business of the event_sale module,
which is '_update_registrations', and moved the action returned in the regular 'action_confirm' method.

closes odoo/odoo#29997
2019-01-09 08:50:45 +00:00
Anshuman Sharma cd1d9824ab [FIX] website: solve alignment bugs in onboarding
- Fix the position of 'Add to menu' toggle button in new page dialog
- Properly align tip icon in the welcome message

task-1895287

closes odoo/odoo#29403
2019-01-16 10:16:44 +00:00
Toufik Ben Jaa 7f524c393d [FIX] payment: display payment tokens for form acquirers
- The method `_get_available_payment_input` that returns the available
  payments acquirers and the payments tokens for a specific user never
  returns the payments tokens linked to a non s2s payment acquirers.

  This is wrong, the payments tokens should always appears no matter
  what are the acquirers' payment flow.

  The payment flow is used only to specify where the customer should
  input his credit cards details, either on Odoo or on the payment
  acquirer's website (or popup).

  Once a token is created, it is safe to process it since no credits cards
  details are stored on the Odoo database.

closes odoo/odoo#30258
2019-01-16 09:45:38 +00:00
Nans Lefebvre ba65d0e259 [FIX] mrp: show correct number of attachments on bom lines
Display a BoM.
On BoM lines, there is an attachment feature that creates a mrp.document,
which is basically a container for an attachment.
This commit fixes the view which displayed 'no attachment' when there were some
and vice versa.
It also fixes the computation of the number of attachment: the displayed view is
on mrp.document, but the computation is done on ir.attachment.
As a result if there are other unrelated attachments (such as digital files)
they would be counted but not displayed.

opw 1923441

closes odoo/odoo#30208
2019-01-15 12:21:07 +00:00
lejeune quentin c516cb90af [ADD] IoT : Add printer compatibility with the LPD protocol
closes odoo/odoo#29875
2019-01-15 15:23:24 +00:00
lejeune quentin b314a970f8 [FIX] IoT : Remove inactive Timesyncd service 2019-01-15 15:23:24 +00:00
lejeune quentin e5c62987b4 [FIX] IoT : HTTPS disable certificate verification by URLLIB3 2019-01-15 15:23:24 +00:00