Commit Graph
101580 Commits
Author SHA1 Message Date
Jeremy Kersten 613ee31f9c [FIX] web_editor: video - allow to add video from unknown source
There are not cat... but you cannot know all the existing website in the world...
So, have faith in the user !

To do: allow to customize size or get it from iframe provided
2016-05-13 12:37:51 +02:00
Christophe Simonis 7e999ece01 [MERGE] forward port of branch saas-6 up to 19a77d9 2016-05-12 18:20:08 +02:00
Christophe Simonis 19a77d948d [MERGE] forward port of branch 8.0 up to 746cda7 2016-05-12 16:42:08 +02:00
Christophe Simonis 9e31843ded [FIX] account_asset: correct dependencies of amount_residual field
Also use a `set()` to avoid processing assets multiple times when
creating moves from lines
2016-05-12 16:10:35 +02:00
Nicolas Lempereur 38e35cc442 [FIX] web_editor: scroll and editing menu modal
The class modal-open on body tag allow to scroll on the modal content
which is useful if the content is taller than the window viewport.

When closing the modal, this class is removed but there may be another
modal open on which we will not be able to scroll to view
buttons/content if too big.

This commit check if a modal is still opened after closing an editor
modal and in the affirmative add back the modal-open class.

opw-674475

note : was already present in 8.0 with ec47493, it is also present for
web.Dialog (but the modal of the editor do not inherit from web.Dialog)
2016-05-12 15:56:14 +02:00
Goffin Simon 746cda7f89 [FIX] website: URL of website_published is wrong when using next/previous
Steps to reproduce:

-go to runbot 8.0 and connect
-go into human ressources/job positions
-pass into list view and click on the first item
-click on the url to open this record into the website (website_published)
-go back (back into the browser)
-you're now into the form view again and then next step is to click on the button
"next" to access the following record
-click on the url of website_published

Before the fix:

wrong record, this is the previous one that is into the href

After the fix:

correct record with the correct id into the href

Closes #11800
opw:675832
2016-05-12 13:31:19 +02:00
Nicolas Lempereur f41bcda03b [IMP] account: invoice analysis pivot quantities
In the report "Invoice Analysis", the view under the report is grouping
lines by invoice and also by product on this invoice.

Thus, quantities in the pivot view are not the real quantity of invoice
lines, but of invoice lines with different products.

eg:

invoice a:
- line 1: product X
- line 2: product Y
- line 3: product X

in the report there would appear to only be 2 invoice line, whilst there
is in realy three (this information is accessible via "# of Lines").

closes #11954
opw-676651
2016-05-12 13:11:47 +02:00
Goffin Simon 7061acd2c1 [FIX] purchase: fiscal position from onchange_partner_id
Used case:

-Configure admin as multi-company user
-Create 2 fiscal positions (one for company "Odoo BE" and one for company "Odoo US")
-Set admin on company "Odoo BE"
-On supplier (Asustek) configure fiscal position Odoo BE
-Set admin on company "Odoo US"
-On supplier (Asustek) configure fiscal position Odoo US
-Configure a product (Laptop E5023) with:
   *route "Buy"
   *supplier (Asustek) without company
   *reordering rules (min qty: 20, max qty: 40)
-Set admin on company "Odoo BE"
-Run scheduler via the cron

Behavior before the fix:

-Fiscal position on the created PO is the fiscal position for "Odoo BE" (and PO is for the company "Odoo US")

Behavior after the fix:

-Fiscal position on the create PO is the fiscal position for "Odoo US".

Closes #11537

opw:673288
2016-05-12 13:05:52 +02:00
Christophe Simonis 2f374c4cba [MERGE] forward port of branch 8.0 up to 3a32021 2016-05-12 12:38:02 +02:00
Nicolas Lempereur 53f86de70d [FIX] payment_authorize: use state code instead of state name
The state given to authorize requests should be the state code and not
the state name.

source:
https://support.authorize.net/authkb/index?page=content&id=A1454&actp=RSS

opw-675634
2016-05-12 11:52:10 +02:00
Nicolas Seinlet 3a32021122 [IMP] models: mark records as recomputed as soon as they are
When recomputing stored function fields, the `write` may trigger a
cache invalidation which lead to a recompute of all the recordset
values, even the ones already saved in database.
2016-05-12 11:44:57 +02:00
Nicolas Seinlet f207ef5fae [IMP] account: improve reconciliation speed
- Only invalidate cache for fields and records we modify
 - Rewrite query to be more efficient
 - Avoid o2m commands to be more efficient; write directly on reverse m2o
2016-05-12 11:41:13 +02:00
Nicolas Seinlet 6f29bfc181 [FIX] mail: remove unneeded call to refresh()
With new api, this call is not wanted anymore. The cache is cleared
automatically, no need to clear the whole cache; that's a little bit
overkill and reduce performances.
2016-05-12 11:35:46 +02:00
pja-odoo b0f02e31b2 [FIX] product: respect sequence when loading pricelist rules
Fixes #11987
Close #11988
opw-676422
2016-05-12 10:43:25 +02:00
qdp-odoo 54f5c14994 [FIX] account: multi-currency reconciliation use case as defined in opw 640248. Since the reconciliation changed, the bugfix made for saas-6 isn't valid anymore and was actually, the root cause of the same bug appearing in v9. 2016-05-12 10:35:52 +02:00
Nicolas Martinelli 49ea75973d [FIX] purchase: date planned
When a PO is copied, the date planned of the order lines should be
recomputed based on the order date.

opw-675480
2016-05-12 09:48:19 +02:00
Nicolas Martinelli 529481991a [FIX] purchase: date planned
When a PO is copied, the date planned of the order lines should be
recomputed based on the order date.

opw-675480
2016-05-12 09:25:58 +02:00
Goffin Simon 1876279f2f [FIX] stock: Reversing scrapped moves
When reversing stock moves by clicking on "Reverse" in stock.picking
form view, only the stock moves not scrapped must be reversed.

opw:672236
2016-05-12 09:22:08 +02:00
Nicolas Martinelli d8f8d345b7 [FIX] account: print Trial Balance
This applies commits 313bc91cf5 and
2ad4bd4846 to Trial Balance report.

opw-676061
2016-05-11 18:42:34 +02:00
Martin Trigaux 97b79a1985 [FIX] sale: exact matching on origin
Avoid that an invoice for 'SO042' matches with the invoices of 'SO04'.
The use of the like is required as it may contains more than one reference to an
invoice.

opw-676921
2016-05-11 16:40:40 +02:00
Joren Van Onder e9b1254a5c [FIX] point_of_sale: use client validation date instead of creation date
9f541d29bf made it so that date_order on
pos.order records is set using the creation_date of the clientside Order
record to avoid weird date_order values when syncing to the server is
not done immediately.

The downside of this approach is that creation_date is set during Order
creation on the client. A user that has an open POS will also have an
open order. So if it takes one hour before the first order can be made
then the date_order will reflect this.

To avoid this we will instead use a validation date, which will be set
when the user clicks on the green 'Validate' button.

Because this is a stable release we won't change the name of the key in
the JSON data that gets sent to the server. This means that from the
server point of view nothing changes.

Fixes #11933
2016-05-11 14:11:26 +02:00
Goffin Simon 8ad0c0f3ab [FIX] account: base field in account.invoice.tax
The field base is obligatory according to a european law.
This field existed in saas-6.

opw:674713
2016-05-11 13:54:39 +02:00
Nicolas Martinelli 0a5b943d19 [FIX] account: sort taxes before computation
Taxes should be sorted before computation, otherwise if some taxes
affect subsequent taxes, the computation will be wrong.

opw-676119
2016-05-11 11:54:27 +02:00
Martin Trigaux e93cf3f3dd [ADD] tools: Burmese language 2016-05-11 11:42:02 +02:00
Andreas Stauder 9b70650adc [ADD] tools: Swiss German language
Closes #4722
2016-05-11 11:41:32 +02:00
Thomas Groutars 0e4ad2417d [FIX] mail: missing translation due to typo
Closes #11929
opw-676854
2016-05-11 11:28:27 +02:00
Goffin Simon 17c217ac4b [FIX] account_asset: Depreciation Expense Account and Depreciation Asset Account
"Depreciation Account" must be renamed in "Depreciation Expense Account"
Reason: This is the account that will be shown in the Profit and Loss, the original
label "Depreciation Account" is confusing because it could mean a depreciation asset
account.

"Asset Account" must be renamed in "Depreciation Asset Account"
Reason: This makes it clear that this is an asset account that will receive
depreciation entries, without this wording it could mean that we are simply
informing the Asset module which account is the asset account, but that depreciation
entries go elsewhere.

opw:672852
2016-05-11 11:20:00 +02:00
Nicolas Martinelli fe413bc8be [FIX] purchase: taxes from PO
If a user removes the taxes on a PO line, the product taxes will be
added back when the invoice is created.

opw-676858
2016-05-11 11:10:44 +02:00
Joren Van Onder c162e3489f [IMP] point_of_sale: verbose logging when dealing with 'rescue' sessions
When dealing with issues related to 'rescue' sessions we are very
limited in what we can do because the actual orders sent to the backend
exist only in localStorage in the browser on the device of the
user. Because of this it is important that we log some data about the
orders we receive in the backend to have an idea of what's going on.

opw-676497
2016-05-11 10:47:47 +02:00
qdp-odoo e6be42b168 [FIX] account: endless loop in exchange rate entry creation on full reconciliation fixed. ticket 676467 2016-05-11 10:43:25 +02:00
Nicolas Martinelli 2ad4bd4846 [FIX] account: print multiple GL
When several accounts are selected to print their GL, the GL of only one
is printed. This is due to two issues:
- 'active_id' is retrieved instead of 'active_ids'
- the method `get_action` is called with the wrong records. `self`
  refers to the wizard, not to the accounts selected.

opw-676061
2016-05-11 10:11:24 +02:00
Goffin Simon 47208550a2 [FIX] account: periods in general ledger report
When "Filter by Periods" is choosen in the wizard, the right periods
must be set in ctx to filter the account moves according to the right periods

opw:674593
2016-05-11 09:44:27 +02:00
Olivier Dony ac8b7e90b5 [FIX] http: clear environment/caches on transaction rollback
Backport of 8423a0df34

Clear the cache/environment in addition to rolling back
the cursor, in order to retry the transaction with fresh
data, not partially stale data.
2016-05-11 01:01:54 +02:00
Denis Ledoux a0366b3a66 [FIX] google_calendar: do not copy user Google info
If a user syncs his calendar with Google,
and a second user is created in the database by copying this first
user, the Google information of the first user was copied
(The Google account to sync, the token to use, the last
syncrhonization date, ...), which is obviously wrong.

On calendar syncrhonization, which can be done
manually or automatically with the according cron, all
events of the first user were created a second time,
as a second user synchronized the same Google Calendar.

opw-674141
2016-05-10 16:09:28 +02:00
Nicolas Martinelli 34f09a0e69 [FIX] base: no-break space in qweb
A non-breaking space is used between the amount and the currency.
However, if a space is used as a separator, there is a possibility that
the amount will be split into several lines.

opw-674535
2016-05-10 16:05:27 +02:00
Nicolas Martinelli 9348416867 [FIX] account payment difference sign
When a payment is registered on an invoice, the payment difference must
be considered differently if we receive the payment or pay a bill. This
is necessary at the creation of the 'Counterpart' entry. For example,
an invoice of 100 is considered as paid with a payment of 90. The
difference of 10 should be booked as a debit in case of a customer
invoice, but it should be booked as a credit in case of a vendor bill.

opw-675641
2016-05-10 15:32:42 +02:00
Denis Ledoux 77cb5f0ee0 [FIX] calendar: edition of events duration
In event not during all day, it looks like
`start_date` could be defined, but `stop_date` not.

Despite the fact this is not such a normal state, this should
not prevent the save of the event with the
`_check_closing_date` constraint, checking that the ending
date is after the starting date
(in the case of an event not during the whole day,
this is ensured with the `start_datetime` and the
`stop_datetime`

opw-676245
2016-05-10 14:44:02 +02:00
Joren Van Onder 28a9336ac8 [FIX] barcodes: also allow barcodes triggering buttons in dropdowns
On smaller screens some buttons will be hidden. An example of this is
the 'Validate' button in the stock.picking form view. It is not :visible
but it should still be possible to trigger through scanning a
'O-BTN.validate' barcode.

opw-676741
2016-05-10 12:59:37 +02:00
Martin Trigaux 59982a04a4 [FIX] tools: keep comment in CSV export
The comments field was ignored (because reasons) when exporting terms in CSV.
This was an issue when using the wizard 'Synchronize Terms' as it first export
the terms of every module in CSV.

opw-673853
2016-05-10 12:46:20 +02:00
Nicolas Martinelli 50b94ef079 [FIX] web: search input of date
When the user searches for date (or a datetime) in the search bar, the
suggested date can become completely wrong. For example, in the French
localization where the date format is DD/MM/YYYY, the system will search
for the date MM/DD/YYYY. This is even worse when the date is not fully
written: DD/MM could be converted to MM/DD/0000, which doesn't make any
sense. This is related to the moment issue
https://github.com/moment/moment/issues/1407.

The fix is to make sure that the input date has a correct format thanks
to `parse_value`. The latter converts the date into a fixed format.

Fixes #11876
opw-676604
2016-05-10 11:19:22 +02:00
Goffin Simon c140f9f542 [FIX] account_asset: deferred_revenue_category_id and asset_category_id
When creating an customer invoice with a product linked to a deferred revenue
category, the account used in the invoice line must be the account_asset_id.

When creating an vendor bill with a product linked to an asset
category, the account used in the invoice line must be the account_depreciation_id.

Inspired from 0287c1e1b3

opw:677098
2016-05-10 10:03:33 +02:00
Goffin Simon 4edf750b95 [FIX] account, account_asset, purchase, sale: deferred revenue type/ asset type
When creating an invoice from a SO or PO with a line containing a product with a
deferred revenue type or an asset type, this information is not copied in the
related invoice line.

Inspired from 564fda4
opw:677098
2016-05-10 10:00:57 +02:00
Goffin Simon a775f437c8 [FIX] hr_holidays: date_from field
Wrong field date_from:month in model hr.holidays

opw:676837
2016-05-10 09:35:36 +02:00
Denis Ledoux 3954affc30 [FIX] account_anglo_saxon: default account value
The default account value set for purchases invoices
lines for product of type Service was wrong: It used
the stock account, which is wrong as a Service
as no stock. Instead, it should left the product
expense account, as usual.

opw-676110
2016-05-09 17:39:12 +02:00
Martin Trigaux 88749790d1 [FIX] sale: outdated .pot file
Was having content of website_quote
2016-05-09 12:36:39 +02:00
Raphael Collet 5676d8121d [FIX] fields: invalidate x2many fields with a domain
Invalidate the cache of a x2many field when any of the fields appearing in its
domain is modified.  Use the invalidation triggers mechanism for that purpose.
2016-05-09 12:10:23 +02:00
Damien Bouvy 3ce23eb464 [FIX] sale: uom conversion for invoiced quantities
When invoicing products from a SO, you may decide to change the uom
of the invoice (if you invoiced only  a fraction of the product, for
example). In that case, conversion is necessary to ensure that the
"invoiced quantity" field on the SO line is correct.
2016-05-09 12:01:39 +02:00
Denis Ledoux 7923999f12 [FIX] google_calendar: user invited to one recurring event occurence only
When a Google user was invited to one occurrence of a recurring event,
but not to the recurring event itself (and the other occurrences, therefore),
and the user owner of the recurring event did not sync his calendar in Odoo,
the event occurrence could not be synced in Odoo, because it attempted
to attach it to the parent/main recurring event, which was not present
in Odoo.

In such a case, Odoo now syncs the event occurrence as a simple classic
event. In addition, if the owner of the event sync his calendar with Odoo
afterwards, or if the user is invited later to the main/parent recurring event
and then sync again his calendar,
it then attach the event occurrence that was previously
synced to this main event, to avoid events duplication.

opw-676535
2016-05-09 11:39:38 +02:00
Nicolas Lempereur dd714ace55 [IMP] web: multi-click on save on view form (no fp)
When clicking on save several time when editing a view form it can be
saved several times which can be an issue for one to many.

The normal happenstance when saving should be as follow:

-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

But when clicking several time, it could become:

-> save (click)
-> wait write result
-> received write result
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

This commit only reinstate the saving feature once the form is reloaded.

closes #11926
opw-671793

note: no need to forward-port
2016-05-09 10:54:16 +02:00
Nicolas Martinelli 313bc91cf5 [FIX] account: account selection
When a user prints the GL of a given account, the GL of all accounts is
printed. On a production environment, this can generate thousands of
pages (and ultimately, a crash).

opw-676061
2016-05-09 10:41:20 +02:00