Commit Graph
108443 Commits
Author SHA1 Message Date
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
Jérome Maes 28c5a232c3 [MERGE] portal_*: remove portal module
This commit remove the portal module.
- depending module (portal_stock, portal_gamification) are
removed. Their features are now managed by their parent
module (mainly access rights)
- portal group and user are moevd to base
- wizard to convert partner into portal user is moved into
website_portal, which is the user portal module now.

The webclient is now forbidden for portal user since there is nothing
to expose for such user.

Some cleaning has been done in survey and rating_project.
2017-03-23 10:30:11 +01:00
Jérome Maes 48f5c81755 [IMP] base,website_portal: webclient forbidden for portal user
About a `sudo` on ir.ui.menu, this commit (3649b7f359) removed it,
this commit (3d0cc2d6d2) re-added it.
Since portal user can not go on /web anymore, I think portal does not need to read ir.ui.menu.

Here some news scenario:
- if website is not installed, portal can log in, but will be redirected to login page
with an error message 'only employee can access'. Indeed, there is no page to display for
such user.
- if website is installed, but not website_portal, portal user can log in and will be
redirected to homepage. If he tries to manually access to /web, he will be redirect to
login page with access error (even if he will still be logged).
- if website_portal is installed, the portal user can fully enjoy its features.
2017-03-23 10:16:28 +01:00
Jérome Maes da6d8a5717 [IMP] survey: dead code using group_anonymous 2017-03-23 10:00:51 +01:00
Jérome Maes 3e3105151b [REM] portal: kill the module
All portal features were moved into base
and website_portal, portal module is obsolete.
This commit remove its code, and modify the modules
dependencies accordingly. website_portal now depends
on auth_signup.
2017-03-23 10:00:51 +01:00
Jérome Maes 1f3da58cfe [MOV] base,portal: make portal module empty
The goal is to prepare the removal of
'portal' module.

- demo portal user is moved into base
- 'is_portal' field on res.group too
- remaining security rule are moved to base too
- mail template is moved to website_portal
2017-03-23 09:59:58 +01:00
Jérome Maes 2b4eeb908f [MOV] portal,website_portal: move wizard and tests into website_portal
The goal is to prepare the removal of
'portal' module.

Converting a partner into a portal user,
though the wizard is moved in website_portal.

'base' will manage portal user and group, but if
website_portal is not installed, there is nothing
to display for portal user.
2017-03-23 09:59:58 +01:00
Jérome Maes 9f006b5cce [REM] portal_stock: kill the module
The goal is to prepare the removal of
'portal' module.

Since this module only provides access rules and
rights, those ones are moved directly into its
parent module (aka 'stock').
Since no module depends on it, we can remove it
without problem.
2017-03-23 09:59:58 +01:00
Jérome Maes b91b66c686 [REM] portal_gamification: kill the module
The goal is to prepare the removal of
'portal' module.

Since this module only provides access rules and
rights, those ones are moved directly into its
parent module (aka gamification).
Since no module depends on it, we can remove it
without problem.
2017-03-23 09:59:58 +01:00
Jérome Maes 330fe871bc [IMP] rating_project: change demo data
Since we want to remove portal module, this
xmlid will not make sense anymore.
2017-03-23 09:59:57 +01:00
Mansi Gandhi b91315af97 [IMP] mrp_repair: send quotation and mail template
When you send a quotation, you have a mail template mentionning the
quotation and its price if there is an invoice method, with the quotaion
in attachment.
2017-03-22 16:56:04 +01:00
Mansi Gandhi 140c0e2203 [REF] mrp_repair: typo 2017-03-22 16:56:04 +01:00
Mansi Gandhi 5985860255 [IMP] mrp_repair: invoice method and reports
When you select an invoice method different than 'No Invoice', all the
parts lines except the 'Remove' ones and the fee lines will be invoiced.

When you print a quotation, the price of parts and fees is shown
only if you have an invoice method (you only have the quantity if you
don't invoice)

The invoice is available through a stat button.

The price of removed parts is set to 0.0 by default as it won't be
invoiced.
2017-03-22 16:56:04 +01:00
Richard Mathot 49269fad84 [FIX] website_portal: wording 2017-03-22 13:23:26 +01:00
David Arnold 9dce68ac26 [IMP] actions: context in tree view
Most of the time, context of an window action is more relevant than the domain,
so show it by default in the tree view.

Closes #15978
2017-03-22 11:05:15 +01:00
Goffin Simon d84b5c4c49 [FIX] base: unlinking ir.model.constraint
When unlinking an ir.model, all the ir.model.constraint linked to this
ir.model must be removed to avoid to call unexisting model.

The ir.model.constraint records, are created with module = the module where the related field
has been declared. But when unlinking the ir.model in function _module_data_uninstall, the related
ir.model.constraint to remove were chosen according to the removed modules. So with models
declaring constraints on inherited fields, some problems occured because the model could be removed
and not all the related constraints.

opw:716032
2017-03-21 15:24:33 +01:00
Lucas Perais c24bc92173 [ADD] point_of_sale: add support for customer facing display (#15302)
A customer facing display is any monitor that can be connected through
HDMI on the POSBox. When enabling the customer facing display option the
customer will get a realtime overview of their current order, what they
have to pay and the change they should receive.

What is displayed on the customer facing display is fully customizeable
through web_editor, two snippets are provided that will be dynamically
updated (Order Block, Payment Info Block) as the order changes in the
POS.

The POSBox handles the live updates through hw_screen.

The HTML that eventually gets sent to hw_screen contains references to
remote resources. All of these remote resources are available on the
Odoo server, no other external connections have to be made. Resources
that are unavailable for the POSBox (like product images) are base64
encoded and included in the HTML. This is accomplished by using the BASE
HTML tag. This does mean that the customer facing display will *not*
work with a POS client opened through localhost or 127.0.0.1. The POS
has to be opened through an IP address (or URL) the POSBox can reach.

Courtesy of JOV, LPE, GED and MAT
2017-03-21 11:49:50 +01:00
Guewen Baconnier 55e6764747 [IMP] account: extract check of duplicate supplier reference
Having more than one supplier invoice with the same reference is sometimes
possible. For instance, in Switzerland, the use of BVR/ESR numbers as a type of
reference permits this. Generally, this number is unique and used only for one
invoice. However, some suppliers do use the same BVR reference for several
invoices (e.g. recurring invoices).

This commit allows to disable this check if required, which is only possible
if it is extracted from 'invoice_validate'.

Closes #15891
2017-03-20 10:28:29 +01:00
Christophe Simonis f7eb74f7ea [MERGE] forward port branch saas-15 up to 2df0c13832 2017-03-19 00:50:15 +01:00
Christophe Simonis 2df0c13832 [MERGE] forward port branch saas-14 up to 6b41d59ca8 2017-03-19 00:49:43 +01:00
Christophe Simonis 6b41d59ca8 [MERGE] forward port branch 10.0 up to 7043fd529f 2017-03-18 23:38:24 +01:00
Christophe Simonis 7043fd529f [FIX] test_converter: use unicode string for comparison 2017-03-18 23:35:58 +01:00
Christophe Simonis 45045bb7a1 [MERGE] forward port branch saas-15 up to c8f01e3b62 2017-03-17 18:06:16 +01:00
Christophe Simonis c8f01e3b62 [MERGE] forward port branch saas-14 up to b2fa9f2ad1 2017-03-17 18:03:00 +01:00
Christophe Simonis b2fa9f2ad1 [MERGE] forward port branch 10.0 up to 31ebb07773 2017-03-17 17:57:52 +01:00
Christophe Simonis 31ebb07773 [MERGE] forward port branch saas-11 up to aefdf96c25 2017-03-17 17:55:30 +01:00
Christophe Simonis aefdf96c25 [MERGE] forward port branch 9.0 up to af64780a2d 2017-03-17 17:06:32 +01:00
Martin Trigaux 2c1257fe88 wow 2017-03-17 14:40:45 +01:00
Martin Trigaux 13bfc8ee50 [FIX] crm: remove unused field from fields to merge
The field email is no longer present on the crm.lead object

opw-725112
2017-03-17 14:33:44 +01:00
Pratima Gupta c2c03ce52c [FIX] mrp: typo in "work orders" 2017-03-17 13:50:02 +01:00
qsm-odoo 7401807510 [FIX] web_editor: copy/paste in the editor
Commit 906875fc78 (followed by commit
76be5eed44) tried to tweak to copy/paste
functionality of the editor.
Indeed, in PDF file, when copying a paragraph, a line feed is added at
each forced line break (page width end). This forced a line feed and
a new paragraph in the pasted text. The goal was to get rid of those
useless linebreaks when pasting.

The ideal solution would be to detect that the text was copied from
a PDF but it is not possible. However, this commit improves the
heuristic: if this is not plain text, then nothing is done, the content
is pasted normally. If it is plain text (like when copying from pdf),
then each line break which is surrounded by letters or numbers is
considered an useless line break and replaced by a space. This is
obviously not perfect but the previous implementation was really wrong
(it was removing line breaks which were not preceeded by punctuation in
all cases, which was removing lots of useful line breaks).

Note: this commit also fixes a bug -> text was not able to be pasted
with Internet Explorer.

opw-715920
2017-03-17 11:44:28 +01:00
Martin Geubelle 22e7b6befb [FIX] web_kanban: only give fields in view to record
This commit partially reverts 5b4f7c1 where `fields_view.fields`
had been replaced by `fields`, which could have been set to all
fields in the model.

This modification can sometimes lead to a problem, during the
fields value transformation. The ID, which wasn't given previously
is now parsed. When creating a new record, the field ID is not an
integer but a string (representing the virtual ID). If the field
is in the arch, it will be postprocessed
(see https://github.com/odoo/odoo/blob/saas-11/addons/web/static/src/js/framework/data_manager.js#L201)
and its type will become `id`. As this postprocessing is not done
if the field in the view, the parsing was on the original type
(integer) and not the special id type.
2017-03-17 11:13:49 +01:00
Hiral Bhavsar 668b730cef [IMP] point_of_sale: pricelist access rights
Pos user can read pricelists and Pos manager
can create/edit/unlink pricelists.
2017-03-17 11:00:33 +01:00
Hiral Bhavsar bb9ca4705e [IMP] point_of_sale: menu reorganization
This commit add some configuration menus to
avoid switching app to configure the POS.

It also add a new 'Catalog' menu to display
product, variants, and pricelists. Some labels
were renamed too.

The new menu structure looks like

Dashboard
Orders
Catalog
- Products
- Product Variants (if set)
- Pricelists (if set, only editable by pos managers)
- Loyalty Programs
Reporting
Configuration
- Settings
- Point of Sale
  - Point of Sale
  - Floor Plans
  - Order Printers
  - Barcode Nomenclatures
  - Payment Methods
  - Mercury Configuration
- Products
  - Attributes
  - Attribute Values
  - PoS Categories
  - Internal Categories
2017-03-17 11:00:07 +01:00
Nicolas Martinelli af64780a2d [FIX] base: no-break hyphen
- Create an invoice with two products
- Each line has a long description (spread on 2 lines)
- The second line has a negative value
- Print the invoice (PDF)

The amount spreads on two lines, split as:
$ -
1,000.00

This is due to the wkhtmltopdf version with patched QT. Unfortunately,
upgrading to the latest version 0.12.4 doesn't solve the problem.

The solution is to replace the '-' by a non-breakable hyphen.

opw-711002
2017-03-17 09:07:15 +01:00
Nicolas Lempereur 508a002e69 [FIX] web_editor: glitch english several times
When using the iframed editor with multilang selector (present if there
is another lang installed than en_US) an "English" language was present
before each translation language.

opw-696891
2017-03-17 08:10:52 +01:00
Nicolas Lempereur e3eefa0935 [FIX] l10n_ch: zoom isr and have margin for title
1. A zoom is needed because the virtual viewport of wkhtml is bigger than
a A4 paper size. Hence we go over the size of the A4 paper with the zoom
and the content is then resized down to what we want.

2. There was also an issue for example with the title (outside the isr)
which had no margin so could be over the report header.

3. Tidy-up some comments in the ISR report

4. Use OCR-B font for optical reference if available

task-30535
2017-03-17 07:46:18 +01:00
Nicolas Lempereur fb05d8845d [FIX] web_calendar: events not appearing in arabic
Fullcalendar expect as `start` and `end` property of an event object:

> When specifying Event Objects for events or eventSources, you may
> specify a string in IETF format (ex: "Wed, 18 Oct 2009 13:00:00 EST"),
> a string in ISO8601 format (ex: "2009-11-05T13:15:30Z") or a UNIX
> timestamp.

(as seen in https://fullcalendar.io/docs1/event_data/Event_Object/)

Before this commit we could for example in arabic provide an invalid
date string "٢٠١٧-٠٣-١٦ ١٦:٠٠:٠٦" instead of "2017-03-16 16:00:06".

This commit solves this by always providing fullcalendar an ISO8601 date
string.

opw-705752
2017-03-16 22:07:29 +01:00
Nicolas Lempereur f50ba68be7 [FIX] web_editor: handle margin:initial correctly
The transcoder (which transforms stylesheet rules to inline style) did
some compression of the padding and margin css properties to not always
have margin-top + margin-right + margin-bottom + margin-left.

This could cause an issue when the value of margin or padding contained
an initial or inherit value because browsers (at least firefox and
google chrome) doesn't allow it. Thus the preview could for example have
bigger veritcal spaces arround `<p />` tag than what was seen when
editing.

With this fix instead of invalid:

    margin:initial initial initial initial

we have:

    margin:initial

And instead of invalid:

    margin:initial 5px 6px 7px

we have:

    margin-top: initial; margin-right: 5px; margin-bottom: 6px; margin-left: 7px;

opw-706535
2017-03-16 18:26:32 +01:00
Pratima Gupta 2560feec04 [REM] stock: latest inventories and moves report
The functionaility is available through a filter on the inventory
adjustment view or through the stock moves of a product.
2017-03-16 17:53:28 +01:00
Pierre Masereel a5b9d05b66 [FIX] stock: multi-step routes
When we are changing the incoming and outgoing routes steps of a
warhouse through its settings, the push/pull rules are actually deleted
and recreated, which raise a traceback if we have some move validated
that are using those rules.

The problem came after rev: https://github.com/odoo/odoo/commit/b1b3de1339a13504ac5e223aec465bd70417d11e
Because we restrict the deletion of rules when they are used in stock
moves.

To fix this issue, we deactivate rules when we change the incoming and
outgouing rules instead of unlink them
2017-03-16 17:39:59 +01:00
Haresh Shyara 02a76becf7 [IMP] stock_account: remove security group inventory valuation
It will remove the stock setting, the group itself and remove it where
it is used in the views.  The perpetual valuation setting is only on the
internal category which is already "deeper" in the system.

It is also removed for the update price link on the product form
in case of perpetual valuation and we changed the label to Update Cost
instead of update standard/average cost.
2017-03-16 17:34:25 +01:00
Simon Lejeune be9dce625c [FIX] stock: inventory adjustment and negative quants
It is still possible to have negative and positive quants in the same
location because of returns: if you send something to the customer that
is not there and you return it, you will still be able to reserve the
returned goods to send to another client.

Before, if you would do an inventory adjustment, it would not take into
account these returned quants and their negative counterpart, which made
them difficult to get out of the system.

This fix takes them into account by creating two movements for one
inventory line: move the positive counterpart to the inventory location
before getting back from this location the same quantity.

This way, even if you have 0 as quantity on hand but you have those 2
quants, it will eliminate them. (if you are increasing the stock, part
of the process might have done it automatically already).

Test cases contributed by @jir-odoo
2017-03-16 17:30:02 +01:00
Christophe Simonis 5f9d382ed4 [MERGE] forward port branch 9.0 up to e542b450a3 2017-03-16 16:01:56 +01:00