len-odoo ab179bb2d7 [IMP] base: Add compute/inverse methods to manage user groups
Purpose
=======

Allow to define users groups on a res.user with computed fields based on the 'groups_id' field.

Specification
=============

Add compute/inverse methods to manage specific groups on a res.users.

These methods should be used on fields defined like one the following cases:

1. A boolean field with the compute/inverse method and an attribute group_xml_id.
Example:
    has_group_discount_per_so_line = fields.Boolean(
        "Discount on lines",
        compute='_compute_groups_id', inverse='_inverse_groups_id',
        group_xml_id='sale.group_discount_per_so_line')

2. A selection field with the compute/inverse method, the selection got from '_get_group_selection'
   and an attribute 'category_xml_id'
Example:
    group_sales_team_user = fields.Selection(
        selection=lambda self: self._get_group_selection('base.module_category_sales_management'),
        string="Sales", compute='_compute_groups_id', inverse='_inverse_groups_id',
        category_xml_id='base.module_category_sales_management')

The fields will be set according to the groups defined in the 'groups_id' field, and the 'groups_id'
field will be modified according to the modifications made on theses fields when saving the users's
form.
2018-04-26 15:13:38 +02:00
2015-09-08 15:45:09 +02:00
2017-12-12 17:19:01 +01:00
…
2015-09-08 17:58:38 +02:00
2018-04-18 15:59:05 +02:00
2018-04-18 15:58:34 +02:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%