Commit Graph
100990 Commits
Author SHA1 Message Date
Denis Ledoux f4006d22ef [FIX] crm: allow Settings users to set generate_sales_team_alias
The change of value of this param can lead to the
unlink of an `ir.values`, which can be performed
only by sudo.

opw-671469
2016-03-09 11:24:09 +01:00
Damien Bouvy d69d08cfb1 [DOC] views: calender 'event_open_popup' is disabled by default 2016-03-09 10:35:58 +01:00
Goffin Simon 6cb518d530 [FIX] website_portal: state_options
Inspired from 1ef52c9

opw:668271
2016-03-09 09:26:21 +01:00
Damien Bouvy 7d90640fd0 [DOC] backend tutorial: end_date field should be on session class 2016-03-09 09:23:53 +01:00
Damien Bouvy 15b8f3586c [FIX] website_portal_sale: let ACL do their job
Specifying the partner_id in the search does not give the same
result as the portal_sale module, which actually lists all the
SOs/Quotes/Invoices where you or anyone from your company is the
partner_id. To make the backend and frontend listings consistent,
let the ACL and ir_rules do their job (these are defined in the
portal_sale module).
2016-03-09 09:23:43 +01:00
Denis Ledoux 9fa597c9c2 [FIX] point_of_sale: sessions closing performances
`account.move.line.company_id` is a related
to `account_id.company_id`

`account.bank.statement.company_id` is a related
to `journal_id.company_id`

Any attempt to set the `company_id` value
when creating or writing records for these models
will result to the update of the value in
the related record (the update of `company_id` in the
`account.account and the `account.journal`), which
will result in the update of the `company_id` value in all
records in which this related record is used
(in all `account.move.line` where this `account_id` is used,
in all `account.bank.statement` where this `journal_id` is used).

In other words, the more a database had `account.move.line`
or `account.bank.statement` records, the more
it took time for the pos sessions to be closed.

To force a company for an `account.move.line`
(`account.bank.statement`), you must just
set the correct `account_id`(`journal_id`)
in the first place.

For instance, for the `account_id`, passing
`force_company` in the context ensure to choose
the `account.account` from the right company
property.

See
`local_context = dict(context or {}, force_company=company_id)`
which is set in `_confirm_orders` just before calling
`_create_account_move_line` which retrieve
the account from the
`property_account_receivable_id` property.

opw-671362
2016-03-08 17:55:52 +01:00
Denis Ledoux 002722b967 [FIX] mail: Discuss > Send mail sends a private message
For a message to be considered as a private message,
the message must have:
 - `no_auto_thread` set to `False`
   in other words, it must not be attached to a thread
 - no `model` or `res_id` must be set on the message
   meaning the message is not attached to a specific
   record thread.

See `_get_message_id` in `mail/models/mail_message.py`.

Before this revision, the mails sent from
`Discuss` > `Send mail` were not regarded
as private messages,
but as a kind of mass mailing messages,
with a `reply-to` wrongly set.
Any attempt to reply to these mails
failed with a delivery failure notification.

This was because the `message-id` of these messages
contained `reply-to`, and such message-ids are
treated as a special case in the messages routing
(basically, the match on the mail references is disabled
for these messages containing `reply-to` in
their message-id).

opw-669241
2016-03-08 15:38:10 +01:00
Nicolas Martinelli 04f7858159 [FIX] mrp_operations: search function for date_planned_end
Commit bfa68b433 adds the field `date_planned_end` in the Gantt view.
However, the Gant view will perform search on this field, which is an
issue since it is a computed field without any `fct_search` defined.

opw-669042
2016-03-08 14:15:04 +01:00
Nicolas Martinelli e8bc1c7e6b [FIX] mail: followers: allow edit subtypes even if not follower
Partial backport of 27e92415a. The JS modification is not applied, in
case any extension would use `records_length`.

opw-668781
2016-03-08 11:05:27 +01:00
Denis Ledoux 84b45515bd [FIX] hr: mention suggestions, exclude disabled employees partners
It was possible to mention an employee despite the
fact the associated partner and user were
both disabled.

opw-671130
2016-03-07 18:22:41 +01:00
Yannick Tivisse 240417be1e [FIX] hr_holidays: date_from and date_to missing on hr.holidays tree view 2016-03-07 16:43:37 +01:00
Yannick Tivisse 9a56bf5fe4 [IMP] account: email notification button for all users
The access/follow/actions buttons on the notification email template
are sent only to employee. For this particular business model when
want all the users to receive them, as the portal users.
2016-03-07 14:24:18 +01:00
Yannick Tivisse 0c2bbf6da6 [FIX] website_project_issue: Don't always display 'View Issue'
This override was always sending the document to all the recipients.
If the user is only a follower, he sees the button but cannot access
to My Account as he's not a user.
2016-03-07 14:24:18 +01:00
Yannick Tivisse 271840a282 [FIX] project_issue: Allow portal customer to see their own issues
Some computed fields have been added in v9 and are calling the method
_compute_day. This method accesses the project related to the issue
So a user portal is able to see his own issue, but cannot open the
form view as the prefetching is loading the fields. Hiding them in
the group base.group_user doesn't have any effect as the compute method
is called on the read. These information may have their importance to
the customer too.

We decided to compute these fields on superuser access rights.

Also the field project_id is displayed on the project_issue form view.
As this information is internal, we're hiding this also under the employee
group.
2016-03-07 14:24:18 +01:00
Yannick Tivisse f7c4b5b65e [IMP] project_issue: email notification button for all users
The access/follow/actions buttons on the notification email template
are sent only to employee. For this particular business model when
want all the users to receive them, as the portal users.
2016-03-07 14:24:18 +01:00
Yannick Tivisse 38f0e1f122 [IMP] sale: email notification button for all users
The access/follow/actions buttons on the notification email template
are sent only to employee. For this particular business model when
want all the users to receive them, as the portal users.
2016-03-07 14:24:18 +01:00
Trevor Bekolay d28cde3e30 [FIX] mrp_repair: fix description metadata
Avoid the string 'summary' to be included in the description

Closes #11219
2016-03-07 14:16:17 +01:00
Trevor Bekolay 75a33d5c87 [CLA] sign CLA for Applied Brain Research 2016-03-07 14:11:29 +01:00
Nicolas Martinelli b30afcbdb9 [IMP] sale_stock: set partially delivered products to fully invoiced 2016-03-07 14:02:44 +01:00
Goffin Simon fcc733241c [FIX] stock: wrong state in delivery slip report
When the stock.picking record is linked to some pack.operation records,
the move line state displayed has to be the move line with the same product as
the one in the pack operation record.

opw:671192
2016-03-07 13:18:23 +01:00
Goffin Simon 9519ad42ea [FIX] product: _check_valid_attribute
All the ids must be checked.
Introduced by 856b31719c
2016-03-07 13:03:36 +01:00
Denis Ledoux a37bd77895 [FIX] mail: mark all as read, remove notification as sudo
As it's done few lines below,
in `set_message_done`.

The user could have a notication associated
to a message he has not, or no longer, the
write access, but he should still be able
to mark it as read.

opw-671188
2016-03-07 11:21:42 +01:00
Nicolas Martinelli 018b53bc15 [FIX] product: do not add same attribute on product
Adding an attribute with only one value does not recreate the product,
but write this attribute on every product instead. However, the current
filter is not correct: it checks if the given attribute value is not
already in the list of attribute values of the product.

The appropriate check is to verify that the attribute itself is not
already in the list of attributes of the product. Indeed, there is a
constraint to prevent the same attribute to have two different values on
the same product.

BTW, it's a new api function (`mapped`) inside an old api module. Not
the cleanest way to do it, but simpler to write.

opw-671114
2016-03-07 10:08:17 +01:00
Odoo Translation Bot 7d3d9272bf [I18N] Update translation terms from Transifex 2016-03-06 00:33:40 +01:00
sha-odoo 8266a41a66 [IMP] l10n_jp: Added post migration file 2016-03-04 18:03:14 +01:00
sha-odoo 98df903af3 [IMP] l10n_jp: Created tags and Assign to Taxes 2016-03-04 18:03:09 +01:00
rmu-odoo 13ec67c847 [IMP] l10n_hu: Added post migration file 2016-03-04 17:52:18 +01:00
rmu-odoo d474dce528 [IMP] l10n_hu: Created tags and Assign to Taxes 2016-03-04 17:52:13 +01:00
Martin Trigaux c811ebb337 [FIX] doc: reference to Launchpad for translations 2016-03-04 17:31:47 +01:00
Denis Ledoux af174897ab [FIX] website_sale, website_sale_options: currencies
Adaptations following rev. 1684ae4:
    The website pricelist is now dynamic, according
    to the pricelist chosen by the customer on the website.
    It's no longer a static pricelist, it's no longer
    the public user pricelist.

    Therefore, when computing the variants prices,
    the prices should no longer be converted
    from the public user pricelist to the current (context)
    pricelist, but from the product currency to the
    current pricelist chosen by the customer on the website

    In addition, when getting the unit price,
    `/shop/get_unit_price`,
    the website current pricelist should always be used,
    it should never fall back on the partner pricelist,
    as, it's the user who choose his pricelist from the website
    now (if he has specific set on his partner
    form, it's that one which is loaded by default, and which
    is returned by the website.pricelist_id)

    In addition, the displayed currency on the ecommerce
    must always be the current website pricelist currency

Adaptations following rev. 3622c0d:
    A product can have no company set (not required).
    Therefore, when attempting to set the `from_currency`
    to the product company currency, this could return
    `None`, if no company was set on the product.
    `product.currency_id` ensures to always return a currency
    for the product. It's the company currency
    if the product has a company set, otherwise it take it from
    the main company (`base.main_company`).

    In addition, when editing the product price from the website,
    the price must be displayed within the product currency,
    as, if changed by the user, it changes the product sales
    price directly on the product form, without any currency
    conversion applied or whatever.

opw-670898
opw-671100
2016-03-04 16:34:17 +01:00
Damien Bouvy 161e85a1dc [FIX] website_quote: do not force send the quotation in case of payment error
Mirror code, mirror fix: 84573fe
2016-03-04 15:37:39 +01:00
Nicolas Lempereur 3e48ee634f [FIX] base: fix ir.actions.todo after module install
When installing or upgrating a module via the apps managing view, the
module updates are applied in a new cursor. So when getting the action
to do after updating the module, we need to have a transaction current
with commited transaction.

closes #11216
opw-660269
2016-03-04 15:20:07 +01:00
Christophe Simonis e46f65ab26 [MERGE] forward port of branch saas-6 up to 62fc257 2016-03-04 15:03:39 +01:00
Christophe Simonis 62fc2571c0 [MERGE] forward port of branch 8.0 up to 40fdb84 2016-03-04 14:33:37 +01:00
Nicolas Martinelli 501e09ba94 [FIX] product: name in formula
When the user selects a pricelist based on a formula, the name in the
formula is the same if "Public Price" or "Cost" is selected.

opw-670563
2016-03-04 12:04:33 +01:00
Nicolas Martinelli 8528651d22 [FIX] product: unnecessary default pricelist
Commit cf62fdb4 introduces a default pricelist item for any new
pricelist. Therefore, this default data is not necessary anymore, and
leads to two identical pricelist items created by default for the
"Public Pricelist".
2016-03-04 12:04:33 +01:00
Denis Ledoux b5c3598eb1 [FIX] membership: membership dialog form in partner form
The dialog form opened when clicking on a membership line,
in the "Membership" tab of the partner form,
was just unbearable.

This revision improves the readability of
this dialog form.

opw-671144
2016-03-04 11:48:26 +01:00
Joren Van Onder 7ec5db206e [FIX] point_of_sale: prevent crashes on older iOS devices
On older iOS devices (like the iPad 2) webkit would crash when clicking
on the closing button. Newer devices like the iPad Air 2 and iPad Mini 3
do not exhibit this behavior. This occurs on iOS 9.2.1 but I expect iOS
in general is affected by this. This affects both Safari and Chrome as
on iOS they both use the same rendering engine.

When the POS closes it searches the xml_id containing the action ID,
which seems to trigger the webkit crash. So instead we will use the
xml_id directly in the URL, that's simpler anyway and it avoids an
unnecessary RPC call. Functionally this means you won't get the 'Your
internet connection is probably down' message anymore, but it's useless
anyway, as after closing the popup the webpage is blocked anyway.

A log of the crash can sometimes be seen in the iOS diagnostics logs
which indicates com.apple.WebKit.WebContent crashing due to
EXC_BAD_ACCESS (SIGSEGV). This log is not always present, but that's not
unusual for out of memory issues on iOS [1]. Presumably the segmentation
fault is caused by iOS forcefully freeing memory being used by the
browser.

iOS manages memory in an unusual way. Plenty of developer reports are
available online which indicate this [2], but no official documentation
from Apple exists that specifies exact memory limit amounts.

[1] http://stackoverflow.com/questions/16400431/ios-app-crashes-with-no-error-and-no-crash-report
[2] http://stackoverflow.com/questions/16319486/ios-ipad-has-1gb-ram-why-is-my-app-killed-after-using-30mb

opw-668268
2016-03-04 09:41:51 +01:00
Olivier Dony 40fdb841ae [FIX] auth_signup: readonly empty login field on signup
Closes #9367
Fixes #11180
2016-03-03 17:52:13 +01:00
Simon Lejeune 14fdabb4bc [REF] tests: inline the full docstring in the logs
meaningless entries like
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough
become
` Checks that the bundle's cache is working, i.e. that a bundle creates only enough ir.attachment records when rendered multiple times

see https://docs.python.org/2/library/unittest.html#unittest.TestCase.shortDescription
2016-03-03 17:45:19 +01:00
Simon Lejeune 9631a30228 [FIX] ir_qweb: don't use a stylesheet cached by another bundle.
An issue could arise if a preprocessed stylesheet asset is present
in multiple bundles: the first bundle will cache a version of this
file (identified by its url) and the second one will cache another
one. The next time the first bundle is rendered in debug mode, it
will use the last created record of the asset.

This could lead to design issues as, for instance, a less asset
could change according to another less asset included in the bundle.

We fix this issue by adding the xmlid of the bundle in the url's
asset. This fix another inconsistency as the compiled version of
an asset is reachable with an url that is not dependent of its
bundle, so if the asset is present in multiple bundle it could
return different values.

Note: this only concern the debug mode
2016-03-03 17:38:20 +01:00
Denis Ledoux 0806506c9c [FIX] sale: sales stats button on product with multiple variants
`default_search_product_id` with several ids simply can't work.

The only way to do it is using a domain in the action.
Anyway, this is unlikely that the user would like
to remove the domain (which is the main interest
of using a filter, the possibility to remove it), as
this will display all sales orders lines, whatever the products,
all mixed up. This is not super-useful.

opw-671022
2016-03-03 17:36:37 +01:00
Raphael Collet a4ea258176 [FIX] fields: company-dependent (property) fields should not be stored or copied 2016-03-03 16:47:05 +01:00
Christophe Matthieu bc4561b26b [FIX] web_editor: can't use mako/jija if remove space to prettify html
Addapt html method to prettify the html code and keep mako structures.

opw-668409
2016-03-03 15:41:02 +01:00
Christophe Matthieu 1320ad8cfe [FIX] mail: button_access is undefined in mail template preview
opw-668409
2016-03-03 15:41:02 +01:00
eLBati e0555a66e1 [FIX] account: amount_currency when grouping invoice lines
when using a journal with 'Group Invoice Lines'
and issuing an invoice with foreign currency with more than 1 line
(of the same product, or no product),
the amount currency in the journal item
associated to the merged invoice lines was wrong.

It took into account the `amount_currency` of the first line only,
ignoring the `amount_currency` of the remaining merged lines.

opw-670972
Closes #10375
2016-03-03 15:07:10 +01:00
Martin Trigaux 7952a57b45 [FIX] l10n_multilang: create translations in master lang
When creating the account translations using the account template translations
read it without the environment language.

Otherwise, when the translation is created, the content of `element.name` (the
source term to translate) might be in a different language and already
translated.

This was introduce during the migration at the new API where previous code did
not propagate the context (probably by accident).
2016-03-03 13:56:06 +01:00
Denis Ledoux 14282f1659 [FIX] report, website_report: barcode widget
Up to this revision, barcodes set in reports are generated
using the controller `/report/barcode`,
using a `img` HTML tag, e.g. (from `report_location_barcode`)
```
<img t-if="not o.loc_barcode"
     t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s'
     % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
``

This `/report/barcode` route is set as `auth='user'`, meaning
the route can only be accessed by signed in users.

When wkhtmltopdf prints a report containing such a barcode,
it calls this `report/barcode` route, making sure to pass
the request session in the cookies, so wkhtmltopdf
uses the same session than the one of the user. This is
needed, as only users can access this `report/barcode/` route.

This session is passed in `report.py`, in the method
`_run_wkhtmltopdf`, thanks to the --cookie wkhtmltopdf
parameter.

Nevertheless, if a report is printed through the website
front-end, as public (without a signed in user), the request
session is not associated to a signed in user, and therefore
the route `/report/barcode` refuses the access / redirects
to the login, making it impossible to print a report
containing a barcode without being signed in. This even
if the report is printed as `sudo` through a controller
(as this is the session of the not signed in user which is passed,
not a session associated to `sudo).

Fixes #10621
opw-667797
2016-03-03 13:51:44 +01:00
Martin Trigaux 5be9619738 [FIX] l10n_multilang: translate accounts after the installation of a CoA
Before this commit, the only way to translate a chart of account was to install
the language (if present in 'spoken_language' field on the chart of account
configuration) **before** the installation of the chart of account.

This commit loads the translations of the chart of account at the installation
of the language too.

To avoid recreating translations at each update of a language, skip if the
language is already installed.
This means than, to benefit from the fix, already deployed instances should
remove (after de-activating it) the language and reinstall it to translate
existing chart of account.

opw-670327

Closes #11091
2016-03-03 13:50:09 +01:00
Nicolas Martinelli 88e7122020 [FIX] mail: mail_server_id
When a specific SMTP server is set on a mail template, it is never used
when the mail is sent. There are two reasons:
- `mail_server_id` is a read-only field set by an onchange. However, a
  read-only field is not sent to the server, so the information is lost.
- The information is stored in the context of the object `Mail`, but it
  is never used. Moreover, when the method `message_post` is called, the
  `Mail` object is not used to post the message, so the information is
  lost again.

The fix includes two parts:
- the `mail_server_id` field is not read-only anymore. Actually, there
  is no reason to make it read-only.
- the information is stored directly in the mail values and used at the
  appropriate moment.

Fixes #6554 (from v9.0)
opw-669958
2016-03-03 13:24:41 +01:00