Commit Graph
115505 Commits
Author SHA1 Message Date
Rémi Rahir c3d1eda017 [FIX] web,account,google_calendar: chasing breaking spaces
Before this commit, some breaking spaces were present in the js code.
Such spaces are misinterpreted and worked by luck.

This has become a problem with exported js bunldes (e.g. the
external_lib bundle in im_livechat).

This commit replaces breaking spaces by regular spaces.
2018-04-03 15:52:17 +02:00
Toufik Benjaa 55878df5ff [FIX] account_payment: Restrain access to invoice's partner
- Restrain the creation of transaction for an invoice to the invoice partner.
- Removed the callback_method argument as it was unused.
2018-04-03 14:22:10 +02:00
Wolfgang Taferner 0f9bf4b0d0 [CLA] add ap-wtioit to WT-IO-IT's CCLA
Closes #24001
2018-04-03 13:38:19 +02:00
Nicolas Lempereur eca030cc38 [FIX] account: invoice line form ok studio context
Correct account invoice line form view so studio doesn't fail on
something that doesn't seem really correct (and somehow worked thanks
to pyeval implementation or the override from another view type).

opw-1826254
opw-1830171
closes #23997
2018-04-03 13:16:21 +02:00
Goffin Simon 1039abfbdb [FIX] web: time format without seconds
Steps to reproduce the issue in 11.0 Enterprise:

- Go to the language English
- Remove from the time format the seconds
- Refresh the page
- Go to sales
- Create a sales order;

Bug:

- You get the warning message

closes #23596 closes #22027
opw:1829577
2018-04-03 09:19:34 +02:00
Odoo Translation Bot d636c6c95c [I18N] Update translation terms from Transifex 2018-04-01 04:15:11 +02:00
Nicolas Lempereur 471b7e3657 [FIX] stock: settings enable only op of active wh
The code in res config that enabled or disabled internal operation type
did not take into account that active_test is set to False inside this
type of code since c2e259d8.

Thus a picking type of an archived warehouse would possibly unexpectedly
be enabled after saving the settings.

opw-1826196
closes #23956
2018-03-30 14:36:28 +02:00
Géry Debongnie ea6e7379a3 [DOC] doc: update/add documentation on js framework
The state of the JS documentation was quite sad, not updated in a long
time.  With this commit, we rework a lot of the JS doc.  Most notably,
we add a section 'Javascript Cheatsheet' (help on some common
customization tasks) and rewrite the 'Javascript Reference' totally.

Note that the JS reference page also contains a reference on all field
widgets.

This work is just the beginning, it is probably not complete, but at
least we will have a foundation.
2018-03-30 14:11:49 +02:00
Nicolas Martinelli 694f2d4b20 [FIX] doc: report with xmlrpc
The feature was removed in commit 3425752eac.

Closes #22540
opw-1824272
2018-03-30 09:58:19 +02:00
Christophe Simonis f2c3561334 [MERGE] forward port branch saas-15 up to b7f35428f4 2018-03-29 18:42:47 +02:00
Christophe Simonis b7f35428f4 [MERGE] forward port branch saas-14 up to c1c10e2c4c 2018-03-29 17:56:29 +02:00
Christophe Simonis c1c10e2c4c [MERGE] forward port branch 10.0 up to 2b4bc45e58 2018-03-29 17:09:37 +02:00
Goffin Simon 2b4bc45e58 [FIX] sale: Wrong display of taxes in PRO-FORMA
Steps to reproduce the bug:

-Create a tax of 21% tax included but don't select the "affect base" checkbox.
-Create another tax of 5.2% (no tax include)
-Create a sale order with a line that has a unit price of 121 and both taxes.
Notice that the total amount is: 126.2 (100 base amount + 21 from 21% tax + 5.2 from 5.2 tax)
-Click on "Print the proforma invoice"

Bug:

The total amount was still 126.2 and base=100, however taxes were wrong, there were 21 for the 21% tax
and 6.29 instead of 5.2 for the 5.2 tax.

Back-port of this commit: f50a08bc3d

Forward up to saas-15

opw:1819882
2018-03-29 16:21:25 +02:00
Nicolas Martinelli 15c3cbab55 [FIX] stock_landed_costs: digits precision
- Set the number of digits of 'Product Unit of Measure' to 1
- Create a stockable product:
  UOM: Dozens
  Purchase UOM: Units
- Buy 17 Units, validate the picking
- Create a landed cost:
  Amount: 100
  Split Method: By Quantity
- Compute

The Valuation Adjustment line contains contains a line with a quantity
equal to 1.4, leading to a line of 98.60. It is impossible to validate
the landed cost because of the inconsistency.

The method `get_valuation_lines` retrieves the data from the
`stock.move` and copies the following values to the
`stock.valuation.adjustment.lines`:
- `product_qty` > `quantity`
- `weight` > `weight`
- `volume` > `volume`

Therefore, we must make sure that these fields are using the same digits
precision. We adapt the precisions accordingly.

opw-1817783
2018-03-29 15:36:55 +02:00
Goffin Simon 2f55b57b11 [FIX] sale: Tax amount is showing zero
The group of taxes were not taken into account in function _get_tax_amount_by_group.

opw:1830752
2018-03-29 15:27:03 +02:00
Goffin Simon 8a906f80b4 [FIX] stock: Inventory Adjustments Deletion
It's not allowed to delete inventory adjustement linked to validated moves.

opw:1826300
2018-03-29 15:17:18 +02:00
Pierre Masereel 7560bb7f42 [FIX] purchase: internal transfer wait operation when RFQ canceled
When you have a receipt in multiple steps and cancel the generated RFQ
the following internal move stay in waiting another operation.

We recompute its state and pass it in waiting.

OPW-1832176
2018-03-29 13:53:25 +02:00
Romain Derie 5c2b42bbf7 [FIX] website: remove ribbon on unpublished pages (new specs)
This commit reverts part of f5912cb since the spec changed afterwards.

Unpublished page will have a red toggle, which even if it is small should be
enough to draw user attention, and not a ribbon anymore.

Task-44005
2018-03-29 13:08:57 +02:00
Nicolas Martinelli 4c08b98c8a [FIX] website_sale_delivery: repr of floats
Following commit 340d70338f, we make sure the delivery price
contains the right number of decimals by sending a formatted string
instead of a float. Indeed, due to the float representation, values such
as 25.310000000000002 may occur.

opw-1831656
2018-03-29 12:14:56 +02:00
William Henrotin 285b045c64 [FIX] base: correct csv language file parsing
The commit f1e842bcd2 corrected the Khmer code language but the csv language file was left with a blank line inside. 
The csv parsing (to populate the list of available languages) failed into tools.misc.scan_languages() because of the blank line
2018-03-29 12:06:30 +02:00
Martin Trigaux 106d9a98bf [FIX] stock: rephrase the error message
Doing a translation for stable version, to rephrase in master
opw-1827181
2018-03-29 12:00:28 +02:00
Nicolas Martinelli 1dbc655676 [FIX] account: reverse pair
Commit b6d4cd5deb introduced the auto-reconciliation when reversing
an entry. However, we should make sure to only reconcile non-reconciled
entries. Such an entry can be generated from an exchange rate entry.

opw-1826024
2018-03-29 11:47:36 +02:00
Martin Trigaux a52a6b865c [FIX] calendar: set color on right partner
When doing a sudo on top, the fields are accessed with user 1 but the set is
also made with user 1.
meeting.user_id.partner_id.id is correctly computed but
meeting.partner_color_id is not set for the current user (return 0)

All events were in the same color

Introduced at b669c71aa3

opw-1829793
Closes #23923
2018-03-29 10:56:08 +02:00
Yannick Tivisse ef5301b964 [FIX] l10n_be_hr_payroll: Compute correctly the 'company_car_total_depreciated_cost'
The correct solution would be to store the total_depreciated_cost on the fleet vehicle.
But this solution is not acceptable on a stable release as it implies to update the module.
The only thing we can do here is to add the dependencies on the field 'total_depreciated_costs'
to the field 'company_car_total_depreciated_costs'.

As the field is not stored, then the field 'company_car_total_depreciated_cost'
(which is stored) is not recomputed correctly when modifying the log_contract.

This solve the following issue: Modify a recurring costs amount (depreciated)
on the fleet vehicle contract, then the final yearly cost on the related
hr.contracts are not recomputed correclty, as the field company_car_total_depreciated_cost
on the hr.contract is not recomputed on the total_depreciated_cost modification.
2018-03-29 10:24:15 +02:00
Yannick Tivisse 35d507bc6a [FIX] l10n_be_hr_payroll: Add missing dependant fields on compute methods
Task #60392
PR #23742
2018-03-29 10:24:15 +02:00
Yannick Tivisse ea5547aff4 [FIX] fleet: Display 'No Plate' in name when no place is defined 2018-03-29 10:24:15 +02:00
Yannick Tivisse a6833e1642 [IMP] hr_contract: Track some fields modifications
Purpose
=======

In contract, track fields (create a note, no need subtype. it is just for the history)
- wage
- fuel_card
- meal_voucher_amount
- representation_fees
- additional_net_amount
- retained_net_amount
- commission_on_target
- ip
- car_id
- internet
- mobile
- mobile_plus
- final_yearly_ cost
2018-03-29 10:24:15 +02:00
William Henrotin f1e842bcd2 [FIX] base: khmer language (Cambodia)
The code of khmer language was not the offical one. Installing it
produce an error in the Babel python library.

It's not possible to easily fix it by correcting the code km_KM to km_KH
because Odoo
prohibit changing language code. The solution to this is to remove the
Khmer language from the res_lang.csv file and add it to an xml data
file with the correct code. There, we can put on this record the
"noupdate" tag. This tag
will block any modification on the ir_model_data corresponding to the
xml_id=lang_km
and so avoid the error if we update the base module. Old database still
wont be able
to use khmer language (so we'll need to manually change it in database)
but new one created
after this commit will be able to use it without issue.
2018-03-29 08:47:21 +02:00
Christophe Simonis 0b330bf04c [MERGE] forward port branch 9.0 up to 97fc813a1a 2018-03-28 18:58:10 +02:00
Jeremy Kersten b747c3010a [FIX] website: website.redirect keep params during redirect
Before this commit if /foo redirect to /bar?a=1

/foo?debug=1 was redirectd to /bar?a=1

After this commit,

/foo?debug=1 is redirected to /bar?a=1&debug=1
2018-03-28 17:59:31 +02:00
Jeremy Kersten c78de22a09 [FIX] utm: set utm for website page
Before this commit, UTM was no more set for website.page.

Website.page mechanism uses the _handle_exception to check if an url match a
record in database, instead of use the method _dispatch that uses controllers.

Consequently, module UTM never set the utm into the cookies for website.page.
Now we override method '_handle_exception' that will anyway ignore to set utm
if it is a real exception and not a fallback (redirect, page, attachment, ...)
2018-03-28 17:59:30 +02:00
Jeremy Kersten 888e2c3d37 [FIX] website: fix controller / to avoid loop
Don't redirect to '' to avoid infinite redirect loop.
2018-03-28 17:59:19 +02:00
Yenthe V.G 97fc813a1a [FIX] account: fix performance issue with check_lock_date 2018-03-28 15:02:47 +02:00
ougc27 8327b67cf5 [FIX] account: fix wrong domain/default journal on account payment view.
Fixed use case:
When creating a new payment (not from invoice), the payment amount is zero and this value triggers an onchange method that set the first miscellanous journal_id as the payment journal_id and force the domain with only miscellanous journals.

This behavior was added in commit 3267e76 to be able to clear invoices by registering a 0 amount payment on it, but this has obviously only interest when registered from the invoices form view... To keep this functionality we only add a "AND" sentence to validate that the payment has invoices, if the payment has not any invoices the journal and the domain of this field will be for bank and cash.

Was task ID 1823023. Was PR #23609. Nice courtesy of Oscar Ulises Garza Córdova
2018-03-28 11:15:41 +02:00
Lucas Perais (lpe) bed33e1ca2 [FIX] web_editor: block only the form's buttons
Commit cae188514f was largely incomplete
and inaccurate in fixing the issue at hand

The aim of this commit is to deactivate the form buttons when the Html field is not completely loaded
thus preventing the temporary value of the iframe to be saved

OPW 1824545
closes #23905
2018-03-28 09:36:33 +02:00
Goffin Simon 2e3b249723 [FIX] stock_account: Wrong decorator
The function _get_anglo_saxon_price_unit using a record set and a model.
2018-03-28 09:26:55 +02:00
Nicolas Martinelli 3a318e7c40 [FIX] account: initial balance
- Create manually an account move
- Add a line with a credit != 0
- Click on "Add a line" => crash

`line_ids` does not contain the credit since it was not filled in.

opw-782980
2018-03-28 09:25:10 +02:00
Lucas Perais (lpe) 07435b1104 [FIX] web: correctly display reference field in subview
Have a form view with a O2M.
The model at the 'many' end has a reference field

Have a record of the second model display in a modal
(by clicking on a record in the o2m list)

Before this commit:
The field reference was not filled up
This was because the fields to fetch on the modal creation weren't correctly set.
Obvisouly, it also created problem when trying to change the record on the modal:
spawning tracebacks because the reference field was not present in the local datas

After this commit:
The display of the reference field is as expected both in the original form and in the modal

OPW 1829822
closes #22468
closes #23896
2018-03-28 09:18:07 +02:00
Arnold Moyaux b33d5af4a7 [FIX] stock: allow to validate a picking with 2 extra moves
Use case to reproduce:
- Create a picking containing 2 moves that have a quantity_done greater than reserved quantity
- Validate the picking with or without backorder

Traceback due to a record that do not exist anymore.

It happens due to 2 functionality that have a wrong behavior when used together:
- merge_move function that will try to merge moves with same characteristics inside a same picking.
- action_done functionality that will create an extra move if the quantity done for a move is greater
than reserved quantity. (the extra move is used in order to propagate changes)

With our usecase:
- MOVE A, reserved_qty: 10, qty_done: 20
- MOVE B, reserved_qty: 10, qty_done: 15
action_done on move A will create a new move thus we will have
- MOVE A, reserved_qty: 10, qty_done: 20
-  A bis, reserved_qty: 10, qty_done: 0
- MOVE B, reserved_qty: 10, qty_done: 15
then merge move will not only merge move A and A bis but will also merge B
which result with inconsenstencies and traceback since system will try to
process move B after A
- MOVE A,A',B reserved_qty:30, qty_done:35 (the 5 extra qty is not propagated)

This commit adds a kwarg in action_confirm that is propagated to merge_move
this kwargs is a record set taht will limit the moves that can be used for the merge
in order to merge extra move in original move

opw-1825264
2018-03-27 17:36:44 +02:00
Christophe Simonis f22c5794c4 [MERGE] forward port branch saas-15 up to a9542240fc 2018-03-27 17:17:38 +02:00
Goffin Simon 32421c4daa [FIX] account: Name of an account.payment
Steps to reproduce the bug:

- Create a bank statement with a blank name
- Reconcile any line statement with an invoice
- Review the payment that was made for this statement

Bug:

The payment had no name.

opw:182754
2018-03-27 17:14:14 +02:00
Christophe Simonis a9542240fc [MERGE] forward port branch saas-14 up to ce5b4b6512 2018-03-27 16:41:47 +02:00
Christophe Simonis ce5b4b6512 [MERGE] forward port branch 10.0 up to fc659d3f78 2018-03-27 16:10:35 +02:00
Nicolas Martinelli 905cd6d903 [FIX] account_bank_statement_import: default partner
When importing a bank statement containing an unknown bank account
number, the newly created account is automatically linked to the partner
of the current company.

This is due to the default value for `partner_id`.

Introduced in 6db235385a

opw-1816832
2018-03-27 15:06:12 +02:00
Simon Lejeune dc56bb5071 [FIX] stock: stock.move.line: _free_reservation
In a situation where `_action_done` is called on a batch of move line
when one of them is forced and there isn't enough quantity available
to reserve it, a call to `_free_reservation` is made in order to not
have move lines reserved on quantity now unavailable.

The issue is that the method looks for move line to unlink by making a
search on move line having a quantity reserved. As the `_action_done`
method defer the update of the reserved quantity at the end of the
batch, `_free_reservation` could try to find and unreserve move lines
that were juste processed, resulting in a traceback because there isn't
enough stock to unreserved (because the move line was processed and thus
moved at the next location).

We fix this issue by explicitely passing the move lines to ignore.
2018-03-27 15:04:26 +02:00
Goffin Simon fc659d3f78 [FIX] sale: Description of the product 'Downpayment' not translated
When you create a down payment invoice from an SO, the product that is used in the line is 'Down Payment'.
The description of this product, which is visible for the customer, was not translated to the language
of the customer in the SO and in the invoice. It was translated to the language of the user logged.
This fix is made to keep the same behavior for the description of an SO line and for the description
of the invoice line.

opw:1820081
2018-03-27 14:19:29 +02:00
Nicolas Martinelli 3a654ce256 [FIX] payment_authorize: ZIP code is optional
The ZIP code is an optional field, therefore we should not block the
user.
2018-03-27 12:55:01 +02:00
Nicolas Martinelli f289451ce5 [FIX] payment_authorize: raise error if missing ZIP
The ZIP code is an optional field. When saving a payment method, this
generates a traceback since `partner.zip` is `False` while the field
expects a `string`.

opw-1829829
2018-03-27 12:53:36 +02:00
Nicolas Martinelli a74745a275 [FIX] sale_timesheet: 100 % discount SO line
- Create a product A configured as:
  Invoice based on: Ordered quantities
  Service Tracking: Create a task in a new project
- Create a SO with product A and another product (price != 0)
- Set a 100 % discount on A
- Confirm the SO
- Record 2 timesheet entrieson the created task
- Generate the invoice for the SO
- Validate the invoice

A traceback (zero division) occurs.

The method computing the timesheet revenue ponderates the revenue per
currency by the ratio price on invoice over price on SO line. Since the
price on SO line zero, it fails.

We assume a ratio of 1.0 in this specific case.

opw-1829893
2018-03-27 08:26:16 +02:00
Nicolas Martinelli e78a08e336 [FIX] mrp: date expected
- Create a MO
- Change the date 'Deadline Start'

The corresponding 'Expected Date' on the stock moves is not updated with
the new value.

opw-1828631
2018-03-27 08:24:33 +02:00