[10.0] add new module to manage technical user on company
[CHG] add name to wml tag to make override easier [FIX] remove domain on active fieldpull/2510/head
parent
b387b804dd
commit
8d5c066dfb
|
@ -0,0 +1,49 @@
|
||||||
|
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
|
===================
|
||||||
|
Base Technical User
|
||||||
|
===================
|
||||||
|
|
||||||
|
This module extends the functionality of company management.
|
||||||
|
It allows you to bind a technical user on the company in order to use it in
|
||||||
|
batch processes.
|
||||||
|
|
||||||
|
The technical user must
|
||||||
|
- be inactive to avoid login
|
||||||
|
- be in the required groups depending of what you need to do
|
||||||
|
|
||||||
|
Usage
|
||||||
|
=====
|
||||||
|
|
||||||
|
If you install the module, you will find a tab on the company form allowing
|
||||||
|
to define the technical user.
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
Images
|
||||||
|
------
|
||||||
|
|
||||||
|
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
* Cédric Pigeon <cedric.pigeon@acsone.eu>
|
||||||
|
|
||||||
|
Maintainer
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. image:: https://odoo-community.org/logo.png
|
||||||
|
:alt: Odoo Community Association
|
||||||
|
:target: https://odoo-community.org
|
||||||
|
|
||||||
|
This module is maintained by the OCA.
|
||||||
|
|
||||||
|
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
|
mission is to support the collaborative development of Odoo features and
|
||||||
|
promote its widespread use.
|
||||||
|
|
||||||
|
To contribute to this module, please visit http://odoo-community.org.
|
|
@ -0,0 +1,2 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from . import models
|
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
'name': "Base Technical User",
|
||||||
|
'summary': """
|
||||||
|
Add a technical user parameter on the company """,
|
||||||
|
'author': 'ACSONE SA/NV, Odoo Community Association (OCA)',
|
||||||
|
'website': "http://acsone.eu",
|
||||||
|
'category': 'Hidden/Dependency',
|
||||||
|
'version': '10.0.1.0.0',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'depends': [
|
||||||
|
'base',
|
||||||
|
],
|
||||||
|
'data': [
|
||||||
|
'views/res_company_view.xml'
|
||||||
|
],
|
||||||
|
'installable': True
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from . import res_company
|
|
@ -0,0 +1,14 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ResCompany(models.Model):
|
||||||
|
_inherit = 'res.company'
|
||||||
|
|
||||||
|
user_tech_id = fields.Many2one(
|
||||||
|
comodel_name="res.users",
|
||||||
|
string="Technical User",
|
||||||
|
help="This user can be used by process for technical purpose",
|
||||||
|
domain="[('company_id', '=', id)]")
|
|
@ -0,0 +1,20 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="res_company_view_form_inherit_base_technical_user" model="ir.ui.view">
|
||||||
|
<field name="name">res.company.form (base_technical_user)</field>
|
||||||
|
<field name="model">res.company</field>
|
||||||
|
<field name="inherit_id" ref="base.view_company_form"/>
|
||||||
|
<field name="priority">20</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//notebook/page[1]" position="after">
|
||||||
|
<page name="configuration" string="Configuration">
|
||||||
|
<group>
|
||||||
|
<group name="tech_param" string="Technical Parameters" groups="base.group_erp_manager">
|
||||||
|
<field name="user_tech_id"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
</page>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
Loading…
Reference in New Issue