Commit Graph
103218 Commits
Author SHA1 Message Date
Xavier Morel e3a2448ebe [ADD] form builder whitelisting: ACL check
Only users who can edit the website's structure should be allowed to
whitelist fields.
2015-11-30 16:39:13 +01:00
Xavier Morel 2afb5b43ef [IMP] form builder fields blacklisting
* blacklist all fields by default
* don't use blacklist in get_authorized_fields which is called to see if
  a field can be added to a form, instead only use it afterwards to see
  if the field can be written to by the formbuilder. That way
  formbuilder can whitelist fields which are actually added to forms
  on-demand resulting in a more secure interaction
2015-11-30 16:39:13 +01:00
Xavier Morel 2769029eef [IMP] make form builder opt-in update
In noupdate, the opt-in setting is ignored by migrations and breaks the
corresponding feature. If the feature is undesirable, don't install the
module.
2015-11-30 16:39:13 +01:00
Denis Ledoux 37c95517c7 [MERGE] forward port of branch 8.0 up to eb5d95b 2015-11-30 15:06:41 +01:00
Denis Ledoux 31e8bb8e9d [FIX] mail: better signature detection
This revision back-ports revisions
983d5eb9fa
&
ccbb8e09a6
regarding this signature regex.

Besides, it adds the fact the dashes have to
be at the beginning of the line
to make them detected as a signature.

opw-655834
2015-11-30 14:48:59 +01:00
Denis Ledoux eb5d95b135 [FIX] product: _get_image_variant is used for the field image
This revision is related to 93d4db9d1e.

Usually, for models with an image, the original `image` is stored
in the field `image`, and then the resized value are in the fields
`image_medium` & `image_small`.

In the specific case of the product variant, this is not the case,
the original image is stored in the field `image_variant`,
and the `image` field uses as well the method `_get_image_variant`.

The `image_get_resized_images` must therefore return the "big image"
as well, which is returned with the key `image`, by default.
This is done using the method argument `return_big`.
2015-11-30 13:51:25 +01:00
Denis Ledoux 6175a1b8cf [FIX] website_sale_stock: access rights to print the delivery order
A portal could not print the delivery order report
if the products of the picking were not published.

opw-657743
2015-11-30 13:40:14 +01:00
Martin Trigaux 44248a07a5 [FIX] base,share: error in_group_xx on user form
res.users form contains virtual fields in_group_ID to be added in res.groups.
Groups with boolean share=True (added by share module) must not be displayed in
the form and should not be modifiable through the user interface.
However, if a module adding/modifying a res.group is earlier in the dependency
graph than 'share' (e.g. only depends from 'base'), the update of the user view
is done before share is loaded and the overrride of 'get_application_groups' is
never executed.

As we can not guarantee that the module is share loaded, put the logic of
hidding the module in base instead of share.

This workaround is quite hacky but is necessary in stable version.
Better fix in 9.0 at cf63d4d

Fixes #6324
Fixes #5820
2015-11-30 13:11:02 +01:00
Nicolas Martinelli f2aea91b4a [IMP] stock: add picking partner_id
Add a related field to the partner_id of the picking. Note that
partner_id on stock.move is different from partner_id on stock.picking
in case of dropshipping, therefore we need to show both fields.

opw-656298
2015-11-30 13:07:27 +01:00
Denis Ledoux 93d4db9d1e [FIX] product: resized variant images
This is possible to set an image for a specific variant
When this was the case, the image displayed was always the
image within its original size, it wasn't resized
to small and medium sizes.

opw-657055
2015-11-30 13:06:16 +01:00
Denis Ledoux 6b772af15c [FIX] crm: on leads/opp, keep team if user is member of it
If a user was in multiple team,
and the salesman of a lead was changed to this user,
the team assigned to the lead might change even
if the user was part of the team already set.

opw-657814
2015-11-30 11:31:58 +01:00
qdp-odoo 901a3e030c [FIX] hr_expense: generation of accounting entries now work when selecting several expenses 2015-11-30 11:28:58 +01:00
Nicolas Lempereur 919678bed3 [FIX] web_editor: fallback to plain text when pasting
Depending of the location where the "Copying" happened, only text/plain
content could be available from the clipboard component.

So if no text/html was retrieved, we should fall back to plain text
pasting.

closes #9787
opw-657137
2015-11-30 10:35:35 +01:00
Goffin Simon 28463d0310 [FIX] delivery, stock_account: invoice on delivery with fiscal position
When creating an invoice on delivery, the right 'account_id' was not
set on the invoice line according to the fiscal position.

opw:657542
2015-11-30 09:46:38 +01:00
Nicolas Lempereur f77e44f2dd [FIX] website_mass_mailing: edit snippet newsletter
The "edit" action is on the "website.TopBar", which will create a new
instance of the "editor" (web_editor.editor) widget.

So if we want to do something when the "editing" start, we have to
either override "edit" of the TopBar, or override "start" or "init" of
the editor.

opw-657662
2015-11-30 09:04:16 +01:00
Odoo Translation Bot b8dfa91613 [I18N] Update translation terms from Transifex 2015-11-29 02:58:05 +01:00
Alexandre Fayolle 49ed380e72 [FIX] sale: customer_portal settings
website_sale_digital and website_portal are in community edition, so use normal boolean
widget instead of upgrade widget.
2015-11-28 23:26:59 +01:00
Nicolas Lempereur da2e4c86a4 [IMP] account: replace selection key in reconciliation
opw-653468

ff note: no need after saas-6
2015-11-27 17:49:21 +01:00
Denis Ledoux 261ccf7c56 [FIX] point_of_sale: quantity uses decimal separator of lang
This revision is related to 5a10903e9b.

The above revision makes so the decimal separator from the language
is used to display the prices.

This revision makes so this decimal separator is used as well
for quantities, to be coherent.

opw-657591
2015-11-27 17:26:31 +01:00
Denis Ledoux 4b003afd0a [FIX] point_of_sale: quantity decimals for new lines
In the pos interface,
when adding a product to the order,
the quantity was set to `1`,
but, when adding the same product again,
the quantity was set to `2.000`.

We use `set_quantity` to not
copy/paste what is already done
in this method to display
correctly the quantity within
the product unit of measure rounding.
2015-11-27 16:55:00 +01:00
qsm-odoo bba2e39fb8 [FIX] calendar: redirection after invitation email
When accepting/declining a calendar event invitation received by mail,
we landed on an empty gray webclient. The confirmation page had been
dropped with passage to new JS API / new calendar / new webclient.

Previous mechanism had been reimplemented: custom web client with event
information/confirmation if the user is not connected or redirection to
the event form view if the user is connected.

+ FIX manyattendeetag : the status circle did not turn red when an
user declined the invitation.
2015-11-27 16:20:32 +01:00
Nicolas Lempereur 2790bb4492 [IMP] web: minor css fix SelectCreateDialog
related to opw-657349
2015-11-27 15:08:43 +01:00
Invitu 52d2b7fbcf [FIX] auth_signup: translate password reset email
The password reset email is in the language of the user clicking on the button,
not in the one of the targeted user.

Fixes #9194
Closes ##9195
2015-11-27 15:02:54 +01:00
Invitu 837ef01c85 [CLA] add corporate signature for Invitu 2015-11-27 14:58:00 +01:00
Raphael Collet 5da3a758fc [IMP] base_action_rule: add old_values=None in context of actions done on create
In particular, when an automated action is defined on "create or update",
setting `old_values` to `None` allows to distinguish between a create and an
update.  Note that not setting `old_values` at all may be confusing: on a
create, it may be present because of an outer update...
2015-11-27 14:55:49 +01:00
Raphael Collet 2a1d6f7641 [IMP] base_action_rule: manage recursive triggering of automatic actions
The base action rules manage a kind of checklist with the records already
processed for each action.  This checklist may be populated by recursive calls
on other models (such as the update of relational fields), and guarantees that
a given action on a given record is executed at most once.
2015-11-27 14:55:49 +01:00
Raphael Collet 4bf1eb0bf6 [IMP] base_action_rule: introduce methods _filter_pre and _filter_post
Those methods improve the readability of the code.
2015-11-27 14:55:49 +01:00
Raphael Collet 6cdb388bc7 [IMP] base_action_rule: convert wrapped methods to the new API
This will ease the modification of the processing.
2015-11-27 14:55:49 +01:00
Raphael Collet 88005eaf43 [IMP] base_action_rule: add test on creating two records related by a one2many 2015-11-27 14:55:49 +01:00
Raphael Collet 328f2afc6b [FIX] base_action_rule: add missing field in onchange_kind 2015-11-27 14:55:49 +01:00
Denis Ledoux 03ec39d36b [FIX] models: custom models must add the table/column in database
This revision is related to 1b8c9aed9f

As `manual` is now the default value of the `state`,
if `state` is not given in the values when passed to
`create` or `write` of `ir.model` and `ir.model.fields`,
we must assume the value is `manual`, so the columns and tables
are instanciated in database

opw-657750
2015-11-27 13:58:28 +01:00
qsm-odoo fc731ff4ad [FIX] website_quote: signature color
When signing an online quotation the pen color depended on the theme
that was installed (white when theme graphene was installed).
2015-11-27 13:56:45 +01:00
Nicolas Martinelli 5790475e25 [IMP] account: currency of outstanding payments
Following commit 8a05e585, display outstanding payments in their own
currency.

opw-657151
2015-11-27 12:48:39 +01:00
Nicolas Martinelli e700badfa5 [FIX] account: invoice date of demo data
The invoice date of demo data is changed to match the current
month/year. The original issue is the following:
- install accounting, keep default configuration (company currency: USD)
- add a payment for Agrolait in USD (e.g. $10,000)
- go to customer invoice demo_invoice_2 (which is in EUR)
- the system proposes you to add a outstanding payment to pay the
  invoice -> do it

The invoice is not shown as fully paid, but on the other hand if you
click again to add an outstanding payment, nothing happens.

The reason of this bug is because for this specific bill, the currency
rate has changed between the invoice date and the payment date. The
amount used to pay the bill: this is the price in USD, at the rate
corresponding to the date of the invoice (i.e., what you were supposed
to pay at the time of invoicing). The fact that is does not mark your
bill as paid is also correct: the payment is written with the rate at
the date of the payment, and in this case, the invoice is not fully
paid. You should therefore reconcile the invoice and create a write-off
afterwards to register the exchange rate difference.

This unusual situation (pay an invoice in a different currency, and
moreover the rate has changed) has not been taken into account for v9,
and there is no clean solution which can be foreseen for a stable
version.

However, since this situation arises right away with the demo data, this
can be very misleading for a new user. The fix simply changes the date
of the invoices, so that there will be no rate change between the
invoice date and the payment date with the demo data.

opw-657151
2015-11-27 12:48:38 +01:00
Nicolas Martinelli 83181547f9 [FIX] purchase: stop when PO line found
If a PO line matching the procurement is found, stop the loop. This
would be an issue if more than one line match the criteria.
2015-11-27 12:47:13 +01:00
Nicolas Martinelli 2eccd6352f [FIX] sale_stock: restrict warning message
Warning message should be displayed only for stockable or consumable.
Before this fix, it would also apply to digital products.
2015-11-27 12:47:13 +01:00
Goffin Simon 5216063129 [FIX] website_sale: optional product quantity
When incrementing the quantity of a product in the cart, the optional
products linked to this product must be incremented too.

opw:653351
2015-11-27 12:45:40 +01:00
Nicolas Lempereur 7ddfd6285c [FIX] web_editor: update value at inline html save
In the base summernote library, each event modifying the editable area
DOM trigger an 'onChange' event which update the textarea associated
with the editor.

Some widget (ImageDialog) have been entirely rewritten for Odoo without
copying this behaviour. Hence for those components, if they were the
last to be used and only in the instance of inline backend editor
(FieldTextHtmlSimple widget), before saving updating the widget value by
the current editor value is required.

closes #9784
opw-654240
2015-11-27 12:40:55 +01:00
Géry Debongnie 2c84cd4181 [FIX] mail: various improvements/fixes
- display appropriate message when no results are found in a search
- don't display 'you have been invited' notif when creating private channel
- correctly join when a user was invited in a public channel
- display a message when a user join a channel through an invitation
- don't display subject for message of type notification (still a
  mystery why it happens in test.odoo.com for channel of type mailing)
- better heuristic on when to display message subject
- tweak sidebar text color (slightly whiter)
- add ... to the placeholder of the text area in the composer
- invert send and icons for attach/smiley in composer
- don't display 'read less' on expanded messages
- exclude livechat channels from channel mention suggestions
2015-11-27 11:47:34 +01:00
Aaron Bohy db8203c27a [FIX] base,hr,mail: prefetch mention suggestions
The purpose of this commit is to improve the overall performance of the mention
mechanism of the client action and chatter composer, by pre-fetching some data.

First, the employees are fetched at chat initialization (basically, at web
client initialization), if hr is installed.

Second, when focusing on the composer of a channel, the members of this channel
are fetched. In the case of a chatter, the members are already known as they
are the followers of the document.

When the user types a mention, we first display suggestions from the pre-fetched
partners, and we only perform an RPC when there are no more result matching the
search string. This RPC searches among user, and then partners if there aren't
enough matches.

A few side changes occurred:
  - auto_join set to True on user_ids field of res.partner to boost the query
    that searches partners that are users
  - the '/mail/read_followers' route now returns follower's email as well, as
    we need it for the mention;
  - a partner can now be mentionned several times in the same message;
  - mentionned partner previsualization has been removed, mainly because of
    the previous point, but also because it simplifies the code;
2015-11-27 11:47:34 +01:00
qdp-odoo 9ef3a9296d [FIX] account_bank_statement_import: raise proper error (osv not defined) 2015-11-27 11:05:12 +01:00
Olivier Dony 5b60c30a6a [FIX] l10n_eu_service: no reset of install wizard state
Hardcoding the state to `open` is useless as it is the
default state, and forces the state to reset upon every
update, which is annoying.
2015-11-26 18:15:47 +01:00
Denis Ledoux f9a462f3e2 [FIX] website: different assets_common according to user rights
The content of an asset can change according to which modules
are installed, but cannot change according to the user rights,
according to which user is connected.

Otherwise, the assets is re-generated  and stored
in the filesystem too often, which is against the
concept of the assets.

opw-657046
2015-11-26 18:08:42 +01:00
Denis Ledoux 12f77fa22f [FIX] mail: notify all partners of the thread
As stated in the comment:
```
all notified_partner_ids of the mail.message
have to be notified for the parented messages
```

Record rules are applied when browsing one2many fields.
Therefore, when browsing `message.notified_partner_ids`
with a user other than the SUPERUSER, the multi-company
rules are applied, and a regular user could therefore not see
all partners of the thread, according to which
company the partners are associated with.
Nevertheless, all partners of the thread have to be notified,
including the ones the regular user cannot see.

To reproduce the issue:
 - Create a second company 'Second company'
 - Create a third user, associated to the first company 'YourCompany'
 - Set the demo user as in the 'Second company'
 - Create a project 'test' in the first company, 'YourCompany'
 - In the followers of the project, add the Demo user,
   with as subtypes "Stages changes" only
 - As the third user, create a new task in this project
 - Change the stage of this task, as the third user [this is important]
 - Sign in as the demo user, and see that you cannot access
   your messages inbox, due to an access rights error.

opw-650563
2015-11-26 18:08:07 +01:00
Denis Ledoux 65b170b92c [FIX] analytic: missing depends to report
The model `report.account.report_analyticjournal`
inherit of the model `report.abstract_report`,
which is defined in the module `report`.

opw-657671
2015-11-26 17:22:53 +01:00
Thibault Delavallée fa015c4c2e [FIX] website_forum: edit post with tags
Tags are lost when editing a post as we handle the wrong parameter.
Editing a post should not erase its tags anymore.
2015-11-26 17:00:41 +01:00
Nicolas Lempereur 8423a0df34 [FIX] http: clear environment on checked called rollback
If the current cursor transaction was not empty when using the check
called endpoint, at the first call the cursor would be rollbacked but
the environment could still have outdated values.

This was an issue for example when selecting the route would trigger
database insert, for instance when a model was used in the route and
this model had also translatable prefetchable fields with tokens not
already present in ir.translation

opw-652045
2015-11-26 16:57:03 +01:00
Nicolas Lempereur 9d012d2157 [FIX] tools, base: typo for t-translation 2015-11-26 16:56:53 +01:00
Goffin Simon e9dadadd07 [FIX] account: Bank statement reconciliation
The partial reconciliation can just be proposed on the last selected line when:
self.get("balance") * (last_line.debit - last_line.credit)<0
2015-11-26 16:53:12 +01:00
qdp-odoo 8aeae17d78 [REF] sale, sale_stock: added some comments to clear some aspects of the code related to the last changes on SO (salepocalypse) 2015-11-26 16:42:14 +01:00