Commit Graph
111138 Commits
Author SHA1 Message Date
Christophe Simonis 9d04d14669 [MERGE] forward port branch 8.0 up to 08213e831e 2017-03-24 17:07:03 +01:00
Jairo Llopis e7fdd6df73 [IMP] website_event(_sale): make registration form responsive
+ remove redirect that create loop if not child menu and state == 'done'

TODO: make attendees registration popup responsive

This commit closes #15473
2017-03-24 17:03:20 +01:00
Christophe Simonis 08213e831e [REM] useless empty sql file wrongly commited by 0b529cf3af 2017-03-24 17:03:11 +01:00
Martin Trigaux dca85f6498 [I18N] sale: missing terms in sale 2017-03-24 16:56:17 +01:00
luisg123v 5d66082edf [CLA] add luisg123v to Vauxoo's CLA
Done at #16028
2017-03-24 16:32:58 +01:00
Nicolas Martinelli 906bde20c8 [FIX] mrp: "Unreserve" visibility
- Create a MO, components needed are 1 unit of Prod A and 1 unit of Prod
  B.
- Click on "Check Availability"

The button "Unreserve" does not appear unless all components are
available.

opw-724940
2017-03-24 15:51:42 +01:00
Damien Bouvy 52b3b1f1bf [FIX] purchase: don't raise if standard route is deleted
New api regression: xmlid_to_res_id() had the flag to raise set to
false by default while ref() does the opposite. Since the intent
here was clearly to allow not finding the record (given the if
condition under the ref call), avoid crashing for a simple default.
2017-03-24 15:39:25 +01:00
Jérome Maes 8bfc7ef2d5 [FIX] hr_timesheet_attendance: missing widget on pivot report
All total of hours should be displayed with float_time widget.
2017-03-24 15:37:48 +01:00
Christophe Simonis 8caac6bc44 [MERGE] forward port branch 8.0 up to 5847de4aaf 2017-03-24 15:23:16 +01:00
Christophe Simonis 5847de4aaf [FIX] web_calendar: remove attendee icons from event title 2017-03-24 15:12:39 +01:00
qsm-odoo b2d66d0c14 [FIX] web: properly combine domains with "OR" in CompoundDomain
The CompoundDomain class allows to regroup several domains with an
implicit "AND"; these domains can be either a string, an array or
another CompoundDomain. A CompoundDomain can then be converted to
an array thanks to pyeval.js.
For example, if a CompoundDomain is initialized with `[A, B]` and
`[C]`, the array conversion gave `[A, B, C]` (which is expected).

However, a hackish method was used with CompoundDomain. If one of the
domain of a CompoundDomain is equal to `["|"]` (an array with the
OR operator in it), the two next subdomains were supposed to be joined
by a OR operator. Indeed, for the case of a CompoundDomain initialized
with `["|"]`, `[A]` and `[B]`, the array conversion gave `["|", A, B]`
(which is expected). However, if initialized with `["|"]`, `[A, B]` and
`[C]`, the array conversion gave `["|", A, B, C]` which is very wrong
as what was expected is `["|", "&", A, B, C]`. The problem is that the
given `[A, B]` contains implicit "&" operators.

This commit fixes the problem by normalizing only if the CompoundDomain
starts with a ["|"] or ["!"] array which is the standard odoo case.
This allows to limit breaking custom code (e.g we want a simple "AND"
of `[A]` and `[B]` to stay `[A, B]`, not become `["&", A, B]`).

The commit also modifies a test so that it checks that the problem is
properly solved.
2017-03-24 15:03:54 +01:00
qsm-odoo 1a40e7b6c7 [FIX] report: allow to use Dialog API in report editor
When editing a report, the editor is launched in an iframe with an
environment which is different from backend and frontend. The problem
here is that the editor uses the `Dialog` API while the report editor
was not loading the associated xml file this API needs to work. Indeed,
when clicking on the "Discard" button for example, nothing seemed to
happen as a dialog was supposed to be opened.

This worked before as the editor was not using the `Dialog` API until
commit 62fb1bb924.
Unfortunatly, this commit adapted "iframe.js" to load the associated
xml file but forgot to adapt the report editor. In a future
amelioration, this "iframe.js" file could be added to the report editor
so that all "iframe editor" environement work properly with the same
adaptation code.

opw-724784
2017-03-24 14:39:09 +01:00
Nicolas Lempereur 8d948d9235 [FIX] barcodes: fix FieldFloatScannable on firefox
On firefox pressing special keys such as: Left Arrow or Backspace
trigger a keypress event.

This is different from google chrome which only generate a keydown and
keyup event.

There was thus two issue when using a FieldFloatScannable and firefox:

1. Keys such as ArrowLeft: would still be catched by FieldFloatScannable
   and be added programatically to the field but since Odoo didn't fix
   them a ASCII NUL character (0x0) would be added (in firefox it is
   represented by a large space).

2. Keys such as Backspace: would still be catched by FieldFloatScannable
   but were modified and corrected by Odoo so the corresponding ASCII
   character was added (ASCII BS character (0x8) for backspace).

The feature in FieldFloatScannable which add the character is used to
add characters for which the browser had been prevented to display them.

Thus this fix:

- for issue 1 and 2: only use the feature of FieldFloatScannable if the
  event was previously prevented and the current one is a forgery.

- for issue 2: add "Backspace" and "Delete" as specials characters which
  should not be modified or stopped by the scanner heuristic.

opw-706352
2017-03-24 14:07:07 +01:00
Martin Trigaux b3934619d4 [FIX] hr_holidays: allow overlapping leaves and allocations request
The allocation requests have date fields that are only informative.
Having an allocation request (e.g. specifying dates of a public holiday)
overlapping the dates of a request is actually fine (if an employee is sick
during a public holidays, he can still use it for a leave request).

Closes #11026
2017-03-24 12:09:17 +01:00
Kishan Gajjar f4cba344aa [IMP] website: clear rendering of m2m_tags field in config setting. 2017-03-24 11:41:02 +01:00
Jeremy Kersten 33069e6c02 [IMP] ir.values: make order deterministic: per-company > global
Refine the priorities of ir.values entries to make the result
deterministic in the presence of multiple matching default
values. We now give the priority to company-specific defaults,
before global defaults.

Before this change, the default value would be random when
both a per-company and global default value existed for the same
field (with no per-user default).

The priorities are now defined as follows (smaller number = higher prio):

 1. Per-user default (user_id is set, company_id is set)
 2. Per-user global default (user_id is set, company_id not set)
 3. Per-company default (user_id not set, company_id set)
 4. Global defaults (user_id not set, company_id not set)

The final "id" order spec ensures that the order is total.

Also added the corresponding regression test.

Closes #16038
2017-03-24 11:39:38 +01:00
Fabien Meghazi 1217ae914b [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:56 +01:00
Fabien Meghazi a82fb281d1 [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:31:00 +01:00
Fabien Meghazi 874c7aa2dd [FIX] web/mail: many2many_tags_email widget returns erratic values (opw: 693067)
The many2many_tags_email's internal value change logic fails to process
all its values. It is not concurrency proof either.

The internal value change logic is now replaced by a mutex and deferreds
are used for the partner's form view popups in order to allow concurrent
events.
2017-03-24 11:28:31 +01:00
Goffin Simon 2b013d193b [FIX] website_quote: Description on a sale.quote.line
To have the same behavior when the variant is added manually on the SO
or when it's added with a sale.quote.template. The description on the
SO line must include the default_code and the name of the variant.

opw:725072
2017-03-23 18:54:41 +01:00
Goffin Simon 4269bcfc25 [FIX] project: group by stage_id on project.task
Grouping by stage_id on tree view in "project.task" when group_by_full
is defined on stage_id(to show all the stages in kanban view even if
they are empty), grouped by stage without summing all other the fields
such as remainig_hours.

Reason: The order defined in "project.task.type" was not strict and the
function _read_group_fill_results cannot group if the order defined by the
group_by_full(right_side) and the read_group(left_side) is not the same.

opw:724785
2017-03-23 18:36:50 +01:00
Mahendra barad 63167fc51b [IMP] mail: allow users to give schedule and give a feedback on activities
When setting an activity as done in chatter users now have the possibility
to add a feedback. This feedback is added in the generated message that
already contains the activity name and note.

Moreover users now can also immediately schedule a next activity. This is
very useful for chained activities and speeds up activities use.
2017-03-23 17:39:18 +01:00
Thibault Delavallée 9c42c699f5 [CLN] mail: lint activity widget 2017-03-23 17:39:18 +01:00
Mahendra barad 89534bd478 [REM] crm, project_issue: remove unused field date_action_next
This is some leftovers of old implementation of activities. Activity mixin
field should be used instead now.
2017-03-23 17:39:18 +01:00
Mahendra barad a59c5af4ac [IMP] crm : make Next Activities menu use My Activities filter instead of My Opps 2017-03-23 17:39:18 +01:00
Raphael Collet 9e23458d40 [FIX] models: ensure recomputation after inversing fields (#15683)
When updating record using "record.field = value", we need to ensure that
all fields in cache depending on "record.field" will be recomputed.
2017-03-23 17:11:00 +01:00
Gustavo Valverde 06c5db50b6 [IMP] l10n_do: update CoA (for IFRS), taxes, fiscal positions and journals.
Courtesy of Gustavo Valverde. PR #13787

Details:
-------
- Easier implementation for most of the people
- Minor customization to be fully compliant with local regulations
- Standardized configuration to help other Odoo consultants and implementers
- Use of the account types defined in account instead of creating new ones

To comply with local and tax regulations:
-The whole Charts of Accounts was changed
-Most of the Journals has been preconfigured to comply with tax regulator
-All the regulatory taxes were added and configured with group taxes

To standardize the Dominican implementations:
-An IFRS compatible CoA that does not need major changes for most companies
-A well structured CoA with a codification logic.
-Use of the Odoo original flow for creating tax compliant invoice sequences
2017-03-23 16:49:06 +01:00
Raphael Collet 09c7ec59ce [FIX] base_action_rule: prevent double execution only in recursive calls (#15863) 2017-03-23 16:02:55 +01:00
Olivier Dony adf9875ee7 [IMP] website_mass_mailing: make wording clearer after unsub 2017-03-23 15:09:50 +01:00
Jérome Maes b90a8501b6 [IMP] website_crm_partner_assign: access rights refactoring and add tests
Portal user had too many access right on
sensitive documents in this modules. Some
ir.rule were missing, and some model access
were useless.

This commit clean all access right: ir.rule,
ir.model.access and remove useless check in
python code.

Also, some tests were added to check access
rights.
2017-03-23 14:51:07 +01:00
Jérome Maes ef75f0245f [IMP] website_portal_sale, website_quote: portal access right
Portal has access (read only) to partner, pricelist,
taxes, ... These access were given to display informations
on portal pages. Since, these are not very secure, we
remove the access right.

Some modifications are required to make the portal work again :
- 'sudo' business document before rendering templates. ir.rule
are still apply to filter the documents do display.
For instance, SO total amount is computed using account.tax.
- a related field has been added on SO line to allow portal user
to see the image of the ordered product (on SO frontend view)
- a new controller is created to display invoice PDF (as 'sudo'),
since the rendering of this document required read access to
taxes, payment terms, ...
2017-03-23 14:51:00 +01:00
fwi-odoo ea6d6accc3 [IMP] website_portal_sale: consistency with the backend 2017-03-23 14:50:49 +01:00
fwi-odoo 25a067b58d [ADD] website_portal_purchase: purchase orders available in portal
PO are now available in customer portal. It follows the same
convention as the rest of exposed documents (list, pager, form,
filters, ...)

To insert it after the SO menu item, some ordering was required.
Also, rename 'Orders' into 'Sales Orders' to avoid confusion
with 'Purchase Orders'.
2017-03-23 14:50:40 +01:00
fwi-odoo 936b215adf [IMP] website_portal: hide menu when no documents available
This commit impact website_portal, website_portal_sale,
website_project, website_project_issue, and website_crm_partner_assign.

The idea is to hide menu items and dashboard entry in customer
portal when there no document available. Only Sales Orders and
Opportunities are always displayed to avoid empty dashboard.

Also, resequence menu items to be more consistent and to prepare
to insert more items in the future.
2017-03-23 14:50:32 +01:00
Nicolas Martinelli 0cfb7fc347 [FIX] website_sale: redirect if no order
- Visit the webshop without being logged in, do not put anything in the
  cart.
- Visit the URL /shop/address
- An expty SO is created

opw-725277
2017-03-23 14:45:54 +01:00
Martin Trigaux 71d86afb58 [FIX] base: deactivate default language
When a language is deactivated, it may still be referred to in a default value.
A ir.value is created at the database setup to specify the default language.
If a user deactivate the default language but not the ir.value, the creation of
a res.partner would fail as trying to set an unknown value to a selection field.

This commit removes the default value when deactivating the linked language.

The patch is minimal for the bug. A more generic solution would be to verify the
ir.value when calling the default_get method.
This is however a risk of performance degradation (e.g. during a csv import) for
a rare scenario.
The dynamic selection scenario is probably on relevant to res.lang.
A similar problem can occur with many2one fields but is difficult to fix without
performance degradation.

Closes #16009
Fixes #15979
Fixes #3854
2017-03-23 14:38:05 +01:00
Dhaval Panchal ce72152679 [IMP] sale_stock: sale order line quantity warning
When you add a sale order line, odoo checks the available quantity
through all warehouse and if you add more than available, you get a
warning.

We improved this warning, by checking the quantity in the warehouse set
on the sale order, and if the quantity available in this warehouse is
too low, we warn the user with the quantity available in this warehouse
and in all other warehouses.
2017-03-23 13:58:23 +01:00
Atul Patel ba73069ffe [FIX] website_quote: fix access rights issue when quotation is viewed by customer 2017-03-23 13:28:02 +01:00
Mehul Patel 097aa24566 [IMP] website_quote: fix behavior of Quotation viewed by Customer
Currently when the salesman clicks on 'Preview' button of quotation it
is set as 'Viewed by Customer'. This commit improves this behavior by
ensuring it is triggered only by shared users.
2017-03-23 13:28:02 +01:00
Goffin Simon 1031a699b7 [FIX] rating_project: Unescaped signature
Typo error

Steps to reproduce:

1. Go to a project and activate customer satisfaction on tasks
2. Activate the developer mode and go to Settings > Technical > Templates
3. Find the "Task: Rating Request" template
4. Click on Preview

Bug: Signature is in HTML code

opw:725722
2017-03-23 13:17:45 +01:00
Thibault Delavallée 30026d32a5 [MERGE] mail: improve alias security and alias check on channel model
This commit links the alias security and the channel configuration.
Indeed private or group-based channels should always have a restricted
alias. Moreover this alias should check channel members instead of
channel followers, as a channel has members and should not have followers.

This implies a small refactoring of the alias check in the mailgateway.
Code is extracted and moved on alias.mixin class, allowing to tune the
behavior through inheritance.
2017-03-23 13:12:05 +01:00
Thibault Delavallée 66bd7707f5 [IMP] mail: protect by default alias of private or group based channels
Otherwise by default their alias are public. This makes no sense for
private groups to have by default public aliases.

Field is set as invisible on the view because it makes sense to configure
only the channel and not details of its alias. Anyway it is always
possible to tweak the alias configuration under Technical menu.
2017-03-23 13:11:34 +01:00
Thibault Delavallée e5e549a4cf [IMP] mail: make channels check their members instead of followers for alias
This commit makes channel use 'followers' based alias security use members
instead. Indeed channels do not use followers anymore. Instead channels
have members, and alias security of followers should use members instead.
2017-03-23 13:11:34 +01:00
Thibault Delavallée 78ac6de52d [IMP] mail: factorize code that handles alias security in mail gateway
Currently check of alias security is directly embedded in mail.thread
routing method. In this commit we move this check in the mail.alias.mixin
class itself. Doing this allows models to extend or improve the behavior
depending on how inheriting models use aliases.
2017-03-23 13:11:34 +01:00
Thibault Delavallée 634821c688 [IMP] mail: correctly use alias mixin on channel model
Currently channel model manually defines alias and inherits instead of
using the alias.mixin. This commit proposes to use alias feature through
the mixin to have a standard behavior.
2017-03-23 13:11:34 +01:00
Thibault Delavallée 155e81d5e7 [IMP] mail: ease members management on channels
Using a m2m to partners does not allow a real management of members
because it allows to create partners, and require access rights on
partner model. Instead it now uses the o2m to channel members
allowing creation, update and removal of members without having
to work on partner records.
2017-03-23 13:11:33 +01:00
fka-odoo 7875cd8bb5 [IMP] event: prompt warning when canceling an event
Also improve message of raised error.
2017-03-23 12:24:18 +01:00
Thibault Delavallée 9442d69edb [MERGE] mail, project*, sales*: improve activity types use and definition 2017-03-23 11:45:07 +01:00
Nicolas Martinelli 0e7ced70c1 [FIX] mail: reply message type
- On a model, log a note and ping User A
- Go in the inbox of User A, and reply to the message

The reply is a comment (therefore sent to all followers of the
document), not a note.

opw-710326
2017-03-23 11:14:42 +01:00
Mahendra Barad 83e8ae43b0 [IMP] sales_*: add menu to configure sales-related activity types
Activity types are currently hard to find and define. In this commit we
add a menu under sales configuration to access generic or sales
related activity types (contact, lead, product, sale order).

This commit is an improvement considered as an usability fix, therefore
targeting stable version.
2017-03-23 10:40:54 +01:00