Commit Graph
118799 Commits
Author SHA1 Message Date
Christophe Simonis c8633bcc16 [FIX] board: correct test definition
Oversight of previous forward-port.
2018-10-10 18:05:22 +02:00
Julien (juc) Castiaux e6580e59a3 [I18N] calendar: correct bad email template translation
Complement 4558ca95cd

opw-1891825
2018-10-10 17:36:36 +02:00
Christophe Simonis 7415f40fbd [MERGE] forward port branch 11.0 up to a69f117bbf 2018-10-10 14:40:01 +02:00
Christophe Simonis 61df7749cc [FIX] test_mail: bump expected query count
e88c5c1ece uses `sudo()` to get user name,
which lead to more queries due to cache miss.
2018-10-09 19:04:59 +02:00
Lucas Perais (lpe) cba5f7a98f [FIX] web: fetch dependency fields in x2many
Image field widget need the __last_update field alongside them
for caching purposes, though that field should never be present explicitly
in the views

Before this commit, the dependencies of field widgets were not merged into
the model's fields definition, creating a traceback when adding an image field widget
into a x2many list

After this commit, there is no traceback and the image field works properly

closes #27545
2018-10-09 14:16:56 +02:00
Christophe Simonis f6ea6ce951 [MERGE] forward port branch 11.0 up to c576800813 2018-10-09 13:55:53 +02:00
Nicolas Martinelli c576800813 [FIX] hr_expense: AccessError on product
- Install hr_expense and stock.
- Add enough products which can be expensed so that a 'Search More...'
  option is proposed.
- Restrict the rights of a user U to 'Employee' only.
- As U, create an expense, and click on the 'Search More...' option when
choosing the product

An AccessError is raised on `stock.move`.

The error is due to fields `qty_available` and `virtual_quantity`.

These fields are not necessary in that context, so we define a specific
tree view for this use case.

opw-1891399

closes odoo/odoo#27561
2018-10-09 08:22:12 +00:00
8445baa08d [FIX]web: do not crash when dismissing a modal with escape
stopPropagation of navigation_move event for where direction=cancel,
currently if navigation_move event throws error when user press escape
in dialog where dialog is opened from editable list record

Scenario: Install website_sale -> Open Product form(variant enable) ->
open variant tab -> open Attribute m2o form popup and press Escape on dialog
Result: Error
Expected: It should close dialog and keep editable list view record open,
btw m2o field should also be focused when dialog is closed but that's
another issue, will be fixed in another ongoing task

Related to Issue: #1873919

Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2018-10-09 09:46:39 +02:00
Nicolas Martinelli a4e46846d7 [FIX] point_of_sale: float comparison
- Create the following pricelist for product A:
  4 Units: 2.88
  3 Units: 3.45
  2 Units: 4.85
  1 Units: 7.50
- In the POS, click several time on A to add in the cart

The 2 first units are merged in a single line, but from the third one a
new line is created.

This is because of the float reproesentation of 4.85, which becomes
4.8500000000000005.

opw-1887586

closes odoo/odoo#27539
2018-10-08 13:16:51 +00:00
Christophe Simonis 1b5f14713b [MERGE] forward port branch saas-15 up to 0ef5cedebb 2018-10-08 18:59:03 +02:00
Christophe Simonis 0ef5cedebb [MERGE] forward port branch saas-14 up to 637e4c68fc 2018-10-08 17:29:03 +02:00
Christophe Simonis 637e4c68fc [MERGE] forward port branch 10.0 up to e88c5c1ece 2018-10-08 17:28:08 +02:00
len-odoo e88c5c1ece [FIX] mail: sudo on user name
Suppose user A creates a sale order S in company X. He then changes to company Y
Sales manager B, in company X, creates the invoice for sale order S.
Bug: the compilation of the report fails because of the user.name in the
template. Then the tracking update fails, making it impossible to validate the
invoice.

opw 1884915
2018-10-08 15:59:30 +02:00
Christophe Simonis 0efe62d63d [MERGE] forward port branch 10.0 up to 085d504561 2018-10-08 14:51:52 +02:00
Duc Dao 085d504561 [FIX] base: use correct field for Vietnamese
There is no name field but a state_name one
Closes #27512
2018-10-08 12:13:32 +02:00
Aaron Bohy a69f117bbf [FIX] board: handle actions with no view_mode
The view_mode attribute is automatically set to the 'action' nodes
when the action is added to the dashboard using the 'Add to
dashboard' button in the searchview. However, other dashboard views
can be written by hand (see openacademy tutorial), and in this
case, we don't want to hardcode action's params (like context or
domain), as the dashboard can directly retrieve them from the
action. Same applies for the view_type, as the first view of the
action can be used, by default.

Before this rev., the second usecase wasn't handled, and it crashed
when no view_mode was specified. This rev. also ensure that the
context and domain are correctly retrieved from the action.

Closes #24088

closes odoo/odoo#27517
2018-10-08 09:19:21 +00:00
svs-odoo 078b31dc7f [FIX] web: Make datetimepicker configurable in datetime fields
The datetimepicker option was introduced to be able to customize the
datetime picker widget in date/datetime fields. However, due to the way
the _makeDatePicker function was coded, it did not work in datetime
fields.

Thank to Yajo for the initial fix

closes odoo/odoo#27541
2018-10-09 12:34:23 +00:00
Nicolas Lempereur 56fe8ee9ee [FIX] base: access_token test pass for python2
In 46f2e1918 that replaced traceback when accessing an attachment with
access token with 403 or 404 errors, the added test would fail if run in
python2.

fix for https://github.com/odoo/odoo/commit/46f2e191#commitcomment-30796449
closes #27514
2018-10-08 09:09:58 +00:00
Nicolas Martinelli 48a7dbf27f [FIX] stock_account: return dropship
Backport of commit 2e6c1aa5d1

opw-1885628
2018-10-08 09:35:06 +02:00
Odoo Translation Bot fd228ccda4 [I18N] Update translation terms from Transifex 2018-10-07 00:29:41 +02:00
celm1990 fc411ceb19 [FIX] mrp,stock_account: correct external ID
Following changes made at 6a378e3839

Closes #27322
2018-10-05 11:04:53 +02:00
Lucas Perais (lpe) 2c6cd3f357 [FIX] stock_dropshipping: check on purchase lines for everyone
confirming a sale order would fail without this fix if the user has access
to sale but not to purchase and/or stock

OPW 1890057

closes odoo/odoo#27429
2018-10-04 13:18:55 +00:00
Christophe Simonis c43f35ee9d [MERGE] forward port branch 11.0 up to 45922f397f 2018-10-03 17:12:38 +02:00
Christophe Simonis 45922f397f [MERGE] forward port branch saas-15 up to 6cb75dc3d6 2018-10-03 16:43:31 +02:00
Odoo Translation Bot 6bb4b305f0 [I18N] Update translation terms from Transifex 2018-10-03 14:27:50 +02:00
Christophe Simonis 6cb75dc3d6 [MERGE] forward port branch saas-14 up to 1929448412 2018-10-03 12:15:33 +02:00
Christophe Simonis 1929448412 [MERGE] forward port branch 10.0 up to 695050dd10 2018-10-03 12:14:41 +02:00
Lucas Perais (lpe) de678fdd1e [FIX] account: invoice line form should contain fields present in the list
In the invoice form view, remove the editable attribute on the invoice line tree

Create an invoice, click add an item in the invoice_line_ids field

Before this commit there was a crash because the tree view contains analytic_tag_ids
but the invoice line form doesn't

After this commit, there is no crash and the invoice line form works as exepected

OPW 1889107

closes odoo/odoo#27382
2018-10-02 11:55:24 +00:00
Nicolas Martinelli be6bcae848 [FIX] account: reconcile error
- From the accounting dashboard, click on the 'Reconcile' button of a
  bank journal
- Click on the 'Bank reconciliation' text at the top left
- Click on the 'OK' button that just appears

A traceback occurs.

This event is used to change the name of the statement, when clicking on
'Reconcile' from a bank statemet. In this case, it shouldn't do
anything.

opw-1883308

closes odoo/odoo#27359
2018-10-02 11:15:51 +00:00
Arnold Moyaux 9cf22e5ef6 [FIX] stock: inventory display archived product
Usecase to reproduce:
- Archive a stockable product with quantity on hand
- Start an inventory with all products.

-> Archived product is displayed

It happens because the search is an SQL request that is build
and it thus does not benefits from the automatic search on active
objects.

This commit add an active search on quant for inventory lines.

Fixes #27302

closes odoo/odoo#27384
2018-10-02 12:57:00 +00:00
Odoo Translation Bot 47369090db [I18N] Update translation terms from Transifex 2018-10-07 04:11:56 +02:00
Niyas Raphy d3b2d1a82e [CLA] cybrosys signs Odoo CCLA
closes odoo/odoo#26597
2018-10-04 13:26:59 +00:00
Nicolas Martinelli 695050dd10 [FIX] sale_crm: quotes count
- Create a SO from an opportunity, keep the status draft
  => the 'Quote(s)' number is 1 on the opportunity
- Confirm the SO

The 'Quote(s)' number is 0 on the opportunity, but when clicking on the
stat button 1 quote is displayed.

The `search_default_draft` (and the `search_default_sales` of the Orders
stat button) are not working since the action doesn't use the
appropriate search view.

opw-1888442
2018-10-02 12:13:52 +02:00
Goffin Simon 73b4abfcbc [FIX] sale_mrp: Updating delivered qty
Steps to reproduce the bug:

- Create three stockable products: Kit, C1 and C2
- Create a phantom BOM for Kit with C1 and C2 as components
- Set the invoicing policy of the kit based on delivered qty
- Create an SO for the kit and validate it
- On the delivery order, just deliver C1 and create a backorder for C2
- Cancel the backorder and duplicate it
- Deliver the duplicated backorder and validate it

Bug:

The delivered qty on the SO line has not been updated to 1.

opw:1886315
2018-10-02 11:19:55 +02:00
Goffin Simon e764739d0d [FIX] sale_mrp: price unit of kit
- Create the following products in FIFO costing method and real-time
  valuation:
  Prod Final (F); Invoiced on Delivered Quantity
  Prod Comp1 (C1); Cost = 20
  Prod Comp2 (C2); Cost = 10
- Create the BOM Kit for F:
  2 Unit(s) of C1
  1 Unit(s) of C2
- Create a SO for 3 Unit(s) of F
- Validate SO and picking
- Create the invoice and validate

The price unit taken into account for F in the anglo-saxon accounting
entry is:
20 + 10 = 30
=> entry in Stock Output Account is 3 * 30 = 90

while it should be:
(2 * 20) + (1 * 10) = 50
=> entry in Stock Output Account is 3 * 50 = 150

This should finally fix issues corrected with:
9a7ed7c: price unit multiplied by the qty sold (*)
f1fdb97: price unit taking into account only 1 unit of each
component

(*) In the use case solved, the price unit was:
(6 * 20) + (3 * 10) = 150
=> entry in Stock Output Account is 3 * 150 = 450

opw:1886216
2018-10-01 14:05:58 +02:00
Christophe Simonis e980af9df0 [MERGE] forward port branch 11.0 up to a9a556178d 2018-10-01 10:44:38 +02:00
Lucas Perais (lpe) cbff00a5d2 [FIX] base_vat_autocomplete: support overload street fields
Install base_vat_autocomplete and base_address_extended.
Try to create a contact with VAT: BE0477472701 (or any valid one)

Before this commit, there was a traceback because the split of the address string into fields
contained a field that is set in base_adress_extended, and not handled by the current module

After this commit, there is no traceback

OPW 1887288
closes #27291
2018-10-01 09:35:51 +02:00
Lucas Perais (lpe) 1bd7adcc8b [FIX] web: debug_manager set defaults
On a form view, click on set defaults, select a value for a field,
then save

Before this commit, there was a traceback because the model on which we apply
the defaults was not found

After this commit, it works as expected

OPW 1887032
OPW 1888715

closes #27148
2018-10-01 09:31:15 +02:00
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Christophe Simonis 88fa382664 [MERGE] forward port branch saas-14 up to 503c7a3d65 2018-09-28 19:14:45 +02:00
Christophe Simonis 503c7a3d65 [MERGE] forward port branch 10.0 up to baf3c5712d 2018-09-28 19:10:04 +02:00
Christophe Simonis baf3c5712d [MERGE] forward port branch 9.0 up to 70028701b3 2018-09-28 18:06:03 +02:00
Martin Trigaux 21f8ee0119 [FIX] account: fallback for entries with no name
The name of an account.move.line is not mandatory
If a line with no name but analytic tags is posted, the name for the analytic
line should be computed differently (the name of an anlytic line is required).

Apply changes from f2b2d87236 to the _prepare_analytic_distribution_line method

Fixes #27281
2018-09-28 14:55:13 +02:00
Gustavo Valverde a9a556178d [FIX] stock_account: Use product display_name in errors
When working with product variants, if the error which gets displayed does not include the product attributes, it's harder to identify the variant with the error.

closes odoo/odoo#27298
2018-09-28 12:38:34 +00:00
Christophe Simonis 56658ad8de [MERGE] forward port branch saas-15 up to 88fa382664 2018-09-28 19:17:24 +02:00
Gert Pellin 1b5f2ac420 [FIX] hw_scale: read values from Adam scale
with migration from python2 to python3 not all regexes where converted
to byte-array.

backport of b4bcf86f8e to 11.0

closes odoo/odoo#27252
2018-09-28 13:21:56 +00:00
Nicolas LempereurandWolfgang Taferner 46f2e1918f [FIX] base: access_token error handling correctly
When an attachment is requested with an access_token, a server error
would occur in some situation.

With this changeset when an access token is specified:

- returns a 404 error if the attachment does not exist
- returns a 403 error if the attachment has no access_token

Without this change, the added test would fail with:

```
 status = test_access(access_token='Secret')
 self.assertEqual(status, 403,
     "no access if access token for attachment without access token")
 | if not consteq(obj.access_token, access_token):
 | TypeError: unsupported operand types(s) or combination of types: 'bool' and 'str'

 status = test_access(access_token='Secret')
 self.assertEqual(status, 404,
     "no access with access token for deleted attachment")
 | if not consteq(obj.access_token, access_token):
 | odoo.exceptions.MissingError: ('Record does not exist or has been deleted.', None)
```

close #26647
opw-1884419
closes #27275

Co-authored-by: Wolfgang Taferner <wtaferner@users.noreply.github.com>
2018-09-28 10:42:51 +00:00
Nicolas Lempereur bedb3a1db0 [FIX] stock_account: visual ok product standard_price
The xml structure would display "$ 0.00Cost" instead of "Cost $ 0.00".

closes #27280
2018-09-28 12:31:41 +02:00
Olivier Colson 70028701b3 [IMP] l10n_lu: make 9.0 fix match the one done by mat in 11.5 2018-09-28 12:16:25 +02:00
Stefan Rijnhart 22cd49bafb [IMP] l10n_jp: reintroduce account 製品 with correct account code 2018-09-28 12:08:47 +02:00