Commit Graph
127612 Commits
Author SHA1 Message Date
jev-odoo 52d6898445 [FIX]point_of_sale: adapt _create_account_move_line for inheritance
This commit intend to allow better inheritance in the
account_move_line_creation_process

The new _prepare_account_move_and_lines method only prepare
the move and the lines but does not write and post them.

This is done by the former _create_account_move_line method.

Needed to fix pos_sessions with unbalanced journal entries
caused by round globally option with taxes included in price

I.E. opw-2038814

closes odoo/odoo#35351

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-02 12:02:02 +00:00
Goffin Simon e5a8b0632f [FIX] stock_dropshipping: Dropship created after editing an existing quotation
Steps to reproduce the bug:
- Create a quotation and a SO line SOL with one product and route "Dropship"
- Confirm the SO and a PO is created
- Validate PO and process the dropship picking
- Add 4 units to the SO line SOL

Bug:

A new PO was created but the related picking was type "Receipts" instead of "Dropship"

opw:2034398

closes odoo/odoo#35323

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-07-31 12:09:57 +00:00
Paul Morelle 568a7ee12d [FIX] website_sale_wishlist: improve product page loading time
When the product has a lot of variants which are displayed as checkboxes
or as colors, the jQuery selector was matching as many items, and the
event was triggered for each of them.
The result was the change event of website_sale being triggered many
times, where only one call would be enough.

The change replicates what was made on v12.0 on the same line by commit
f8dad1bb4b.

opw 2036356

closes odoo/odoo#35322

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-31 09:22:16 +00:00
Lucas Perais (lpe) 7e889a1bd5 [FIX] web: init makeRecord fields with correct values
In the calendar view
In the partner filter in the calendar side bar
type something, and backspace rapidly to remove everything

Before this commit, there was a error because the framework tried to write something
in the corresponding field
This was because the o2m field was not initialized
with the correct values

After this commit, there is no error

OPW 2043975

closes odoo/odoo#35330

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-31 15:19:44 +00:00
David Beguin b091014686 [FIX] elearning : show only website_published badges in profile
Before, we were adding a card slot for each badge but displaying information on this
slot only if the badge was website_published. This led to empty slots.

Now, we add only the section if the badge is website_published.

Also, the badge count should only display the number of website_published
received badge of the user. As the profile page is only displayed the information
about 'frontend' achievements (elearning and forum) of the user.

Task ID:2045192
PR #35321

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-31 09:08:44 +00:00
Olivier Colson 5bacf72319 [FIX] account: avoid rounding issues when using a tax with multiple repartition lines
- create an invoice with only one line with a price of 91.56
- assign a tax of 15% using two 50% repartition lines to this invoice line

==> The total tax amount computed was 13.74; it should be 13.73.

closes odoo/odoo#35412

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-02 13:50:35 +00:00
Odoo Translation Bot fd0813d506 [I18N] Update translation terms from Transifex 2019-08-04 06:07:54 +02:00
Lucas Perais (lpe) 0b13c3038f [FIX] l10n_be_intrastat: propagate country_id
Before this commit, the field intrastat_country_id was not propagated when refunding an invoice

After this commit, the refund invoice takes the same values for that field
as the invoice it is refunding

OPW 2028333

closes odoo/odoo#35309

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-30 15:35:14 +00:00
Anh Vu 3748ac5d17 [CLA] Signature for anhvu-sg
closes odoo/odoo#35235

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-30 12:52:07 +00:00
Lucas Perais (lpe) 3e61dab281 [FIX] sale: import order line multicompany
- Admin (U1) user, Demo (U2) with Sales Manager rights
- Create parent company A and child company AA, U2 has access to A (U1 to both)
- Create 2 taxes, T1 for A, T2 for AA
- For product P, add tax T1 in company A, and T2 in company AA
- U2 creates a new SO in company A with no lines, export Order Lines/Product
- U2 edits the file to add product P
- U2 imports the file

Before this commit, the sale order's line had the taxes for bot company

After this commit, it only has the taxes for the company of the sale order

OPW 2036453

closes odoo/odoo#35294

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-30 12:02:27 +00:00
Priyanka Kakadiya de0d9f3339 [FIX] *: fix UI glitch of kanban dropdown.
purpose of this commit is to show dropdown inside the kanban box with proper UI

By default, bootstrap use Popper.js for dynamic positioning. so, We need to
disable this issue with display static for removing glitch.

expected behaviour:
after applied this commit, kanban dropdown position will be inside of kanban box.

closes odoo/odoo#27150

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-30 05:13:50 +00:00
Goffin Simon 83b8e2d962 [FIX] l10n_ae: Reverse charge with Vendor Bill
The reverse charge was counted twice in the VAT Return Summary Report

A reverse charge tax is a group of taxes with:
- Reverse Charge TVA +5%(Purchase)
- Reverse Charge TVA -5%(Purchase)

When buying a product P with a reverse charge tax on it.
The only tax that must appear in the VAT Return Summary Report is
the Reverse Charge TVA -5%(Purchase)

opw:2041877

closes odoo/odoo#35499

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-06 13:21:29 +00:00
Odoo Translation Bot 344d20a6c4 [I18N] Update translation terms from Transifex 2019-08-11 01:17:49 +02:00
Jorge Pinna Puissant 0e9d200d09 [FIX] point_of_sale: automatic selection of customer pricelist when using barcode
When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.

This is a fine-tuning on 5603b778f6

opw-2047070

closes odoo/odoo#35602

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-08-09 12:55:38 +00:00
Christophe Simonis f6ce242b0f [MERGE] forward port branch saas-11.3 up to 7321c8e260 2019-08-09 14:53:59 +02:00
Alexandre Kühn 9269e876fd [FIX] mail: notify other tabs on document thread message post
Before this commit, most new messages added to the mail manager were
handled as if recently posted from a document thread. As a result, it
was frequently setting a new item in the local storage to notify
other tabs from these new messages.

The intent of this behaviour is to notify other tabs of newly posted
messages in a document thread, without using a longpolling
notification. That means this logic should only apply on messages
that have been recently posted on a document thread.

Sometimes, this issue was breaking the local storage on Firefox.
It showed the error message "Quota Exceeded Error" whenever `setItem`
was used, even when items were removed beforehand. The capacity of
the storage was only a few Kbs on this domain, far from reaching the
maximum capacity. We think that this error comes from the concurrent
`setItem` on multiple tabs, but this is very hard to reproduce.

This commit fixes the issue by limiting the `setItem` to the tab
that really posted the message. Tests have been adapted in order to
pass only with this fix.

note: backport of 12.2 4bde721f9

opw-2031960
closes #35588

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-09 09:21:19 +00:00
Antoine Prieels b515d54232 [FIX] hw_escpos: Cash drawer doesn't always open
With some printers (ex: Epson TM-m30), the cash drawer only opens 50%
of the time if you just send the kick command.

A fix has already been made (odoo/odoo#33328). In the previous fix, we
retried up to five times to send the pulse, checking the status of the
drawer between each pulse. The problem was that, when we read the value
of the status, the pulse was not yet done and the status was not yet
updated. The pulse was then always sent five times, even if the first
pulse worked, making a lot of noise.

For some reason, if you read the status right after sending the pulse,
the drawer always opens and the loop is not needed anymore.

TaskID: 2045581

closes odoo/odoo#35368

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-01 07:58:24 +00:00
Martin Trigaux 9a16198862 [IMP] account: add helper on fields
It was not clear the difference between taxex and tax

opw-1968163

closes odoo/odoo#35575

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-09 07:14:57 +00:00
Martin Trigaux 496d2c30ad [FIX] account,iap,sale,mail,portal: translate error messages
The error were untranslatables

Courtesy of Moises Lopez

closes odoo/odoo#35573

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-08 13:56:25 +00:00
Nicolas Martinelli 5b83f7214f [FIX] purchase_stock: UoM rounding
- Set the rounding of Unit(s) to 1.0
- Create a PO for 1.4 Unit(s), validate => the picking contains
1.4 Unit(s)
- Validate the picking

The backorder wizard is displayed, and if no backorder is selected, a
crash occurs.

The quantity should be rounded when the picking is created. Otherwise,
inconsistencies will appears when it is rounded in subsequent processes.

opw-2046965

closes odoo/odoo#35560

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-08 11:28:29 +00:00
xmo-odoo 542e9640e2 [FIX] base: incorrect _on_login_cooldown return
_on_login_cooldown is documented as being disabled when
"base.login_cooldown_after" is set to 0, however the incorrect return
value meant setting this parameter to 0 would put every user on login
cooldown permanently.

Closes odoo/odoo#35544 reported by @rodrig92

closes odoo/odoo#35555

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-08-08 09:43:59 +00:00
Nicolas Martinelli fde3b69656 [FIX] tools: epsilon magnitude
The following rounding is incorrect:
```
>>> float_round(6.6 * 0.175, precision_digits=2)
1.15
```

Indeed, 6.6 * 0.175 = 1.155 ≈ 1.16.

In this specific case, the `epsilon` computed is not sufficient. A
precision of 53 gives:
normalized_value = 115.49999999999997
epsilon = 1.2823075934420547e-14
=> new normalized_value = 115.49999999999999

Bad luck, this is just not enough to tip the value in the right
direction.

However, a precision of 52 is sufficient:
normalized_value = 115.49999999999997
epsilon = 2.5646151868841094e-14
=> new normalized_value = 115.5

The value of 53 was chosen from the `binary64` number format precision.
In case of Python, the corresponding machine epsilon is 2^-52 [1].
Therefore, using 52 instead of 53 does make sense.

It is worth noting that the value of the machine epsilon
2^-52 = 2.2204460492503131e-16, which is still 2 orders of magnitude
below our dynamic estimation.

[1] https://en.wikipedia.org/wiki/Machine_epsilon
[2] `numpy.finfo(float).eps = 2.2204460492503131e-16`

opw-2047368

closes odoo/odoo#35521

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-07 08:25:53 +00:00
amoyaux af3f6e596d [FIX] stock : webplanner link to product does not work.
In the planner the url are generated by prepare_backend_url that takes
an action's xml id as argument. The id passed should have the format
'module_name_where_the_action_is.action_name'. In this case the id passed
was product.product_template_action_product but the action is defined in
stock thus the prepare_backend_url was not able to find the associate action
and return a wrong(default) url.

This commit change the action id passed with the correct module.

closes odoo/odoo#18812

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-29 12:49:26 +00:00
Olivier Colson 03daf7f360 [IMP] account: add constraint on tax report lines to avoid duplicate tag name in the same country
closes odoo/odoo#34172

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-07-29 11:37:35 +00:00
Olivier Colson b29c8d4dd9 [FIX] l10n_ae: avoid duplicate tag names in tax report
Having duplicate tag names is bad for usability, as the user will ne be able to differenciate between tags when performing tax configuration.
2019-07-29 11:37:35 +00:00
Olivier Colson 710c2b91b4 [FIX] l10n_de: reintroduce view, removed by mistake
closes odoo/odoo#35224

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-02 23:07:22 +00:00
Olivier Colson f5653603a5 [FIX] l10n_de: fix reference to an old field in tax form 2019-08-02 23:07:22 +00:00
Olivier Colson 333c22edd9 [FIX] l10n_*: fix taxes repartition so that 12.3 matches what is defined in 12.2
[IMP] l10n_*: don't define accounts or tags on tax repartition line templates anymore for 0% taxes

[FIX] account: remove old function used to migrate the former tax model, incompatible with the new one
2019-08-02 23:07:22 +00:00
Laurent Smet 3efefd2171 [FIX] l10n_mx: Reintroduce missing tag for CFDI
closes odoo/odoo#35101

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-08-01 08:50:00 +00:00
jem-odoo ed4d14a31b [FIX] account: analytic lines access with timesheet manager
When validating a invoice, the billing user should have access (read) for all analytic
lines. A problem appears when timesheet is installed, since there is a mismatch with
ir.rule (a timesheet is an analytic line with a project set).
The rule "account.analytic.line.billing.user" already exists for this problem, but should
be extended to work in any case.

To reproduce:
- set a user as timesheet manager and billing user
- try to validate an invoice (or post an expense)
- got an access error with "account.analytic.line.timesheet.manager"

opw-2041615

closes odoo/odoo#35297

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-07-30 12:59:20 +00:00
Mathieu Duckerts-Antoine 1631c9dbc9 [FIX] web: date filter options unselected after facet deletion
Select the option 'This Month' of a date filter
in the filter menu and then remove the facet created
correctly toggles the filter from the query but the
option is still shown as selected. This commit fixes
that situation.

closes odoo/odoo#35340

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-31 12:35:48 +00:00
Nans Lefebvre 47587de19b [FIX] payment_authorize: save payment token from form validated transaction
https://docs.python.org/3/library/stdtypes.html#truth
By default, an object is considered true unless
its class defines either a __bool__() method that returns False
or a __len__() method that returns zero

Since etree elements are iterator, they define a len function.
However it turns out that customerProfileId has always no children.
So bool(find(x)) is always False; the intended meaning was find(x) is None.

opw 1999427

closes odoo/odoo#34922

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>

closes odoo/odoo#35246

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-07-29 08:10:42 +00:00
Christophe Simonis 5f419d4ad3 [MERGE] forward port branch 11.0 up to f2f24381f2 2019-07-25 16:12:08 +02:00
Stefan Andersen 6613611039 [CLA] signature for stfnndrsn
closes odoo/odoo#35156

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 12:00:09 +00:00
Christophe Simonis f2f24381f2 [MERGE] forward port branch saas-15 up to d649cab7b9 2019-07-25 11:43:19 +02:00
Christophe Simonis d649cab7b9 [MERGE] forward port branch saas-14 up to 39de3797f8 2019-07-25 11:42:01 +02:00
Christophe Simonis 39de3797f8 [MERGE] forward port branch 10.0 up to cb3bf5509f 2019-07-25 11:41:33 +02:00
Julien Castiaux 6d9dabd5d9 [FIX] web: hide dashboard tooltip on page change
Go to CRM/Sales/Team Pileline. Place your cursor on the chart, a tooltip
appears, move your cusror away, the tooltip disappear. Now clic anywhere
on the interface so the page change (i.e. on "x Open Opportunities") and
quickly while the page loads place your cursor on the tooltip, it
appears but when the page change it doesn't disappear.

The problem here is that the graph element is removed from the DOM which
prevent the correct handling of the `mousehover` event used internally
by nv.d3 to show/hide the related tooltip.

The solution is to manually hide the tooltip when the graph element is
removed from the DOM.

opw-2042286

closes odoo/odoo#35172

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-07-25 09:14:45 +00:00
David Dufresne 6e759184d6 [FIX] hr_timesheet: missing group to settings
The menu Timesheet / Configuration / Settings should only be displayed to the group Administration / Settings.
Without admin access, an access error is raised when clicking on the menu item.
The equivalent menu item in other apps is restricted to Administration / Settings.

closes odoo/odoo#35388

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-08-02 08:02:29 +00:00
David Dufresne 921fab992d [FIX] google_drive: do not reset refresh_token
When setting the authorization code, a refresh token is generated in
the background and stored in a system parameter.

However, when saving the general settings (res.config.settings)
without changing the authorization code, the refresh token is deleted.

The refresh token should only be deleted if the authorization was
removed.

This was not the case as the set_param is always called and a value is
only computed when the authorization code has changed. The current
value was never retrieved.

Set a ir.config_parameter only when it a value has changed.

closes odoo/odoo#35028

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-08-01 14:11:54 +00:00
Tatiana Deribina e08f706b11 [FIX] mail: translate message of copied object
When duplicating a record, the language is set to None in the context
when copying a record

new = self.with_context(lang=None).create(vals)
self.with_context(from_copy_translation=True).copy_translations(new, excluded=default or ())

In mail.thread, the usecase of no language in the context was considered

if 'lang' not in self._context:
track_threads = threads.with_context(lang=self.env.user.lang)

but not the case of a language explicitly set to None

This means that, when duplicating a record, the tracked fields mesages
were untranslated.

Fixes odoo/odoo#35213
Closes odoo/odoo#35331

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-01 12:48:22 +00:00
Tatiana Deribina 659aa432aa [CLA] signature for Tatiana Deribina 2019-08-01 12:48:22 +00:00
Romain Derie cb3bf5509f [FIX] web_editor, website: avoid returning children of inactive view
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `customize_template_get()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.

Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived

Test writen in 12.0 with #35154

closes odoo/odoo#35155

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 15:19:26 +00:00
Christophe Simonis e4a4b5a8f0 [MERGE] forward port branch 11.0 up to 0375c0174d 2019-07-24 16:04:59 +02:00
Christophe Simonis 0375c0174d [MERGE] forward port branch saas-15 up to fc80a9dae3 2019-07-24 15:06:16 +02:00
Christophe Simonis fc80a9dae3 [MERGE] forward port branch saas-14 up to 36fdb2ff49 2019-07-24 14:01:48 +02:00
Jairo Llopis 21ede5365a [FIX] website: Delete redirections if website is deleted
Before this patch, if a website is deleted, its redirections will stay, affecting other websites.

Now, website-specific redirections will disappear along with their corresponding website.

closes odoo/odoo#35130

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 10:16:43 +00:00
Romain Derie 36fdb2ff49 [FIX] website_sale: restore possibility to remove promo code pricelist
Since 5c9cea4ee7, it was not possible to remove an applied promo code
pricelist by adding an empty promo code on checkout (eg removing the one shown
in the promo code input).

Indeed, when sending an empty promo code, the `search()` done in the controller
would not find any pricelist as promo would be en empty string. For the rest,
check code on mentionned commit.

See `sale_get_order()` method docstring about `code` param: "If empty, it's a
special case to reset the pricelist with the first available else the default.".

Fixes #34633
2019-07-24 11:31:57 +02:00
Nicolas Lempereur 11fb681d2b [FIX] point_of_sale: list in Sale Details wizard
On mobile devices, by default Odoo will uses a kanban view instead of a
list view if avaiable.

In the case of "Point of Sale > Reporting > Sale Details", we can select
the list of point of sale configs. It works fine on desktop, but on
mobile we had the kanban view that does not allow to remove selected
configs (and there is "New Session", "Resume" and so on buttons that
make little to no sense).

With this changeset we force in the case usage of the list view.

opw-2040954
closes #35104

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-07-23 13:05:04 +00:00
Olivier Colson 1b1175556b [FIX] l10n_in: reintroduce tax tag removed by mistake at https://github.com/odoo/odoo/commit/451fd6cc90aaa14816376a0285334678df9ce484#commitcomment-34353283
closes odoo/odoo#35102

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-07-23 12:24:38 +00:00