Commit Graph
116576 Commits
Author SHA1 Message Date
Cedric Snauwaert 82da221b1f [FIX] l10n_de: DATEV export compatiblity
When invoicing a line with an account that has a tax, ensure that line has the same tax of accounts. This is required by DATEV and is common usage in Germany

Was task 35289
Was PR #25202
2018-07-26 15:15:12 +02:00
Thorsten Vocks a3bc08d9d8 [IMP] 10.0 improvement of german account charts
I. modification and extension of SKR03 account chart
========================================

* improvment and mapping of Odoo standard account types (usage of all
available account types and fixing of wrong mapping)
* fixing of reconcile setting on several accounts
* update of account chart (to SKR03 2017)
* fixing of account chart by ascending order of accounts for easier
maintenance in the future and probably easier preparation of accounting reports
* backport of new account tags from V11 for better reporting
* shorter tags
* introduction of new taxes for all theoretically possible tax cases
needed to declare the VAT
* automatic mapping of taxes to accounts to auto detect the right tax
by selection of income / expense account on invoice lines
* assignation of tax groups to taxes
* introduction of reconcile templates (to allow booking of cash discount
cases)

II. modification and extension of SKR04 account chart
=========================================

* improved mapping of Odoo standard account types (usage of all
available account types and fixing of wrong mapping)
* fixed reconcile settings for all accounts
* update of account chart (to latest SKR04 2017)
* better source code by ascending order of accounts. Finally it will be
easier to maintain the chart in the future and also it will be easier
to identify and group records to to develop missing or new accounting
reports.
* backport of new account tags from V11 for better reporting
* shorter tags
* assignation of tax groups to taxes
* introduction of further taxes to cover most possible tax
cases needed to declare the german VAT
* automatic mapping of taxes to accounts to auto detect the right tax
by selection of income / expense account on invoice lines
* introduction of reconcile templates for cash discount deduction on
payments or low payment variances.
2018-07-26 15:14:17 +02:00
Lucas Perais (lpe) 2e5dc495bb [FIX] sale: portal SO view no image if public
Access a SO with the access token, without being logged

Before this commit, the images of the so lines were the no image placeholder
This was because the route of the image was so.line/product_image
Since the token applies on SO, and not on its lines, nothing simple would work

After this commit, we hide the image if the user is the public one

OPW 1868916
closes #25973
2018-07-26 14:20:15 +02:00
Christophe Simonis 1353abecbe [MERGE] forward port branch saas-15 up to ee09d11738 2018-07-26 12:40:54 +02:00
Christophe Simonis ee09d11738 [MERGE] forward port branch saas-14 up to b8ab55319b 2018-07-26 12:38:55 +02:00
Christophe Simonis b8ab55319b [FIX] web: avoid traceback in case of failed login 2018-07-26 12:21:44 +02:00
Goffin Simon 418e146054 [FIX] sale_timesheet: Leaves manager Access error
When validating a leaves request with a user which is
in group group_hr_holidays_manager(Leaves Manager) and
group_account_invoice (Accounting & Finance Billing), it raised an
access error because the function _validate_leave_request
tried to create an analytic line with a project_id.

Without the rule account_analytic_line_rule_billing_user added by this
commit: https://github.com/odoo/odoo/commit/81218a8, a user which was
in group group_hr_holidays_manager and group_account_invoice had the rights
to validate a leaves request.

opw:1866243
2018-07-26 10:34:06 +02:00
Thibaud Ducasse 8198fb6473 [IMP] doc: add logrotate warning in cmdline doc
Fixes #24542
2018-07-26 10:20:04 +02:00
Can Tecim 5e58ac16c3 [FIX] models.py: onchange in python2 with 2054b59
Without the call to `super`, with at least two level off expected
onchange return data (eg. `invoice_lines.name`) we have an error in
python2, python3 python implementation of OrderedDict and possibly other
python implementation.

So this worked most often (with python3 CPython C implementation of
OrderedDict) by chance.

closes #25960
2018-07-26 09:58:29 +02:00
Christophe Simonis 4b9d6387b8 [MERGE] forward port branch saas-15 up to e80a0d4aa9 2018-07-25 18:11:41 +02:00
Christophe Simonis cd2ccc4110 [FIX] models: correct onchange on one2many fields
The method `convert_to_onchange` on one2many fields [1] makes a `copy()`
of `subnames` before altering it. However during onchange management, we
pass it a `PrefixTree` object that can't be copied. As we knows the
object is empty, directly use a empty dict.

[1] https://github.com/odoo/odoo/blob/e6928a6c976cf0f0f7b7b3280205516ad677b413/odoo/fields.py#L2221

Oversight of 2054b59285
2018-07-25 16:11:39 +02:00
Christophe Simonis e80a0d4aa9 [MERGE] forward port branch saas-14 up to ea53be492e 2018-07-25 16:09:06 +02:00
Christophe Simonis ea53be492e [MERGE] forward port branch 10.0 up to f1ee633f26 2018-07-25 15:29:29 +02:00
Nicolas Lempereur f1ee633f26 [FIX] website_hr_recruitment: frontend creation ok
When creating a job position from the frontend, and we:

- are on the same language that the default website language,
- have the permission to write on ir.ui.view,

we have all conditions to adding branding used to edit a page.

But when creating a position by the frontend, we create a job that will
render this template:

 website_hr_recruitment.default_website_description

When we are in the above said condition, we will create a job position
that erroneously has the branding that should only be displayed on
website and removed when saving an edition.

This caused a lot of problem with the editor that would most often not
be able to edit the content.

In this commit, we use the "rendering_bundle" context key to prevent
branding.

opw-1868879
closes #25963
2018-07-25 12:01:05 +02:00
Christophe Simonis a34789c837 [MERGE] forward port branch 9.0 up to 2c5ec48f92 2018-07-25 11:09:30 +02:00
Christophe Simonis 2c5ec48f92 [FIX] http: only del existing attributes
Closes #25652
2018-07-25 11:01:07 +02:00
Lucas Perais (lpe) e6928a6c97 [FIX] project: proper access check on tasks
With the portal user, go on /my/task/1
(obviously provided that this task doesn't belong to portal user)

Before this commit, there is a 500 error

After this commit, the exceptions are handled and throws a 403

OPW 1867795
closes #25951
2018-07-25 09:48:03 +02:00
Lucas Perais (lpe) aa4ccef418 [FIX] account: fix planner extra features 2018-07-25 09:21:26 +02:00
jbeficent a955aee429 [IMP] l10n_es: improves groups
add name + some missing groups

Was PR #23922. Courtesy of Jordi Ballester (Eficent)
2018-07-24 17:43:33 +02:00
Raphael Collet 2054b59285 [FIX] models: make onchange return a smaller diff
Large diffs (specifically in x2many fields) cause performance issues.  They
overload the web client, which considers all returned fields as dirty.
2018-07-24 17:12:04 +02:00
Thibaud Ducasse c51488c2f4 [CLA] signature for tducasse
Closes #25895
2018-07-24 15:29:31 +02:00
Julien Machiels e9901d1422 [FIX] barcodes: barcodes working in button in dropdown
On mobile, some barcodes didn't trigger in the picking screens, notably
O-BTN.validate. This is due to the use of parent() to check if the
button is in a dropdown, as parent() only checks one DOM-level upwards.
The button being inside a <ul><li>, we need to check more levels than
one to pass the condition and trigger the button press.

By changing parent() to parents(), the entire chain will be checked, not
just one level, and the button press is correctly triggered.

opw-1860964
closes #25941
2018-07-24 14:45:57 +02:00
Goffin Simon 41bea4125c [FIX] stock: Delivery slip with quantity = 0 until validation
Partial backport of https://github.com/odoo/odoo/commit/ccafe50500a803fe8c8345ab0318128a92bce3b5

Now the initial demand is used when the state is not done.

opw:1867906
2018-07-24 13:00:06 +02:00
Alexandre Kühn b67b89c315 [FIX] web: correctly align value/text in stat button
Before this commit, the style of the value and text in some stat buttons were
broken.

The design of the stat button is to have a single value and a single text which
are stacked as follow:

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +---------+          +------------+
     .o_stat_value            |         |          |            |
     .o_stat_text             |  value  |          | 10         |
                              |  text   |          | Forecasted |
                              |         |          |            |
                              +---------+          +------------+

However, some stat buttons use multiple values or texts. For example:

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +-------------+      +------------+
     .o_stat_value            |             |      |            |
        .o_stat_info          |  value text |      | 3 Hour(s)  |
          .o_stat_value       |  text       |      | Lost       |
          .o_stat_text        |             |      |            |
     .o_stat_text             +-------------+      +------------+

  [CSS]                       [Visually]           [Example]

  .o_stat_info                +---------------+    +---------------+
     .o_stat_text             |               |    |               |
     .o_stat_text             |  text  value  |    |  Min:  10.00  |
  .o_stat_info                |  text  value  |    |  Max:  20.00  |
     .o_stat_value            |               |    |               |
     .o_stat_value            +---------------+    +---------------+

The latter is works fine with block, which guarantees vertical alignment.
However, the former case has some alignment issues like this:

    [Visually]

    +------------+
    |            |
    | 3          |
    |   Hour(s)  |
    | Lost       |
    |            |
    +------------+

This is due to the use of `display:block` for any `.o_stat_text` and `.o_stat_text`.

This commit fixes this issue, without affecting the other cases.

Task-ID 1841523
2018-07-24 12:51:14 +02:00
Martin Trigaux a425695e92 [I18N] remove es_AR translations
Courtesy of Juan José Scarafía, ADHOC
The quality of the Spanish (Argentina) translations is very poor.
Remove them all and will start from scratch, translating only when needed.
2018-07-24 10:45:46 +02:00
Goffin Simon ca14f232e0 [FIX] base_vat_autocomplete: Create contact using VAT number
Let's install base_vat_autocomplete and  base_address_extended
When creating a contact with a VAT number, the street was not
formated by the autocomplete in a correct way because the function checkVat all the time
returns the street with the following format: '%(street_name)s, %(street_number)s/%(street_number2)s'
and this function doesn't take the street format of the country into account.

So the function _split_street tried to split the street into street_name, street_number, street_number2 with the
street_format of the partner but the street was  not well formated by checkVat.

opw:1867491
2018-07-24 09:54:29 +02:00
Jeremy Kersten f045186f23 [FIX] report: fix padding for ul in report pdf
Rendering in html was correct thanks to the webkit-padding-start 40px added
by the browser. But once printed with wkhtml, the padding was missing.

Now we force the padding manually.

This commit closes #7375
2018-07-23 17:02:09 +02:00
Christophe Simonis 219d2296d6 [MERGE] forward port branch saas-15 up to c4ee29345a 2018-07-23 15:45:08 +02:00
Christophe Simonis c4ee29345a [MERGE] forward port branch saas-14 up to 9ee882564f 2018-07-23 14:57:03 +02:00
Christophe Simonis 9ee882564f [MERGE] forward port branch 10.0 up to 6e71cf8a71 2018-07-23 14:21:06 +02:00
Christophe Simonis 6e71cf8a71 [MERGE] forward port branch 9.0 up to af2e480e41 2018-07-23 13:41:04 +02:00
Christophe Simonis af2e480e41 [FIX] http: refresh request environment after authentication
This allow the `/web/session/authenticate` route to return correct
partner and company.

Closes #25652
2018-07-23 13:25:42 +02:00
Ivan Yelizariev 1e1d3ed9e6 [FIX] base: suggested default ACL should be safer
When there is no ACL for a model, the system emits a log with a sample
ACL entry that developers should consider adding. This proposed ACL
should be safe: a default read-only access for internal users
seems appropriate.

Closes #25919
2018-07-23 13:18:04 +02:00
Florent de Labarre 3528e804de [FIX] stock: Error message don't contain the name of product
The message don't show the name of product.

Before the fix:

The message was: "It is not possible to reserve more products of than you have in stock."

After the fix:

The message is: "It is not possible to reserve more products of [0221] Product A than you have in stock."

opw:1868449
2018-07-23 12:09:12 +02:00
Pedro M. Baeza e91f10f14d [FIX] stock: Warehouse sequences with proper company
On a multi-company environment, as sequences are created with sudo,
if admin's company is different from the user creating the warehouse
one, then warehouse sequences are incorrectly assigned to the admin's
company
2018-07-23 10:47:07 +02:00
Goffin Simon 88ff6beb01 [FIX] base_address_extended: Changing country on a partner
Steps to reproduce the bug:

1. Create a Vendor with these address settings

- Name: Vendor123
- Streer" Street:
- Housnumber: 123

>> DO NOT ADD A COUNTRY => by default street_format = street_number street_number2 street_name

2. Create a purchase order for Vendor123
3. print the RFQ

>> ADDRESS FORMAT "123 Street" => OK

4. Go to vendor123 and set "Netherlands" as a country
5. Print RFQ again

Bug:

>> The address was still in format "123 Street"  => NOT OK

When changing the country on a partner, the field street must be recomputed
because the street_format depends on the country.

opw:1865677
2018-07-23 09:27:05 +02:00
Adrian Torres cb4266787b [FIX] ir_model_fields: properly unlink manual fields
Before this commit:

* Install module A that implements model M and field X.

* Create a new custom field Y whose reference model is not M, implemented in
any module other than A.

* Make this field either a one2many, related or compute field depending
on field X.

* Uninstall module A.

=> The registry crashes fatally, the only way to recover from this is to
log directly into the postgres database and manually eliminate the
infringing ir.model.fields record.

The reasons are multiple:

* When creating custom fields that are relational, char fields are used
to hold data like model name, field name, instead of properly storing
the related field, which would let postgres handle the unlinking
properly.

* Despite this, the ir.model.fields method _prepare_update tries to make
up for this by verifying that the ir.model.fields being unlinked during
an uninstallation are not needed elsewhere and drops them, however it
does so naively: It assumes that the "problematic" field will be defined
within the module's scope, i.e. its model reference will be a model
defined by the module being uninstalled, this isn't always the case.

This is solved by getting the dependants of each field by accessing the
model's field_triggers, if there are any triggers (i.e. dependants) then
we add them to a `failed_dependencies` list for later processing. The same
is done for field inverses (only in the case of a many2one).

After finding the failed_dependencies, a check is performed to see if the unlink is
being performed in the context of an uninstallation, in which case the failed
dependencies will be unlinked, otherwise an error will be shown to the user.

This commit is a "backport" + generalization of commit 4265026ee2

Task-ID: 1856263
2018-07-23 07:42:57 +02:00
Odoo Translation Bot e6b570c898 [I18N] Update translation terms from Transifex 2018-07-22 04:09:21 +02:00
Odoo Translation Bot 402aac89a7 [I18N] Update translation terms from Transifex 2018-07-22 00:27:21 +02:00
Martin Trigaux 85423d20b2 [FIX] account: partially revert 3754280a
The changes should not have been merged in stable.
Users installing the account module before 3754280a had a not null constraint
on the field company_id.

After updating the code, the field is still required but has no default value.

If a chart of account is installed after updating the code, it would fail.

opw-1867358
2018-07-20 16:43:42 +02:00
Ivan Yelizariev 592ee660a5 [FIX] doc: remove incorrect statement 2018-07-20 12:27:10 +02:00
Akim Juillerat 3869cdf7d8 [FIX] purchase: Restore push rules behavior in 2 steps reception
Due to this commit: https://github.com/odoo/odoo/commit/ab5fcb29650349fa641c6130bf6dcbdc1ec28a07
When confirming a PO with two lines having the same product,
the stock moves were not merged anymore in the putaway
(input to stock) picking.

Reason:
When confirming the PO, odoo creates first a receipt
(vendor to input) picking and its stock moves matching the PO line.
Then it applies the push rule on each move. Both putaway
(input to stock) moves are created by copying the receipt
(vendor to input) moves, but when the second is created,
odoo check if there's another move to merge sharing same
properties to merge into it. As purchase_line_id is now copied
in both cases, both putaway moves include a different
purchase_line_id and won't be merged together, since this field
is in _prepare_merge_moves_distinct_fields() on stock.move.

opw:1854387
2018-07-19 15:03:11 +02:00
Simon Lejeune 22062d9efc [FIX] stock_landed_costs: wrong price_unitupdate when multiple landed costs
`new_landed_cost_value` was added to `value` to recompute the
`price_unit` field. The issue is that when applying multiple landed
costs, `value` and `new_landed_cost_value` already contains the previous
landed costs, resulting in an erroneous `price_unit`.

This patch only adds `cost_to_add`, which is the current landed cost, to
`value`, which contains all the previous one.

To reproduce:
- Create a product FIFO / AUTOMATED
- Purchase 50 units@$2 and receive them (total value=$100)
- Add a landed cost of $100 on those 50 units and a landed cost of $50 on those 50 units
  (total value = $100+$100+$50)
- Sell 15 units (the value on move out =$75 > $75/15 = $5 unit cost)

The standard_price on the product = $7 while I expect to have $5

opw-1867002
2018-07-19 14:29:34 +02:00
Xavier Morel 9f8eae34d1 [FIX] undefined variables (potential nameerror)
Backport 9ec0455abc and
6a601fe6dc as they fixed various
possible NameError but did so in later sub-releases.
2018-07-19 13:37:10 +02:00
len-odoo bc12428e17 [FIX] web: format value of statinfo widget
The value of the statinfo widget is rendered by the qweb after a t-esc.
Say if the python rounding returned 14.0000000001
(supposed to be a two digits precision number through the magic of floats)
then the statinfo widget would print it as-is.

We now format the value at assignation.

opw 1865426
2018-07-19 13:19:09 +02:00
Goffin Simon 67449ced66 [FIX] purchase: State 'bid' on PO doesn't exist
Since this commit: https://github.com/odoo/odoo/commit/cb01be235e73cf948418e41642d4906ff84906a6
the state 'bid' doesn't exist on model 'purchase.order'

With courtesy of @rim-odoo

opw:1867594
2018-07-19 11:28:32 +02:00
Goffin Simon 487873f170 [FIX] purchase: Error when updating dropship order
Steps to reproduce the issue:

- change the demo user settings -> use Sales: User: All Documents only
- create a stockable product with dropship feature on and a supplier
- connect as the demo user
- create a sales order with this product
- confirm the order
- as the admin user, confirm the purchase order generated through dropship
- connect as the demo user
- open the confirmed SO
- add a line with this product
- save the SO

Bug:

An access rights error was raised.

opw:1866015
2018-07-19 11:12:09 +02:00
Lucas Perais (lpe) ee746b52cd [FIX] product: fallback onto name for product.partner_ref
Have a product with a partner A as a seller, without any description whatsoever

Do a vendor bill with partner A as the partner.

Add the product onto the lines

Before this commit, the description on the line was "False"

After this commit, we fallback onto the product name if no other reference is set

OPW 1865969
closes #25857
2018-07-19 09:25:33 +02:00
Lucas Perais (lpe) 1409421b26 [FIX] account: payment cashbasis' move posted once
Make an invoice with a line having a cashbasis tax
Make a payment at a future date compared to the invoice's date

Before this commit, the cashbasis move attempted to post many times
which could lead to errors when posting is forbidden
(in the case of the french localization)

After this commit, the cashbasis move is posted only once

OPW 1865179
closes #25832
2018-07-19 09:19:47 +02:00
len-odoo 79ee0e2584 [FIX] web_editor: display a dialog if posting a translation fails
When editing a translation on the website, if the user copy/pastes directly in
the web editor, then the html formatting is also copied.
Since the translation matching takes the html code into account when matching
the translations, this breaks the pairing.
When trying to save, the backend function validating the new translation thus
fails and return a server error.
However nothing was done with this error, and the user just witnesses that
saving doesn't work (unless he opens the console to notice the rpc failure).

We now display an alert dialog that notifies which tranlation causes the error.

opw 1862784
2018-07-18 16:35:38 +02:00