Commit Graph
102735 Commits
Author SHA1 Message Date
Goffin Simon e71d136d6f [FIX] sale: making an advance payment in percent
When making an advance payment in percent, the function onchange_advance_payment_method
set the Down Payment Product to False. Then each time an advanced payment in percent
was made, a new down payment product was created and set in sale.config.setting in the field
deposit_product_id_setting.

Now the function onchange_advance_payment_method let the Down Payment Product
even if the payment method is in percent.

opw:683167
2016-07-14 09:01:58 +02:00
Damien Bouvy 7c2c169906 [FIX] base: mixing ids and records
Browse needed.
2016-07-13 17:27:24 +02:00
Damien Bouvy 70e9a41e25 [FIX] base: compute share as sudo
Applying groups (or implied groups) in a multi-company setting
triggers the recompute of the share field; however, if the current
user does not have sufficient multi-company rules on res_users records,
the operation fails with ACLs errors.

Computing this field as sudo prevents this.
2016-07-11 17:05:20 +02:00
qsm-odoo c21568e14f [FIX] *: html fields sanitization
Since commit c9e38cae9f in saas-10, the html fields are sanitized in
strict mode by default. This breaks all html fields behaviour when it
is editable in the website editor.

This commit deactivate the sanitization for such HTML fields (like it
was already the case for blogs contents or products descriptions for
example). A more specific sanitization will be implemented in future
versions.
2016-07-11 16:02:20 +02:00
Denis Ledoux 3455daf948 [FIX] report, qweb: disppearence of header/footer in debug
This is similar to revision
3c61ee5c68

opw-682740
2016-07-08 16:22:20 +02:00
Christophe Simonis 74b51d3d97 [MERGE] forward port of branch 9.0 up to 489ea42 2016-07-05 23:19:50 +02:00
Denis Ledoux 489ea42859 [FIX] web: parsing of date with abbreviated month/day
When using the abbreviated month in the language
date format (`%b`),
e.g. `%d %b %Y`
in some languages, the parsing of the date
from this format to the database format (YYYY-mm-dd)
failed because of a dot `.` added from time to time
to the end of the abbreviated name
e.g., in French, `5 juil. 2016`

This is a bug of `moment.js` < 2.13.0,
handling badly this dot.
This is solved from `moment.js` 2.13.0,
thanks to the below revision
moment/moment@41fdb58572
moment/moment#3078

Unfortunately, we cannot update this library to its latest
release in stable release of Odoo (e.g. 9.0),
as this is seen as an unstable change
(if some API changes occured in the given library)

Instead, if the parsing of the date fails with the
strict mode (meaning the date must respect the format
exactly), we perform a second pass without the strict mode,
so this dot will be ignored,
and the date can be correctly parsed.

The issue can be reproduced by loading the French language,
and setting `%d %b %Y` as date format, and then performing
an advanced search on a date field. The value of the date
in the advanced search will be empty without this revision
(for the months having more than 4 chars,
other than `mars`, `mai`, `juin`, `aout`).

Fixes #11854
opw-682534
2016-07-05 18:04:22 +02:00
Josse Colpaert 3de53fa165 [FIX] stock: no rereservation needed in a lot of cases and make sure the moves passed to action_done are those from the recomputation
It is possible (in very rare cases) on rereservation that the new reservation will trigger other stock moves
than the first reservation.  In order to be sure to send the correct stock moves involved to done, it is better
to do the rereservation before the splitting of the moves on the total picking.

Also rereserve is optimized as it should only reserve for what is given by the pack operations,
as the backorder will be reserved later on anyways.
2016-07-05 17:26:06 +02:00
Damien Bouvy 60a7678b9d [FIX] sales_team: context-defined default should have priority
If you are in a view whose action defines a default team (for
example in a pipeline view), the default should take the context
into account instead of simply forcing the team of the current
user.

opw-682577
2016-07-05 15:22:34 +02:00
Goffin Simon 474d9dbf19 [FIX] l10n_es: Spanish Localization Module Error in Default COA
Tax Paid(Hacienda Pública. IVA soportado) and Tax Received(Hacienda Pública, deudora por IVA)
must be respectively under Current Asset and Current Liabilities in BS report.

opw:681998,681252
2016-07-05 15:21:21 +02:00
Nicolas Martinelli c4b82344d5 [FIX] account: traceback when getting counterparts
The compute method of the `counterpart` field only keeps a maximum of 2
account codes. However, it attempts to do [0:2] on a set, which is not
syntactically correct in Python.

opw-682373
2016-07-05 14:50:36 +02:00
Denis Ledoux da8c5d054e [FIX] web_settings_dashboard: email TLDs can be longer than 6 chars
This revision is similar to
7f29a23118

opw-682116
2016-07-05 14:27:11 +02:00
Nicolas Martinelli 11199d2cc2 [FIX] project_timesheet: task progress is no timesheet
If a project task with no linked timesheet is set to "Done", the working
time progress stays to zero.

opw-681622
2016-07-05 13:33:41 +02:00
Goffin Simon f7263dac30 [FIX] account: tax_line_move_line_get
The "else" has to be removed  because if a tax group named "X" is
the group of tax "A" and "B", the journal item corresponding to the invoice line
has the taxes "A", "B", and "X" set.

Introduced by 5a5ac1d7a5
2016-07-05 12:34:45 +02:00
Jeremy Kersten c6e7e2d2aa [FIX] mail: controller avatar return placeholder if no content
binary_content return '' if no picture, so, we keep the placeholder
if no image has been returned.

It avoid in the new portal with discuss widget to get the default
browser 404 picture (file broken)

This commit close #12683
2016-07-05 12:34:06 +02:00
qdp-odoo 549ea7a886 [FIX] account: cancelling a statement line that was reconciled with several already registered payment was crashing. Fixes opw 680128 2016-07-05 11:27:56 +02:00
Erwin van der Ploeg 06f75bf93d [FIX] l10n_nl: set sequences to have taxes not included in price by default.
Courtesy of Erwin van der Ploeg. Was PR #12273
2016-07-05 11:07:24 +02:00
qdp-odoo fb6a05d358 [FIX] account: fixed grouping of account.invoice.tax creation.
in details:
[FIX] added analytic account in grouping key of because we need to create different journal items for each of the lines having a different analytic account.
[REF] added a function on account.tax that returns the grouping key and that could be inherited in another (community) module
2016-07-05 10:22:35 +02:00
Goffin Simon 5a5ac1d7a5 [FIX] account: creation of an aml for an include base amount tax
When an account move line(aml) is created for an include base amount tax,
all the other taxes are impacted with this tax then the field tax_ids of
the created aml must contain the other taxes.

Example:
Considering an invoice line with:
 -A price=90
 -A fixed include base amount tax=10(incl_tax)
 -A 21% tax(called tax)

The base amount for the 21% tax is equal to:
100 = 90 + 10(incl_tax)

When the invoice is validated, three amls are created:

One for the product with:
 -Debit=90
 -Credit=0
 -Tax_ids=(incl_tax, tax)
 -Tax_line_id=()

One for the incl_tax with:
 -Debit=10
 -Credit=0
 -Tax_ids=(tax)
 -Tax_line_id=(incl_tax)

One for the tax with:
 -Debit=21
 -Credit=0
 -Tax_ids=()
 -Tax_line_id=(tax)

In this way, the base amount of 21% in the "Declaration periodique TVA"
report is the sum of all the amls balance(credit-debit) linked to tax with
the field Tax_ids.

opw:681102
2016-07-05 09:48:42 +02:00
Goffin Simon ffd30c5be2 [FIX] account: act_window to find Chart Templates
The act_window to search the chart templates must filter on category
"Localization" due to 692d41c686
2016-07-05 09:30:42 +02:00
Denis Ledoux 6c85d925c3 [FIX] web: dialog close with a reason
In the below revision:
c0db6aec56

The dialog close `reason` was introduced
to not reload the current form if the dialog
has been closed for a reason
(e.g. a window action was returned by the server).

This is to prevent the record reload, which:
 - Is useless, as another action has been launched
   and the user therefore redirected elsewhere
 - Can fail, in the case the initial action deleted
   the current record
   (e.g. when merging a lead in an opportunity, the
   lead is removed, and therefore this is not possible to reload
   it).

 opw-680180
2016-07-04 18:40:15 +02:00
Nicolas Martinelli faf3577896 [FIX] stock: receive product with lot
When a product is received in the lot reception view, a new lot is
created. If the user receives at least one lot, closes the lot selection
window, then reopens the window, he will not be able to create a lot
anymore, but only choose existing lot.

The fix is to make sure that the lot selection is available only in the
case of a returned product.

opw-681925
2016-07-04 17:53:05 +02:00
Philipp Hug 84daaa1658 [FIX] base: use correct address format for CH/LI
Closes #10911
2016-07-04 17:12:14 +02:00
Nicolas Martinelli d1407f9a09 [FIX] stock: returned product with lot number
Before this commit, the return of a delivered product with a lot number
is problematic because the user cannot select the lot from the list of
delivered lot numbers. Therefore, the user needs to create a new lot
number for the returned product since the combination product/lot must
be unique.

opw-681925
2016-07-04 16:24:03 +02:00
Denis Ledoux f7e4241a91 [FIX] l10n_fr_fec: exclude initial balance at 0
The FEC control check does not like rows
with debit = credit = 0

```
º Structure fichier incorrecte, débit/crédit ...
renseignés sur une même ligne ... , ou débit=crédit=0
```

opw-682365
2016-07-04 14:53:00 +02:00
Nicolas Martinelli d743870920 [FIX] stock_account: change standard price in perpetual valuation
When the standard price is changed for a product in perpetual valuation,
the account used is the expense account on the product, while it should
be the Counter-Part Account specified in the wizard.

This adapts the commit 935e61bab5 to work with 40bd4a2f05.

opw-681846
2016-07-04 14:49:22 +02:00
Mansi Gandhi c5cf412c10 [FIX] base: incorrect migration of 'res.config.settings' 2016-07-04 13:31:40 +02:00
Odoo Translation Bot e349692ede [I18N] Update translation terms from Transifex 2016-07-03 00:32:09 +02:00
Olivier Dony f76f4cd0b6 [MERGE] Forward-port 9.0 up to 7f2e748a22 2016-07-01 18:36:24 +02:00
Raphael Collet f4677cf2a6 [FIX] account, purchase: keep model 'mail.compose.message' transient 2016-07-01 16:04:55 +02:00
Raphael Collet 4ee6adf4b2 [IMP] models: model extension may not change kind (abstract, model or transient)
This prevents a model extension from:
 - changing an abstract model to a non-abstract one,
 - changing a transient model to a non-transient one or vice-versa.
2016-07-01 16:01:04 +02:00
Simon Lejeune 7f2e748a22 [REV] base: allow 'render' override with new api
Using a frozendict as context breaks the `t-lang` mechanism, as
the `loader` is not aware of the changes of a copied frozendict
and thus is still using the values from the original context,
including the lang one.

This reverts commit e1deae7eab.
2016-07-01 15:41:39 +02:00
Nicolas Martinelli 9a7ed7cabd [FIX] sale_mrp: COGS in case of kit
When a kit is sold, the unit price of the COGS recorded is the sum of
the unit prices of each component multiplies by the quantity sold.
Obviously, this is not correct since the unit price should not take into
account the quantity sold.

opw-681403
2016-07-01 11:05:28 +02:00
Olivier Dony 61a9cdc3f8 [FIX] account: fix unclear wording for Net EOM payment terms
The previous wording was inaccurate and made users think it
was impossible to setup "Net EOM" payment terms.

Updated POT file accordingly, but not PO files because this
requires a proper new translation.
2016-06-30 18:11:51 +02:00
Goffin Simon 31fb5275fd [FIX] product_extended: bom_count appeared twice in a view
The field bom_count appeared twice in product.template form view and
then the smart button for "Bill of Materials" always displayed 0 as
number of BoMs.

opw:681830
2016-06-30 15:28:04 +02:00
Goffin Simon bdec480434 [FIX] account: _compute_base_amount
When computing the base amount of a tax, all the include base amount
taxes must be considered.

Closed #12481

opw:681102
2016-06-30 15:12:13 +02:00
Yannick Tivisse 692d41c686 [IMP] Classified each module in its category to display them correctly on odoo/apps
To be displayed correctly on odoo app (In a given category and not only in all or hidden)
the module category in the __openerp__.py file should be one of these:

    "Accounting",
    "Discuss",
    "Document Management",
    "eCommerce",
    "Human Resources",
    "Industries",
    "Localization",
    "Manufacturing",
    "Marketing",
    "Point of Sale",
    "Productivity",
    "Project",
    "Purchases",
    "Sales",
    "Warehouse",
    "Website",
    "Extra Tools",

'Accounting & Finance' will not work, as 'Project Management', ...
2016-06-30 13:27:46 +02:00
Yannick Tivisse 2f020dc8b9 [IMP] Remove 'author' field in __openerp__.py files to user default value 2016-06-30 13:27:46 +02:00
Denis Ledoux 7c9ab02c53 [FIX] website_event: make Attendee # translatable
On the website,
when registering for an event with ticket,
the placeholder `Attendee #` could not be translated,
as `t-att` attributes are not translated.

An alternative is to put the string to translate
in a `t-set` node, which can be translated, and
to use the variable assigned in this `t-set`
in the `t-att` attribute.

opw-678758
2016-06-30 13:01:27 +02:00
Denis Ledoux bc2a06c019 [FIX] http, website_form: preserve form input values order
By default, werkzeug doesn't preserve the order
of the parameters sent to routes.

As stated in the werkzeug documentation:
```
parameter_storage_class

the class to use for args and form.
The default is an ImmutableMultiDict which supports multiple values per key.
alternatively it makes sense to use an ImmutableOrderedMultiDict
which preserves order or a ImmutableDict which is the fastest
but only remembers the last key.
It is also possible to use mutable structures, but this is not recommended.

New in version 0.6.

```

For some of our use cases, it makes sense to keep the order
of the route parameters.

e.g. In the website builder, when building a form
with a bunch of inputs values that will be concatened
in a lead note, the user expects the answer to be displayed
in the same order than the form inputs.

This change is seen as a bit risky as it could lead to
performances issues in the http routes processing, and this
is the reason we do not merge this in stable 9.0 at the moment.

If needed, it could be back ported later to 9.0, after
several weeks/months of testing in this release(saas-10 atm).

opw-677508
2016-06-30 10:45:55 +02:00
Nicolas Martinelli a4e4881f4c [FIX] website_portal: missing kwargs
The route "/my/home" is missing kwargs, therefore switching to debug
mode or trying to translate leads to a traceback.

opw-681380
2016-06-29 16:39:51 +02:00
Goffin Simon 58bdc39fb8 [FIX] product_extended: bom_count appeared twice in a view
The field bom_count appeared twice in product.template form view and
then the smart button for "Bill of Materials" always displayed 0 as
number of BoMs.

opw:681830
2016-06-29 11:58:54 +02:00
Nicolas Martinelli cef9759c31 [FIX] account_extra_reports: partner of other company
Printing the report "Sale/Purchase Journal" leads to an access error if
one of the partner of an account.move.line is from another company.

opw-681104
2016-06-29 11:34:44 +02:00
Nicolas Martinelli 4c4b0b6e1f [FIX] doc: RHEL-based installation
The instructions to install Enterprise version on RHEL-based
distributions are not correct.

opw-681767
2016-06-29 11:08:23 +02:00
Nicolas Martinelli dd233bd40e [FIX] mail: message order
It might happen that a transaction produces more than one message in the
chatter. In this case, the messages are created with the exact same
date, and they might appear in the wrong order in the chatter.

We therefore sort the messages by id, and not by date. Note that the
messages are already sorted when received from the server, but the web
client has its own management of the messages' order. Relying on the
server order might imply to change other parts of the code on client
side, which is something we want to avoid on a stable version.

opw-681049
2016-06-29 10:23:29 +02:00
Goffin Simon 1d843884e8 [FIX] account: Empty list with get_default function in "ir.values"
The function get_default in "ir.values" can return an empty list.
This is why checking that the result of this function is a list was not
enough.
2016-06-29 09:25:48 +02:00
Adrien Dieudonne 1ec2e4b22d [IMP] mail: limit number of messages fetched to 25 2016-06-29 08:36:41 +02:00
Nicolas Martinelli 506c161990 [FIX] stock: appropriate chatter log when picking done
Commit d349584 solved the state change tracking of pickings, and
moreover prevents unnecessary state changes to be recorded. However,
this also prevents the state "Done" to be recorded in the chatter.

Saving properly the state change for the picking might be quite tricky,
since the stock processes sometimes imply unreservation/rereservation of
quants, and therefore lead to several state changes inside the same
process.

opw-680343
2016-06-28 16:13:34 +02:00
Denis Ledoux 8e9187e746 [FIX] account: partner ledger report, _lang_get
From revision 2483327236
`_lang_get` returns a browse record

opw-682034
2016-06-28 15:24:23 +02:00
Nicolas Martinelli 6d51bce057 [FIX] account: money in/out in PoS
It is not possible to take money out or put money in for a PoS since it
leads to a traceback.

The decorator `@api.one` returns a list, which is something we don't
want when the method returns a dictionary.

opw-681417
2016-06-28 14:17:39 +02:00