Commit Graph
124670 Commits
Author SHA1 Message Date
Jorge Pinna Puissant cb3c2e64c3 [FIX] partner_autocomplete, web: autocomplete error when suggested company has a country
- Change the company's country to Finland;
- Go to Contacts and click on Create;
- Tick the Company box above the Name field;
- Start typing into the Name field;
- Click on a company with a VAT number under its name.

Before this commit, a Traceback appears. This occurs because the
response of the request with the suggested company has the fields
'company_name' and 'company_code' and these fields are not in
res_partner.

Now, the suggested company is parsed to correctly field the country
field.

opw-2049636

closes odoo/odoo#35631

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-12 08:39:07 +00:00
Goffin Simon a53ca4f949 [FIX] sale_timesheet: Sales user not allowed to create invoice linked to timesheets
Steps to reproduce:
- Create a service product P with invoicing policy = Timesheets on tasks,
Service Tracking = Create a task in a new project and Re-Invoice Policy = No.
- Create a SO with P and confirm it
- Go to the task created for the SO and assign an employee on it.
- Valide the related analytic line in the timesheet module
- Create a user U with the following rights: Sales: 'User: all documents',
Project: 'Manager' and no right in Employee.
- Log as U and try to invoice the SO

Bug:

An access rights error was raised

opw:2044659

closes odoo/odoo#35656

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-12 13:50:43 +00:00
Nicolas Martinelli 392f6f2b2b [FIX] purchase: default user_id on bill
- Create a PO, change the Purchase Representative (`user_id`)
- Create the corresponding vendor bill

The `user_id` of the PO is not transferred to the invoice.

There is no reason to not keep the value.

opw-2046963

closes odoo/odoo#35611

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-09 14:31:18 +00:00
Igor Ishchenko 829adf7234 [IMP] base_iban: add support of IBAN code for Ukraine
closes odoo/odoo#35643

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-12 10:27:38 +00:00
Igor Ishchenko ed106f5dcc [CLA] Signature for igoris 2019-08-12 10:22:32 +00:00
Christophe Simonis 0a0b4829d2 [MERGE] forward port branch saas-11.3 up to 76a52bdbfb 2019-08-12 15:59:04 +02:00
Christophe Simonis 76a52bdbfb [MERGE] forward port branch 11.0 up to b59369d1e6 2019-08-12 15:00:28 +02:00
Reinaldo Ramos 0d4feadef8 [ADD] base: Add Angolan language
Add Angolan code in order to use Angolan specific translations in Odoo.
The main terms are the same but the technical terms are different

Closes odoo/odoo#35592

closes odoo/odoo#35600

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-12 07:24:37 +00:00
Reinaldo Ramos e301d4de2b [CLA] Reinaldo Ramos signs personal CLA 2019-08-12 07:24:22 +00:00
Odoo Translation Bot b59369d1e6 [I18N] Update translation terms from Transifex 2019-08-11 03:07:39 +02:00
qsm-odoo f7e83b69c6 [FIX] website_event: clean local events snippet before save
The local events snippets is an empty HTMLElement which is filled by
JavaScript on page loading. Before this commit, the filled content was
saved in database. This does not create a real problem as the content
is reloaded as soon as the page loads but you can see old events
flickering before the new events are actually loaded.

Now the snippet is cleaned before saving. This also allows to add
default content with a custo so that it is shown during the events
loading (as we are currently doing on odoo.com...).

closes odoo/odoo#35597

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 11:34:21 +00:00
Christophe Simonis 7321c8e260 [MERGE] forward port branch 11.0 up to dff2e242a5 2019-08-08 15:00:43 +02:00
Nicolas Martinelli dff2e242a5 [FIX] document: PDF indexing
Backport from 12.0, commit : 1b753b0d53
note: there was also report of PDF content blocking that when indexed
blocked an instance worker indefinitely

Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.

opw-2044679

closes odoo/odoo#35310

closes odoo/odoo#35525

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-08-07 11:30:51 +00:00
Alexandre Kühn 964efa3026 [FIX] mail: keep notification on receiving new messages from document
Revision on https://github.com/odoo/odoo/commit/17bb0ca443f54bc231b03794e776bbc6992ffdfa

closes odoo/odoo#35497

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-08-06 13:06:42 +00:00
Goffin Simon f93fcaffb5 [FIX] stock_dropshipping: Updating dropship product
Steps to reproduce the bug:
- Install stock_dropshipping module and enable Routes on SO lines
- Create a storable product P with a supplier S
- Create a SO with P and set this line with the route dropship
- Confirm the SO ( a PO has been created to S with P)
- Change P on the SO with an other product

Bug:

The product P stayed on the PO.
So a product linked to a PO line cannot be changed on a SO.

Do not forward-port in 12.0 and upper

opw:2040249

closes odoo/odoo#35454

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-06 08:23:44 +00:00
Lucas Perais (lpe) d91b1e5bd5 [FIX] account: payment cancel resets name
Make a transfer payment from bank to cash
validate, check the journal entries
You see that there are two moves, each with the name
given by their journal's sequence (one in bank, one in cash)

Now, unreconcile, and cancel the payment
set it to draft, re-confirm it

Before this commit, the entries created had the same name which was
the name of the previous journal entry
This was because, at cancel time, the move_name of the payment was not reset

After this commit, the move name is reset on cancel, and both
journal entries have a new sequence based name when
confirming the payment the second time

OPW 2046412

closes odoo/odoo#35478

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-06 08:01:29 +00:00
Christophe Simonis 97d81f1220 [MERGE] forward port branch 11.0 up to b8be821058 2019-08-05 17:12:30 +02:00
Christophe Simonis b8be821058 [MERGE] forward port branch saas-15 up to 6668f69822 2019-08-05 16:15:38 +02:00
Christophe Simonis 6668f69822 [MERGE] forward port branch saas-14 up to 14547f847c 2019-08-05 14:58:14 +02:00
Christophe Simonis 14547f847c [MERGE] forward port branch 10.0 up to af3f6e596d 2019-08-05 14:50:37 +02:00
Christophe Simonis 94aa43722e [FIX] test_mail: bump expected query count
324268a976 has the side effect of
generating an extra query.
2019-08-02 14:38:06 +02:00
Christophe Simonis 4ac13f85f4 [MERGE] forward port branch 11.0 up to 593f631e5e 2019-08-02 12:41:55 +02:00
Alex Tuyls 3682232d1e [FIX] portal: zipcode field labelled as mandatory
Field zipcode is optional, while it is labelled
as mandatory.

closes odoo/odoo#35401

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-02 09:37:30 +00:00
Lucas Perais (lpe) 4e454a9537 [FIX] account: reconciliation double click on proposition
Open the reconciliation widget, with a statement line that has
some move lines to reconcile with

Put your browser in Fast 3G to slow down stuff
then click multiple times on a move line to add it to
the reconciliation chain of the statement line

Before this commit, as many lines appeared in the reconciliation
chain as many clicks were made

After this commit, one can only click once on the lines

linked to #35194

OPW 2042751

closes odoo/odoo#35417

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-02 14:52:06 +00:00
Odoo Translation Bot e5754cd936 [I18N] Update translation terms from Transifex 2019-08-04 03:08:10 +02:00
Jérôme Thériault 8a49074fcb [FIX] base: add missing attributes in RNG
Attributes are documented for the gantt view but were not available in
the RNG
https://www.odoo.com/documentation/10.0/reference/views.html#gantt
https://github.com/odoo/enterprise/blob/fe0213e70de952/web_gantt/static/src/js/gantt_renderer.js#L32

closes odoo/odoo#31001

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 12:57:23 +00:00
Günter Selbert 300618c413 [FIX] stock: add stock group on product form view
A user without stock acces rights was not able to read the fields
added by the stock module

The statbuttons display the number of items available which are
computed fields An accountant (no inventory or sale access rights),
opening the product view will trigger the recompute which will fail
(no access on stock.warehouse.orderpoint)

closes odoo/odoo#32499

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 11:48:51 +00:00
Christophe Simonis c0ffe50580 [MERGE] forward port branch saas-14 up to 841fa79c8a 2019-08-02 10:24:46 +02:00
Christophe Simonis 841fa79c8a [MERGE] forward port branch 10.0 up to a94b00e498 2019-08-02 10:18:36 +02:00
Odoo Translation Bot a94b00e498 [I18N] Update translation terms from Transifex 2019-08-01 02:41:11 +02:00
Pedro M. Baeza 593f631e5e [FIX] l10n_es: Account 526 must be payable to reconcile
You can check

https://www.plangeneralcontable.com/?tit=526-dividendo-activo-a-pagar&name=GeTia&contentId=pgc_526

for further information on the account.

This is needed for proper bank statement reconciliation and for AEAT model 123.

closes odoo/odoo#35357

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-07-31 17:29:38 +00:00
Christophe Simonis c13f73317e [MERGE] forward port branch saas-15 up to c0ffe50580 2019-08-02 11:08:51 +02: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
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