Commit Graph
107816 Commits
Author SHA1 Message Date
Nicolas Martinelli be1ca7b100 [FIX] web: min/max integer
In PostgreSQL, a field of type `integer` must be in the range
-2147483648 to +2147483647. If the user enters a lower or a larger
value, a traceback is thrown.

opw-740286
2017-05-02 16:11:01 +02:00
Goffin Simon e645d38ce1 [FIX] sale: Wrong access_name button in Sales Order - Send by Email
When the online SO was already confirmed and paid, the button "Accept and pay"
was displayed instead of "View".

opw:728306
2017-05-02 15:04:19 +02:00
Jeremy Kersten 76d0444fde [FIX] website_hr: fix access right to allow portal user to read employee website_published
opw-741077
This commit closes #16616
2017-04-30 11:57:46 +02:00
Odoo Translation Bot e0ff2840a5 [I18N] Update translation terms from Transifex 2017-04-30 04:31:05 +02:00
Jeremy Kersten ce947eece8 [FIX] stock: don't try to rename unexisting mto_pull_id.
This field is not required, in case it is empty, the rename will crash.

opw-741259
2017-04-28 14:52:46 +02:00
Nicolas Martinelli 7413b2624c [FIX] hr_expense: employee on expense
The employee of the expense report should be the same than the employee
on expense lines.

opw-740646
2017-04-27 14:32:22 +02:00
Goffin Simon c242526b7b [FIX] delivery: Delivery methods not translated
In function name_get on model "delivery.carrier", the field name
is taken from "product.template" and the translations were just
available on model "product.product".

The translations for the "product.template" records were not available
in the .pot file because there was no external identifiers created for
the "product.template".

Now when creating the external identifier of a record, all the external
identifiers of the inherits models of this record are also created.
In this way, all the translations will be created.

opw:728682
2017-04-27 12:11:18 +02:00
Nicolas Lempereur 1faa4a74aa Revert "[FIX] mass_mailing: revert typo forward port ed0233f"
This reverts commit 75d9674d4 and revert well 551719a81e which wass done
on mail.mass_mailing instead of mail.template (on which it should not be
done).
2017-04-27 08:34:33 +02:00
Nicolas Lempereur 75d9674d45 [FIX] mass_mailing: revert typo forward port ed0233f
This commit revert the change of 551719a8 forward ported in ed0233f.

The file and feature modified is not present after saas-11.
2017-04-27 08:15:37 +02:00
Christophe Simonis ed0233fb8a [MERGE] forward port branch saas-11 up to 3d35aef5b0 2017-04-26 20:07:32 +02:00
Christophe Simonis 3d35aef5b0 [MERGE] forward port branch 9.0 up to 283b648c18 2017-04-26 19:46:46 +02:00
Christophe Simonis 11f8a2157d [FIX] base: res.lang: do not redefine _ variable 2017-04-26 19:45:27 +02:00
Christophe Simonis 283b648c18 [MERGE] forward port branch saas-6 up to 5c05e39713 2017-04-26 19:41:00 +02:00
Christophe Simonis 5c05e39713 [MERGE] forward port branch 8.0 up to 2a65b8156d 2017-04-26 19:38:17 +02:00
Christophe Simonis 2a65b8156d [FIX] base: run defined modifiers tests 2017-04-26 19:36:10 +02:00
Nicolas Lempereur 551719a81e [FIX] mass_mailing: mail template not in english
Mass mailing `mail templates` when selected in a mass mailing are
always used in the english version.

But when another language is involved the edition of mass mailing
`templates` had a number of issue. For example saving the edited english
would only modify the user current language.

These issues are cause because the widget with snippets used for mass
mailing templates edition is not compatible.

Several fixes were proposed, what was choosen finally was to use the
correct widget with the following behavior changes:

- the snippets are not showed anymore in mass mailing templates,
- the current language can be edited and is saved rightly,

The shortcoming this give mass mailing templates can be partly
compensated by:

- editing the template back (if someone want the old behavior),
- duplicating mass mailings which keep the snippets and translations,
- doing a customization to improve the situation

closes #16255
fixes #16165
opw-726746 opw-727232

note: this fix is only needed for 9.0 and saas-11.
2017-04-26 18:37:53 +02:00
Nicolas Lempereur cd2b07ea44 [FIX] pad: remove wrong warning at pad creation
When creating a pad before this change these were the steps:

- modify pad URL for new pad URL
- end of record loading

This caused an issue because modifying the record at this point would
mark it as dirty before displaying it (which would result in a erroneous
warning "The record has been modified, your changes will be discarded.
Are you sure you want to leave this page ?").

With this fix:

- modifying the pad URL is done after the record is ready

- deferred have been unified (to remove possible race conditions)

closes #15239
opw-702797

forward port note: this change is needed up to saas-15, over saas-15
only a small part is needed (because x2many views are loaded with the
root view and there is one widget instance per record).

code note: it would be better to modify load_record of form view and
delay `record_loaded` upto after x2many views are loaded, but possible
impacts have been judged too risky so this is done only in pad widget.
2017-04-26 18:32:18 +02:00
Wolfgang Taferner fe70f0711f [FIX] point_of_sale: backport of a2319b4 + fix
When a PoS order is closed, the payment and the sales journal item are
not automatically reconciled. This potentially leaves a lot of
unreconciled entries for a customer, which will appear in his follow-up
report.

This introduces an auto-reconciliation process upon order closing. The
process restricts the reconciliation to an order individually, i.e. we
don't try to cross-reconcile several orders for a customer.

opw-697565

Add missing sudo to allow a user without accounting rights to close a session
and reconcile entries.

Closes #16517
2017-04-26 17:00:46 +02:00
Alexis de Lattre 7e1a523fbf [FIX] product: missing string on field
Closes #16640
2017-04-26 15:37:20 +02:00
Raphael Collet 482fec4838 [FIX] models: support removing an ir.model.fields that no longer appears on model 2017-04-26 15:23:06 +02:00
Raphael Collet 4287a70110 [FIX] models: remove ir.model.fields that no longer exist in registry
This fixes the following issue.  Assume a custom field F is created on
`res.partner`.  This field will appear on `res.users` as an inherited field,
and will be reflected in `ir.model.fields` as a 'base' field.  When F is
removed from the parent model, it no longer appears on the child model in
registry, but remains in `ir.model.fields`.

The patch allows the proper removal of the no-longer-inherited field from
`ir.model.fields`.
2017-04-26 15:11:07 +02:00
Nicolas Martinelli 831322bb92 [FIX] hr_expense: expense lines > and < 0
- Create an expense sheet
- Line 1 is 500
- Line 2 is -200
- The total is 300 => a payment of 300 is made

When the payment is validated, the expense is not set as paid.

In v10, one expense line = one account move. In order to know if the
expense is paid we check that each account move is completely
reconciled. The account move of 500 is never completely reconciled by
the payment of 300, so the expense stays opened.

This simply cannot be supported in v10, since each expense line is
handled in a separate account move.

opw-740492
2017-04-26 14:49:37 +02:00
Pierre Masereel e3cd54bb1d [FIX] pylint: using variable before assignment
Since last version (1.7) of pylint, new errors have been detected.

Related to rev: https://github.com/odoo/odoo/commit/ecac88dcc074b81ede4925a75080e8d2b4975924
2017-04-26 14:16:51 +02:00
Nicolas Martinelli 33630d8f42 [FIX] sale, sale_stock: inconsistent decorator
The decorator is inconsistent, and actually useless.

opw-740787
2017-04-26 11:26:46 +02:00
Xavier Morel 0550da4d88 [FIX] mrp: public/rpc methods not returning any value
XML-RPC can't serialize None, as a result methods callable over RPC
must return something (True, False, an actual value) otherwise an
error is generated when their result is serialized and sent back to
the client. It happens that JSON-RPC has different limitations and can
serialize None, so MRP had multiple button/action methods which could
be called over JSON-RPC but would break when called in XML-RPC for no
reason.

Fix them by returning `True` or result of `write`.

OPW-728844
2017-04-25 15:41:31 +02:00
Martin Trigaux 79519ce400 [FIX] registry: load inheritS models too
When adding a field on a model, only the _inherit were checked, not the _inherits.

This commit fixes the following bug:
1. install `sale` (adding the field `sale_order_count` on `res.partner`)
   - field `sale_order_count` is created on `res.partner`
   - the ir.model.field is tagged with module `sale`

2. install `point_of_sale` (adding another field on `res.users`)
   - field `sale_order_count` is created on `res.users`
   - the ir.model.field is tagged with module `point_of_sale`

When installing sale, the model res.partner is returned in the list of impacted
models, on which _create_fields method is called but not res.users.

A direct consequence of this bug is that, the fields translations are in the
wrong module. May fix some uninstallation bugs too.

Closes #16104
2017-04-25 14:20:34 +02:00
Goffin Simon 7416afed57 [FIX] account: Impossible to call pay_and_reconcile by rpc
In 9.0 the argument pay_journal in function pay_and_reconcile must be an id
but in 10.0, pay_journal must be a recordset with one element. So it was
not possible to call this method by rpc in 10.0

opw:725737
2017-04-25 13:38:42 +02:00
Goffin Simon e25b191b0a [FIX] web_kanban: _is_quick_create_enabled grouping by day, month or year
When grouping by day, by month or by year on a field date in kanban view,
it raised a traceback.

opw:727266
2017-04-25 13:28:46 +02:00
Wolfgang Taferner 29bc0d811d [FIX] base: Make sure start time is not undefined
As debugging might be enabled during runtime we need to make sure that
the condition does only pass in case start time is defined
2017-04-25 12:43:33 +02:00
Christophe Simonis 42bb9aab27 [FIX] hr_maintenance: allow to search and group equipments on employees and departments 2017-04-25 12:19:31 +02:00
Olivier Colson 863f46ec71 [FIX] resource: conditions on id
Don't check ids with "id is None" statements, as it won't match if id is False. This caused some bugs with MRP when confirming a MO with no calendar defined, if mrp_operations was installed.
2017-04-25 11:49:01 +02:00
Jeremy Kersten d5384f8f9d [FIX] website_portal: portal user don't have access to website.company_id
Avoid portal user to receive 403 when trying to edit vat code on /my/account
There are no risk to read field in sudo in this case.

opw-740314
2017-04-25 10:56:34 +02:00
Rogan 83ec253b78 [CLA] signature for RoganW
Closes #16608
2017-04-25 10:33:44 +02:00
Goffin Simon 4c8c996f4d [FIX] payment: Deleting payment tokens from website
When deleting payment tokens from website, in My account, by clicking
on button "Manage your payment methods", the public user, the user and
the portal user got a 403 error. But when creating a subscription
for a customer with admin user and setting a payment token for
the company of this customer. This payment token could not be deleted
or modified by its users. In a few cases, it's needed to delete or
modify a payment token, for example, when the expiration date of
the payment token is expired.

opw:740169
2017-04-25 09:53:18 +02:00
Martin Trigaux 08fcda5c94 [CLA] realsaiko no longer works for vialaurea
Closes #16599
2017-04-25 09:20:04 +02:00
Goffin Simon 7d15a6e6d6 [FIX] payment_stripe: handler.open in deferred
As explained in https://stripe.com/docs/checkout#integration-more-runloop
the function handler.open cannot be called in a deferred because it can
block in some browser.

opw:726101
2017-04-24 23:04:52 +02:00
SauliusZ cb999050bb [CLA] signature for realsaiko
Done at #16600
2017-04-24 15:02:23 +02:00
Nicolas Martinelli ec8699db17 [FIX] account: performance in issued total
When a partner has a lot of contacts, the computation of the issue total
takes a lot of time. Indeed, it performs the computation for the
partner, but also for all the children, despite the fact that the amount
is not displayed.

opw-726355
2017-04-24 13:27:02 +02:00
Xavier Morel 577d986391 [FIX] account: subtract refund amount from "awaiting payments" total
Currently the amounts of all invoices (linked to sale or purchase
journals) is summed regardless of these invoices being bills or
refunds, this means e.g. if you create an invoice for 1000 then a
refund for 500 on this invoice, the dashboard will display an
"awaiting payment" total of 1500 which while technically correct is
not really logical or helpful from a user's POV.

Fix summation to take in account the invoice type (invoice or refund)
and remove refund amount from the total amount.

Intent validated by @lap-odoo, also not ignoring or removing refunds
from count to avoid situations like "0 Awaiting Payments [for] $-1200"
which would be really strange.

OPW-728860
2017-04-24 11:58:42 +02:00
Goffin Simon 5b50284127 [FIX] point_of_sale: fiscal position with included taxes in POS
To substract the included tax from the unit price when it's mapped
by a fiscal position in the POS.

To keep the same behavior introduced by this commit odoo@503820a

opw:710437
2017-04-24 11:40:25 +02:00
BizzAppDev 3f6e573c67 [FIX] marketing_campaign: typo in search function
Courtesy of BizzAppDev

Closes #16588
2017-04-24 11:29:30 +02:00
Christophe Simonis eb672d81e6 [MERGE] forward port branch saas-11 up to b5b8239870 2017-04-24 11:09:52 +02:00
Christophe Simonis b5b8239870 [MERGE] forward port branch 9.0 up to 9e6860a228 2017-04-24 11:07:55 +02:00
Xavier Morel aab90cc5bd [FIX] crm: recompute mail.alias defaults when *unsetting* use_leads on teams
Default mail.alias for crm.team are currently recomputed/modified
when *setting* use_leads on the team (type changes from opportunity to
leads), but not the other way around (*unsetting* use_leads doesn't
rollback type to opportunity).

Fix this issue.

Leaves over the issue that *disabling* the global setting doesn't
recompute aliases, which it probably should.

OPW-728690
2017-04-24 10:10:33 +02:00
amoyaux 834b38a84d [FIX] stock : traceback pivot view for stock moves
Use case when it can happens (non deterministic):
- Enable product variant
- Have different stock moves with the product variant
- Click on the stock moves in the section reports
- Switch to pivot view
-> Traceback : can't find path of null

This happens in the js in the function find_path_in_tree,
this function try to find path for children object. There is
a condition root.children[i].path[l] === path[l] (2 strings
comparaison).

With product variant this condition can be overpass when it should
have been triggered. The product path string is represented as follow
[Ref]Name(variants) -> Sometime the variants in the string do not have
the same order and thus the condition is never true and the function
return null instead of the correct root.

This commit corrects the name_get function for product product
in order to always return the variants in the same order.
2017-04-24 09:26:54 +02:00
Nicolas Martinelli 9e6860a228 [FIX] web: make DB name more flexible 2017-04-24 08:02:22 +02:00
Odoo Translation Bot 07c563e075 [I18N] Update translation terms from Transifex 2017-04-23 04:30:51 +02:00
Odoo Translation Bot 91c00bc011 [I18N] Update translation terms from Transifex 2017-04-23 00:31:08 +02:00
xmo-odoo f5e197570b [FIX] translation 2017-04-21 14:46:05 +02:00
Christophe Simonis 814c550913 [MERGE] forward port branch saas-11 up to a0ff1f2ad8 2017-04-21 14:34:11 +02:00