Commit Graph
109116 Commits
Author SHA1 Message Date
Richard Mathot 2b32f52b48 [REV] "[FIX] base: language code for Khmer (Cambodia)"
This reverts commit 3830621075.

This patch was unstablie as updating language code is actually forbidden.
2017-12-15 09:11:52 +01:00
Christophe Simonis e89fbb5c38 [FIX] l10n_fr_certification: correct view inheritance hook 2017-12-14 14:27:53 +01:00
Sanjay Jamod 3830621075 [FIX] base: language code for Khmer (Cambodia)
Closes #17633
2017-12-14 13:44:14 +01:00
Christophe Simonis 767e2509f7 [MERGE] forward port branch 9.0 up to 228f6086b1 2017-12-14 13:24:01 +01:00
Christophe Simonis 228f6086b1 [FIX] l10n_fr_pos_cert: correct dependency 2017-12-14 12:55:32 +01:00
David 849a10b1da [FIX] website_event_sale: registration visibility
- When all the tickets in an event expire, the form is still visible,
wich is confusing for users.

This closes #21384
2017-12-14 12:50:05 +01:00
Lucas Perais (lpe) b75927f9e3 [FIX] l10n_fr_certification: adapting to the new specs
Main resource document to be found at https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf

    This document states that only business operations with partners not being subject to VAT should be inalterable and secure.
    We adpat the module by differentiating between b2c and b2b journals and apply hashing on the former's moves

    Protection against account_cancel is not necessary anymore

    By default, this module considers a sales journal being a b2c, thus activating hashing on its move.
    Since we can't afford to lose information, when a b2c journal contains hashed moves, its b2c characteristic cannot be changed

[ADD] l10n_fr_pos_cert: module to adapt the POS to the recent French regulation CGI art. 286, I. 3° bis.

    The module adds following features:

    - Inalterability: deactivation of all the ways to cancel or modify key data of POS orders, invoices and journal entries

    - Security: chaining algorithm to verify the inalterability

    - Access to download the mandatory Certificate of Conformity delivered by Odoo SA (only for Odoo Enterprise users)

[ADD] l10n_fr_sale_closing: module to store automatically the total of daily/monthly/annualy sales.

    (both of the period and cumulative).

    This fulfills another requirement brought by the recent French regulation CGI art. 286, I. 3° bis related to the storage of data

Was PR #20581. Was task 29922
2017-12-13 17:22:51 +01:00
qsm-odoo 3a13eada0e [FIX] web: readonly required text fields should not be highlighted
The bug is also present in enterprise but the required style of
enterprise makes the bug invisible. The bug has also been naturally
fixed in 11.0 thanks to the views and design refactoring.

Thanks @auyeung112002 for the original fix.
2017-12-13 17:14:11 +01:00
Christophe Simonis 1022e4fb25 [MERGE] forward port branch 9.0 up to 22f8660e22
Works better when you add files...
2017-12-13 15:17:22 +01:00
Christophe Simonis 39fb0825ac [MERGE] forward port branch 9.0 up to 22f8660e22 2017-12-13 15:16:46 +01:00
Martin Trigaux b92aaf1e66 [FIX] mail: display email of partner in the tags 2017-12-13 12:57:48 +01:00
auyeung112002 d847a66415 [FIX] web: Make search view dropdown menu scrollable 2017-12-13 11:35:48 +01:00
Josse Colpaert 22f8660e22 [FIX] stock: don't propagate cancel when chained move is done
When you have e.g. an SO with a product MTO generating a manufacturing
order, and you put the delivery order to done, before the MO is done,
you can not cancel the MO anymore, because the cancel method checks if
the move is not done (and raises an error).

As the user stays blocked in this case, it is better to just not try to
cancel the destination move by not propagating the cancel when the destination
move is done.

opw-786571
2017-12-13 10:17:48 +01:00
Josse Colpaert b3be0b7576 [FIX] stock: don't propagate cancel when chained move is done
When you have e.g. an SO with a product MTO generating a manufacturing
order, and you put the delivery order to done, before the MO is done,
you can not cancel the MO anymore, because the cancel method checks if
the move is not done.

As the user stays blocked in this case, it is better to just not try to
cancel the destination move by not propagating the cancel when the
destination move is done.

opw-786571
2017-12-13 10:10:46 +01:00
Wolfgang Taferner 30d0861f0a [FIX] base: ir.sequence better fallback
Zero is an non-acceptable value for sequences, so the fallback should be
one instead.

Fixes #21267
2017-12-13 08:51:05 +01:00
Adrien Peiffer (ACSONE) 2a9e6e6a3b [FIX] res_partner: bad sudo.
Using sudo on super call can turn into infinite call in odoo.

opw:785415
2017-12-12 15:58:59 +01:00
Josse Colpaert b0acb42f0b [FIX] stock: avoid infinite or longer than necessary loops
In some cases the MRP scheduler can remain blocked on an infinite loop
consuming a lot of CPU. The reason comes from the loop 'Check done
procurements'

If a new procument is created from another process (such like MTO
orders) during this loop, the process never ends.

The only way to reproduce is in debug mode:
1. Put a breakpoint on line 'Check done procurements'
2. Launch the MRP scheduler manually and stay paused on the breakpoint
3. In parrallel, create and confirm a sale order with a MTO route, this
   will trigger the creation of a new procurement order in state
   'Running'
4. Continue debugging step by step the scheduler and you will notice
   that the loop never ends.

Closes #21565
opw-787651
2017-12-12 15:20:57 +01:00
Christophe Simonis 219c93252f [MERGE] forward port branch 9.0 up to 7a24a2f45f 2017-12-12 14:15:15 +01:00
Nicolas Martinelli 7a24a2f45f [FIX] field: avoid overhead of record._set_dirty when setting fields (#21378)
Setting fields as dirty was dramatically slow for huge one2many fields.
2017-12-12 13:36:23 +01:00
Nicolas Seinlet eb36f42729 [FIX] stock: complete_name of stock location
Have the following location structure: Loc A -> Loc B -> Loc C
The `complete_name` fields are:
- Loc A
- Loc A/Loc B
- Loc A/Loc B/Loc C

When changing Loc A to Loc D, the `complete_name` are:
- Loc D
- Loc D/Loc B
- Loc A/Loc B/Loc C

Compute `complete_name` of stock location using `complete_name` of
parent instead of parsing the full bunch of ancestors.  This improves
the computation speed, and moreover solves the recursivity problem.

Closes #21585
2017-12-12 13:15:47 +01:00
Goffin Simon 2720eb84ee [FIX] website_portal: Verification of vat number in EU country
We have problems when trying to validate our EU VAT report because some vat number are wrongly encoded in Odoo.
    There are 2 problems:

    1) We use vatnumber library to check the validity of the VAT number entered by the user on website.
       That library removes the following characters '.' and '-' in order to perform the check and
       thus can return True for a number like 123.123.123.13 or -123-3454-34
       And those VAT number are then saved in our database but are rejected by the state
       as VAT number should only contains alphanumeric character
    -> Solution: prevent entering vat number with other characters than alphanumeric for users that are located in EUROPE!

    2) Usually VAT is prefixed by country code, however some people in europe managed to bypass the system
       by prefixing their VAT number with CC instead of their country code, CC is consider valid in odoo
       (it means Country Code) but is not a valid European country code in general, which means that those
       people that should have pay some tax have not. Which is a huge problem.
    -> Solution: prevent the use of CC as country code by the user when entering a vatnumber only if the user country is in EUROPE!

    source: https://en.wikipedia.org/wiki/VAT_identification_number

opw:785443
2017-12-12 11:51:52 +01:00
Pedro M. Baeza d82b360309 [CLA] backport signature for Tecnativa
backport of dc8010c9b to 9.0
Asked in #21496
2017-12-12 11:39:35 +01:00
Martin Trigaux ffbcf69af5 [FIX] product_extended: remove not working price computation
costs_hour field no longer exists
Some modules in a different repository (let say enterprise), may be still using
it but it is not its place here.
For stability reasons, we keep the computation if an external module adds the
missing field anyway

Fixes #16269
Closes #20899
2017-12-12 11:36:58 +01:00
Nicolas Seinlet 98072f1ad0 [IMP] stock: performance on _compute_reserved_availability
Improve performance (* 2.5) on _compute_reserved_availability
`mapped` makes use of orm prefetch, which is inefficient in this use
case when facing high volume.

Closes #21198
2017-12-12 11:17:54 +01:00
Christophe Monniez 17c9208889 [FIX] base: backport of set mimetype on js and css assets
On MS Windows, the mimetypes module relies on the Windows Registry to
guess mimetypes. As a consequence, when generating assets bundle for
javascript files, the mime type of js files may be wrong. In that
particular case, the Odoo user is facing an empty web page.
This commit enforce 'application/javascript' for js assets when they are
saved as ir_attachment in the database.

This commit is a backport of 77ca51f
2017-12-12 09:42:55 +01:00
Arnold Moyaux 6d02f7d6bf [FIX] purchase: Only use purchase UOM on vendor bill
It was the purpose of this commit fea667a243
However it uses purchase uom in any cases and not
only vendor bill.

This commit correct it by using it only if a purchase
order is linked to the invoice.
2017-12-11 11:24:33 +01:00
Odoo Translation Bot f3623f1513 [I18N] Update translation terms from Transifex 2017-12-10 00:42:03 +01:00
Pierre Masereel 6b27d9f91a [FIX] point_of_sale: digits field doesn't exist on currency
As the field digit doesn't exist on currency, we use decimal_places
instead which is the field containing the number of digits of the
corresponding rounding field
2017-12-08 16:03:08 +01:00
Pedro M. Baeza cd31e82689 [FIX] account: Allow to duplicate supplier invoices
As there's a check for unique supplier reference numbers, you can't duplicate them as the field is copied on the duplicated record. This patch removes the copy for emptying the error.

@Tecnativa
2017-12-07 09:08:17 +01:00
Lucas Perais (lpe) bf119dcff6 [FIX] account: predicting receivable/payable on partner in tests
Before this commit, when a localization defined default payable or receivable
accounts on partners (like l10n_do does)
The reconciliation tests that involve an invoice on the one hand and a payment on the other hand
broke just because the accounts of the payment and the one of the invoice did not match

After this commit, we force the receivable or payable account to be the partner's (if available)
and the tests do not break
2017-12-06 17:18:45 +01:00
auyeung112002 bde7030c59 [CLA] auyeung112002 signs the CLA
Backport of ecbf7aa471 to 10.0
Asked at #21284
2017-12-06 16:47:46 +01:00
Lucas Perais (lpe) fd560917ab [FIX] point_of_sale: sale details report correctly renders float
Before this commit, when printing all orders from the POS interface,
the ticket sometimes showed weird amounts (like 128.25000000001).

This was due to the usual problem of representing a float and has nothing to do with Odoo.

After this commit, the templates correctly display the amounts, rounded according to the currency
We do this by applying the relevant qweb widget (or calling the right format function in JS)

OPW 784626
2017-12-06 16:35:34 +01:00
Pedro M. Baeza f6321ab94c [FIX] hr_attendance: Make department related field readonly
Related fields that are not readonly are rewritten each time you save the
associated record, provoking performance problems.

Moreover, we don't want to allow an employee to change its department through
an attendance record.

Closes #21441
2017-12-06 16:25:41 +01:00
jat-odoo 0a90393da3 [FIX] web_editor: show proper video on existing video edition
See https://github.com/odoo/odoo/commit/5e38bef5a5ededb28707af44a19caaec2af2d682
and especially https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71

Closes #19673
2017-12-06 15:16:46 +01:00
Lucas Perais (lpe) af8908b03c [FIX] stock: do not propagate date when negative delta
In Pick - Ship:
- validate a sale order which scheduled date is an hour in the future.
- validate the WH/PICK picking

Before this commit the WH/OUT picking 's scheduled date was set a day in the **past**

This was due to the implementation of datetime substraction and timedelta, which,
in case of a negative value, would take -1 day and some complementary values (hours, minutes etc...)
(the difference is complementary)

After this commit, the WH/OUT picking 's scheduled date stays what it was in that particular use case.

OPW 784452
2017-12-06 14:30:44 +01:00
Nicolas Martinelli 9d0b4d0c2d [FIX] base: deactivate lang
- Install a new language
- Set it as default for several users
- Open the language and click on "Deactivate"

Traceback.

Fixes #21418
opw-786342
2017-12-06 10:20:35 +01:00
Nicolas Martinelli d81000d0a6 [FIX] point_of_sale: virtual keyboard
Several issues arise with the virtual keyboard.

Issue 1
- Go in client list
- Go back to product list

The keyboard is still connected to the client search field.

Issue 2
- Go in client list
- Add a new client
- Click on any field

The keyboard is still connected to the client search field, it's
impossible to fill in any client data.

opw-784613
2017-12-06 08:12:04 +01:00
Christophe Simonis dd7ee15fb8 [MERGE] forward port branch 9.0 up to ce038f5d15 2017-12-05 13:52:02 +01:00
Romain Derie ce038f5d15 [FIX] auth_oauth: correctly retrieve user facebook email
Before this commit, you could never get the user's facebook email. Since there
was no email field on facebook response, email would be then set to an auto
generated value like 'provider_2_user_0123456789123456' by odoo.

Now, we correctly request user's email to facebook.

opw-782771
2017-12-05 13:29:06 +01:00
Nicolas Lempereur 04bfd54013 [FIX] sales_team: multicompany issue typo 3ad1867e
3ad1867e could lead to wrong results in a multicompany setting because
the change got the company from the lead but it was intended to be
gotten from the user.

Since ('company_id', 'child_of', False) returned "root" companies, the
code still got a sales team but possibly one from another company if the
user was on another company that its sales team.

This would lead to an access issue that this commit solves.

opw-784455
closes #21428
2017-12-05 11:07:51 +01:00
Ruter fe8668e509 [FIX] web: Setting disable_favorites on Search View causes Exception 2017-12-05 09:31:00 +00:00
Ruter ed326e0569 [CLA] signature for ruter 2017-12-05 09:31:00 +00:00
Joren Van Onder b2f0af4543 [FIX] point_of_sale: allow searching a partner on >2 fields
When searching for a partner the ' ' (SPC) character can be used as a
field separator. You can search for e.g.:

'agr namur'

which will return the 'Agrolait, 69 rue de Namur,...' partner.

For some reason only the first space was considered a separator. So
e.g.:

'agr namur belgium'

wouldn't work.

This commit makes it so that every space character is considered a
separator.

Fixes #21357
2017-12-04 14:18:36 -08:00
Adrian Torres 78aef7605c [FIX] *: ordered group_by for field with capital letters
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.

Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.

This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.

Fixes #21348

Cherry-Pick of c338e24ee7 as previous
forward-port has been badly done...
2017-12-04 18:49:31 +01:00
Christophe Simonis 8a9973bd2a [MERGE] forward port branch 9.0 up to c338e24ee7 2017-12-04 18:34:01 +01:00
Josse Colpaert 220bdb3587 [FIX] mrp: qty producing on update qty of mo
When updating the quantity of an MO, the qty we are producing on a work
order should possibly be updated.  When the finished product is tracked
by serial number it should be 1.0 when some quantity is still to be
treated.  (and not 0 as before)

opw-785190
2017-12-04 17:18:16 +01:00
Adrian Torres c338e24ee7 [FIX] *: ordered group_by for field with capital letters
When doing a group_by in a tree view, and then ordering by an
aggregated field which contains at least one capital letter in its name,
you will get an error and won't be able to ordery by this field.

Why? read_group is called when sorting a group by, which calls
_read_group_raw which then goes to call _read_group_prepare, which will
return order by terms in this manner ['id asc', 'x_Test desc']
the problem with this is that postgres automatically converts
non-quoted/non-qualified column name to lowercase, of course this means
that if we have a field "x_Test" but no field "x_test", it will try to
look up "x_test" instead of "x_Test" and since the column doesn't exist,
it will throw a ProgrammingError.

This commit changes this behavior by wrapping the order_by terms generated in
_read_group_prepare with double quotes, which postgres interprets
correctly.

Fixes #21348
2017-12-04 16:28:32 +01:00
Lucas Perais (lpe) 067a241ea8 [FIX] product, web: many2one child of value
Before this commit, when a product category had a similar name than an other
e.g. ALL / Exp and ALL / Expenses

When entering the list view of its products, it displayed the product linked to the category with the similar name
e.g. When opening ALL/Exp products list, it displayed its products **plus** the products of ALL/Expenses

After this commit the list view just contains the active category's products

OPW 782905
2017-12-04 15:42:49 +01:00
Lucas Perais (lpe) 4aef443135 [FIX] product: product category smart button: sub categ too
Before this commit, the smart button on the form of product category
only displayed the number of product for the current category,
whereas the list view of products (when you clicked on the smart button)
displayed all sub-categories products.

After this commit, the behavior is harmonized: all sub-categories products
should be accounted for and displayed

OPW 782905
2017-12-04 15:42:06 +01:00
Christophe Simonis e0ea17990a [MERGE] forward port branch 9.0 up to 62fcf6a9fe 2017-12-04 15:33:24 +01:00