Commit Graph
117324 Commits
Author SHA1 Message Date
Sebastien LANGE d5a540f3ba [CLA] Subteno IT 2018-11-14 16:37:23 +00:00
Sebastien LANGE 0a6a1c149d [FIX] stock: readonly on show details operations
commit c6b0d36622 introduced a wrong
domain. The readonly should be added if the show_operations is false
OR state is done AND is_locked is true.

close #28595
2018-11-13 09:00:42 +00:00
Lucas Perais (lpe) c70bdd0e4e [FIX] account: do not check for company logo when printing reports
Have a company that do not have a logo.

Try to print a "PDF report" from the accounting module

Before this commit, the simple company form popped up
with the purpose of force setting a company logo

After this commit, we assume it is not necessary to have a company logo on the reports

Note, because of 733ce266ef, we cannot do a save and print

OPW 1904764

closes odoo/odoo#28617
2018-11-13 11:15:24 +00:00
Sanjay Jamod 8f99013d01 [FIX] website: method should be called with action not with self
to avoid 'Expected singleton error'

OPW: 1909205

closes odoo/odoo#28648
2018-11-14 06:32:40 +00:00
lul-odoo 21976ca838 [FIX] base: Fix rng for 'templates' tag in calendar view
The following commit https://github.com/odoo/odoo/commit/76e6a0e3560db8257ab0d183463a894ace1e3a7e
renamed in the js calendar view file the template tag from 'template' to 'templates' but forgot
to rename it in the rng file. Since that commit templates in calendar views are not working.
This commit fixes this issue.

closes odoo/odoo#28601
2018-11-13 14:10:36 +00:00
Lucas Perais (lpe) 526bfca3af [FIX] base_address_city: correct view_get with address fields
Have a partner with children exceeding the limit of the kanban.
Edit,
Add a contact > save and quit
Save the partner

Before this commit, there was a traceback, because a check on parent_id was done to compute
the modifier readonly of the city fields in subviews

However, python onchange gets rid of parent_id because child_ids and parent_id are two faces of the same coin
And if that check were not done, we would end up in an infinite recursion

After this commit, there is no traceback, as we stop checking on parent_id in the case of paged subviews
(list and kanban) because we literally know there is one

OPW 1886320

closes odoo/odoo#27114
2018-11-14 08:33:23 +00:00
Goffin Simon 6123cc912c [FIX]purchase_requisition: Creating requistions from OP
Steps to reproduce the bug:

- Create a product : stockable + purchase : propose a call for tenders + reordering rule (qty min 0, max 0, multiple 1)
- Create a SO for that product.
- Run the scheduler once : a requistion is generated (Purchases > Purchase > Purchase Agreements), which is normal behavior
- Run the scheduler a second time

Bug:

A new requistion was generated for the same product, by the same reordering rule

opw:1892950

closes odoo/odoo#28611
2018-11-13 15:08:20 +00:00
Nicolas Martinelli da2d415b79 [FIX] sale: date on Sales Analysis
Use a consistent date between both views of the Sales Analysis report,
otherwise switching from one view to another shows a different
information.

opw-1903091

closes odoo/odoo#28625
2018-11-13 12:56:57 +00:00
Julien (juc) Castiaux 1767f2186d [FIX] delivery: useless conversion to company currency when no company
After removing the company from a delivery method, every checkout done
in website fails due to odoo trying to convert the price to the
company currency.

This PR fix the bug by doing the conversion only when there is a
company set on the delivery method.

opw-1905466

closes odoo/odoo#28626
2018-11-13 12:57:52 +00:00
Christophe Simonis 4a26aa22e5 [FIX] stock: duplicated xmlid
Half-Cherry-Pick of e9fc0e2b5a

closes odoo/odoo#28629
2018-11-13 13:12:22 +00:00
Duc Dao 46b296dc4f [FIX] Update required version of num2words to have more languages
closes odoo/odoo#25982
2018-11-13 02:22:39 +00:00
Lucas Perais (lpe) 3a0f9da0eb [FIX] web: load SubViews without previous' view _view_ref context keys
On a form view (of model A), define a many2one (model B) with a [form|tree]_view_ref context key
In that view, have a x2m field (model C) with a different [form|tree]_view_ref context key

Before this commit, the second load_views (i.e. on the model C) crashed because
the wrong context key was sent to the server, which returned the view to which the _view_ref points
i.e. the view of the model B

After this commit, we clean the context of subviews loading, because those keys are only useful for the python
and one shot. Hence, there is no crash

OPW 1903780

closes odoo/odoo#28260
2018-11-13 09:02:24 +00:00
Nicolas Martinelli 1a0f5a50af [FIX] account: domain on reconciliation model
The `context.company_ids` variable seems mostly empty in the case of the
Manual Reconciliation widget. Therefore, we fetch the current company of
the user in the session.

Complement of e5c8071484

Fixes #28270
opw-1904475

closes odoo/odoo#28541
2018-11-09 16:14:33 +00:00
Lucas Perais (lpe) c8133d7133 [FIX] calendar: activity deadline from event date
Be in the timezone Australia/Brisbane

On an object, create a Meeting activity

Create the calendar event and set a start date "tomorrow" at 7:00am

Now go back to the object to see the activity

Before this commit, the activity appeared as due "today"

After this commit, it is due "tomorrow"

OPW 1891110

closes odoo/odoo#28576
2018-11-12 12:48:07 +00:00
Nicolas Lempereur bba78c7fe1 [FIX] web_editor: can't unquote on firefox
Firefox when asked to block format (formatting over a block with
blockquote, h1, ...) has a special case for blockquote (it is documented
in https://developer.mozilla.org/docs/Web/API/Document/execCommand at
formatBlock command) and will wrap any element instead of replacing
existing block formatting.

Thus the code not expecting it was not able to remove a blockquote in
firefox once introduced.

opw-1903735
closes #28587
2018-11-12 14:48:20 +00:00
Nicolas Lempereur e0b906d74d [FIX] web_editor: firefox ctrl+a and un/format
When we for example do ctrl+a in firefox, the selection is over the
container and not the content.

This is an issue when we apply a format, since the container could be
removed.

  eg:

  we have selection over `<pre>hello</pre>`, on firefox the selected
  node is `pre`, on chromium it is `TextNode "hello"`.
  if we remove the style, `pre` is deleted so firefox selection is
  broken, whilst chrome has no issue since "hello" still exist.

There was also an issue when the selection was over the blockquote,
there was no error but the style could not be removed.

opw-1903738
opw-1903735
closes #28369
2018-11-12 11:22:43 +00:00
Odoo Translation Bot 8d77288a8c [I18N] Update translation terms from Transifex 2018-11-11 03:16:11 +01:00
Sainu Abideen 79e8378518 [CLA] update cybrosys signature
Was signed with the wrong name

closes odoo/odoo#28496
2018-11-09 14:57:37 +00:00
Nicolas Lempereur 5f066552c3 [FIX] website_form: custom file -> mail attachments
There was a code that on:

- a form that sent a mail
- with a custom file field

would set the file as attachments, but the code was dead because of a
typo in `if` statement order.

opw-1906883
closes #28525
2018-11-09 11:09:32 +00:00
Nicolas Lempereur 726bc301cf [FIX] web_editor: don't prepend http to ${..} link
In mail template a link with reference such as:

  ${object.user_id.signup_url}

are often used.

These are template directives that are replaced when the mail is saved,
so when editing in the editor and they are prefixed by "http://" this
breaks the link which is not wanted.

Now link beginning with `${` are not prefixed anymore to prevent
shooting oneself in the foot.

opw-1906695
closes #28522
2018-11-09 10:45:17 +00:00
Christophe Monniez 055e1b8324 [REM] packaging: remove useless code
PKG-INFO is generated during the setup phase and is not needed anymore.
Also this file contains outdated informations.

py2exe is not used anymore to build the windows installer.

closes odoo/odoo#28494
2018-11-08 08:50:33 +00:00
Nicolas Lempereur fc70c35195 [FIX] mail: enable composer after message sent
c5dc0b2f39 disabled send button on composer sent.

But this is only needed for chatter composer, other composers directly
send the message and are not refreshed asynchronously.

So for other composer, the send button worked one time but then was
disabled and the only way to sent was ENTER (on basic composer) or
CTRL+ENTER (on extended composer).

With this fix, disabling the button is done only for chatter composer.

11.0 backport of 12.0 #28474

issue found when checking opw-1904029
closes #28506
2018-11-08 13:19:19 +00:00
len-odoo 622eb6b747 [FIX] sale_stock: compute quantity differentiating incoming and outgoing pickings
Suppose that you have a SO that you deliver.
Then the client returns the products, getting a refund,
which creates an incoming picking.
If you do then update the product sold quantity, the quantity to deliver is
computed by summing the relevant picking.
We now discriminate incoming and outgoing picking, respectively substracting and
adding the quantities.

opw 1903559

closes odoo/odoo#28315
2018-10-31 12:23:33 +00:00
Nicolas Martinelli e5c8071484 [FIX] account: domain on reconciliation model
When loading the Reconciliation Widget, all reconciliation models are
retrieved. This is not correct: only the one matching the company and
the journal should be retrieved.

Fixes #28270
opw-1904475

closes odoo/odoo#28474
2018-11-07 13:26:30 +00:00
eco-odoo 7a117b14df [IMP] l10n_uk: rename menu item England to United Kingdom
"British Statements" was wrongly renamed to "England" in a436645ae8.

closes odoo/odoo#28458
2018-11-07 08:37:41 +00:00
Arnold Moyaux c6b0d36622 [FIX] stock: quantity done not saved on pager
On delivery order, it happens that when it contains more than 40
products and multiple pager. The quantity done are only saved on
the first pager and on the other everythings is reset to 0.
This issue is not deterministic.

The reason is because on the picking view, both stock.move and
stock.move.line are present. When the user write the quantity done
on a stock.move it exists a function inverse that write qty_done on
stock.move.line. However during an onchange, inverse function are not
trigger and every field present in the view is returned to the client.
It means that data after the onchange are inconsistent since the
quantity done write on the move is different than the quantity on the
move line. When the user save the form view, the write could be trigger
in different order. If the write on stock.move is trigger first, it will
write the qty_done with the inverse function but it will be erase by the
write on stock.move.line that is trigger after.

In order to fix it, we set the stock.move.line as readonly when they are
not needed, so they are not send to the server.

closes odoo/odoo#27903
2018-10-17 14:32:03 +00:00
Goffin Simon 69a0af9e86 [FIX] account: Impossible to make a partial credit note
Steps to reproduce the bug:

- Create a credit note for an amount of 100$
- Validate it and register a payment
- Let's pay an amount of 90$ and mark this credit note as fully paid

Bug:

An error message was raised saying: Wrong credit or debit value in accounting entry !

DO NOT FORWARD-PORT

opw:1893570

closes odoo/odoo#28433
2018-11-07 09:01:14 +00:00
Adrian Torres 392a8d8f9e [FIX] base: handle models without associated xids at uninstall
If all the planets are correctly aligned, it is possible for a model to
not have any xids associated with it, if this happens then the computed
field that calculates the records to be deleted during an uninstall
may mistakingly add records of this xid-less model to the list of
records to be deleted, even if the actual uninstallation won't remove
these records.

opw-1904139

closes odoo/odoo#28388
2018-11-06 12:27:22 +00:00
Martin Geubelle 8b9cb0565e [FIX] mail: remove mail_followers widget support claim
This widget claims to support one2many fields but it doesn't work in most cases.
This was triggering warnings when this widget was set on another field or in another
view (i.e. in Studio).

opw-1905803

closes odoo/odoo#28413
2018-11-05 15:20:54 +00:00
Nhomar Hernandez cc46bf97a4 [FIX] sale: Call the proper method in the test and not the partial one.
With this we can test the invoices properlly in other environments where
we do not depend on sale due to the fact of this incorrectly set test we
hade collateral damage in the localizationsfor example (also related to
doesn't have a new created field called correctly in invoice_open and
the method action_date_assign was not called propperly.

With this fix we do not need to make defensive programming in the
localizations in order to allow us to test it properlly.

closes odoo/odoo#27316
2018-09-30 08:09:48 +00:00
Christophe Simonis bab5ccfdd7 [MERGE] forward port branch saas-15 up to ca2b46c2d1 2018-11-05 15:52:38 +01:00
Christophe Simonis ca2b46c2d1 [MERGE] forward port branch saas-14 up to 03a35392da 2018-11-05 15:09:30 +01:00
Christophe Simonis 03a35392da [MERGE] forward port branch 10.0 up to d3b86ab930 2018-11-05 14:11:40 +01:00
Andreas Perhab d3b86ab930 [FIX] purchase_requision: fix syntax error
payment_term.id, creates a tuple wich works if payment_term.id is set
in case payment_term.id is False this creates the tuple (False,) which
is then converted by the Odoo ORM to a account.payment.term(False, )
record set, which in term may cause weird behaviour as this value does
not eval to false in cases like `if self.payment_term_id:`

Closes odoo/odoo#28397
2018-11-05 13:06:33 +01:00
Olivier Colson 714bf1b0ab [FIX] account: reconcile each account only once when reversing an entry
Before that, when reversing an account.move, if two lines of the move shared the same account, we tried reconciling them once for each line: it worked the first time but triggered an error message the second, since the lines had already been reconciled.
2018-11-05 12:29:08 +01:00
Odoo Translation Bot 79b701230d [I18N] Update translation terms from Transifex 2018-11-04 03:16:30 +01:00
Olivier Colson 053a023fc7 [FIX] account: apply correct currency rate for taxes at account move creation
Before that, taxes were only applied with the most recent currency rate, which caused problems in multi currencies, when reconciling statement lines made in the past with invoices, causing the amount currencies in the payment account.move to be wrong.

//Scenario to reproduce the issue (from customer ticket 1903497):

(for a company with USD as base currency)

1. Create a new bank journal for EUR payments

2. Create a new customer invoice for 90€

3. Create a new tax for the reconciliation model, price-included and amounting to 15%

4. Create a new reconciliation model using this tax

5. Use the currency rates from the demo data, add one that is closer to current date than the most recent one.

6. Create a new bank statement for the created EUR bank journal. Make sure that the transaction is less than the actual amount due on the invoice so that we can apply the reconciliation model. Also make sure to set a date on the transaction that lies in the past at some point when the currency rate was (significantly) different.

7. Hit the reconcile button, select the amount due from the invoice and apply the discount reconciliation model(take note of the amount on the created tax move line). Now reconcile.

What is the current behavior that you observe?

Now go back to the bank statement and check the created journal entries. You will see a difference in the amount currency values of the payment and the tax account move line. This difference should not exist.
2018-11-02 17:25:44 +01:00
Nicolas Martinelli bbeb126cf8 [FIX] sale_timesheet: UOM
Revert commits da2140b726, e65c8826ef and 06cd145a79. They
introduce an incorrect UOM.

The original issue was an `AccessError` due to the fact that the
employee chosen was not in the same company than the user. Therefore,
instead of changing the logic of the UOM selection, we make sure to
select the employee in the appropriate company first, then fall back on
any company then.

opw-1888299
2018-11-02 13:48:05 +01:00
Yoshi Tashiro 09a81894b1 [FIX] product: respect received args value instead of overriding it (#26594)
When doing a name_search, if a current search is already specified through args,
do not replace it

Closes #26594
2018-11-02 13:38:11 +01:00
Olivier Dony 717b7249d5 [FIX] server: always consume wakeup bytes from signals
Due to the implementation of PEP-475[1] in Python 3.5, revision
e98e8e9b1b used the recommended technique
of wakeup file descriptors in order to detect interruption of sleep() and
select() by signals, when running in multi-process mode (workers > 0).

The technique works well, however the initial patch never bothered to
read the byte that is written to the wakeup pipe when a signal is
processed. This does not matter when the signal is meant to shut down
the server, but it matters when the signal is SIGQUIT: it simply prints
thread dumps, and continues operating normally.
As a consequence, that byte remains in the wakeup pipe forever, causing
all the subsequent select/sleep calls to return immediately because
the wakeup fd *is* already ready. The symptom was that worker
processes would start cycling their main run loop very fast after
receiving a SIGQUIT signal, eating 100% CPU.

This patch ensures we always empty the wakeup pipe after an interruptible
call, to avoid this effect. It also refactors another occurrence of the
"empty pipe" pattern, in the PreforkServer, and incidentally uses readable
aliases for the file descriptors bound to the ends of the wakeup pipe
(wakeup_fd_r / wakeup_fd_w).

[1] https://www.python.org/dev/peps/pep-0475

closes odoo/odoo#28356
2018-11-02 11:04:35 +00:00
Yoshi Tashiro 7d2bc7d35a [FIX] website_sale: reset cart if checkout was done in another session
This commit extend commit https://github.com/odoo/odoo/commit/ef48b81ab127dd717a4a9d106edd5c51121bc8f7
When you have a cart on multiple session and confirm the card in one of them,
you could still access your cart from other session (note that you could not do
anything with it as it would be reset when adding product or changing qty).

Closes #28210
2018-11-02 11:10:52 +01:00
Romain Derie 3457d1a74b [FIX] website_sale_options: prevent other session crash after checkout
Check commit https://github.com/odoo/odoo/commit/ef48b81ab127dd717a4a9d106edd5c51121bc8f7

This commit is doing the same for website_sale_option as the optional product
is calling another route to add the product to the cart.
That route needed to be fixed too.

Closes #28209, related to #27508
2018-11-02 11:10:50 +01:00
Odoo Translation Bot e2afb0755d [I18N] Update translation terms from Transifex 2018-11-01 02:44:41 +01:00
Christophe Simonis 00829a0beb [MERGE] forward port branch saas-14 up to c552e368b3 2018-10-31 17:58:05 +01:00
Christophe Simonis c552e368b3 [MERGE] forward port branch 10.0 up to 93d69933ac 2018-10-31 17:23:32 +01:00
David Beguin f20cd3db75 [FIX] hr_attendance : kiosk mode multi scanning
- Scan a barcode for employee 1 in kiosk mode
- At greetings message, scan a barcode for employee 2

2 attendance entries are created for employee 2 instead of 1.

When scanning the barcode for employee 2, the event listener
`_onBarcodeScanned` is still active on `KioskMode`. Therefore, the RPC
call to `attendance_scan` is performed twice.

We deactivate the event listener after scanning, and reactivate on
`KioskMode` only if there is an issue. This is sufficient since the call
to `do_action` in `GreetingMessage` will create another instance of the
client action. In `GreetingMessage`, we add back the redirection to
`KioskMode`.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>

Linked to Task ID 1878251
opw-1878632
opw-1888402

closes odoo/odoo#28150
2018-10-31 14:35:27 +00:00
Goffin Simon 93d69933ac [FIX] stock: Wrong production/scrap/adjustment location used in multicompany
- When using perpetual inventory valuation, the accounts used for scrap, manufacturing,
and inventory adjustment operations are set on the corresponding locations .
- In a multicompany environment, you will have a separate chart of accounts for each company.
- Account fields on locations are not property fields.
- Therefore, in order to separate the accounting of manufacturing, scrap, and inventory
adjustment operations, you must use a location for each operation for each company.
- Set up one location for each company for scrap, production, and adjustment
locations, setting the company field on each.

Bug:
- When attempting to create a MO, inventory adjustment, or scrap order while signed
in to the second company, you will receive a permissions error on stock.location.

Fix:
- Now the right location is taken according to the company of the user.

Backport of this commit: c7526407ab

opw:1817339
2018-10-31 11:51:09 +01:00
Olivier Dony 9cc8a8d0a4 [FIX] reqs: bump up recommended requests version
In light of CVE-2018-18074, using python-requests 2.20.0 is recommended,
or any distribution-specific version that was patched.

See also https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18074
2018-10-30 18:49:35 +01:00
Martin Trigaux 214975911b [FIX] l10n_ro: fix xml syntax 2018-10-30 18:28:00 +01:00
Duc Dao f978722503 [IMP] l10n_vn: fix syntax and allow reconcilation
for accounts 3341, 3348, 141, 1388, 3388
2018-10-30 18:24:15 +01:00