diff --git a/contract_sale/README.rst b/contract_sale/README.rst new file mode 100644 index 00000000..03aa6c0a --- /dev/null +++ b/contract_sale/README.rst @@ -0,0 +1,55 @@ +.. 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 + +================== +Contract from Sale +================== + +This module allows access to contracts for sale employees without account +permissions. + +Employees in sale security group "User: Only Own Documents", can only access +contracts created by themselves. + +Usage +===== + +#. Log with an user having sale but not account permissions. +#. Go to Sales > Sales > Contracts. +#. Create a new record or edit another one. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/110/10.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smash it by providing detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Luis M. Ontalba + +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 https://odoo-community.org. diff --git a/contract_sale/__init__.py b/contract_sale/__init__.py new file mode 100644 index 00000000..24d4fcf3 --- /dev/null +++ b/contract_sale/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html diff --git a/contract_sale/__manifest__.py b/contract_sale/__manifest__.py new file mode 100644 index 00000000..131908f2 --- /dev/null +++ b/contract_sale/__manifest__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Tecnativa - Luis M. Ontalba +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + 'name': 'Contract from Sale', + 'version': '10.0.1.0.0', + 'category': 'Sales', + 'author': 'Tecnativa, ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/contract', + 'depends': [ + 'sales_team', + 'contract', + ], + 'data': [ + 'security/ir.model.access.csv', + 'security/account_analytic_account_security.xml', + 'views/account_analytic_account_view.xml', + ], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': True, +} diff --git a/contract_sale/i18n/es.po b/contract_sale/i18n/es.po new file mode 100644 index 00000000..643216f9 --- /dev/null +++ b/contract_sale/i18n/es.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * contract_sale +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-10-12 10:50+0000\n" +"PO-Revision-Date: 2017-10-12 10:50+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: contract_sale +#: model:ir.ui.menu,name:contract_sale.menu_contract_sale +msgid "Contracts" +msgstr "Contratos" + diff --git a/contract_sale/security/account_analytic_account_security.xml b/contract_sale/security/account_analytic_account_security.xml new file mode 100644 index 00000000..1833a1ce --- /dev/null +++ b/contract_sale/security/account_analytic_account_security.xml @@ -0,0 +1,20 @@ + + + + + See Own Contracts + + ['|', ('user_id','=',user.id), ('user_id','=',False)] + + + + See All Contracts + + [(1,'=',1)] + + + + + diff --git a/contract_sale/security/ir.model.access.csv b/contract_sale/security/ir.model.access.csv new file mode 100644 index 00000000..ecd7842f --- /dev/null +++ b/contract_sale/security/ir.model.access.csv @@ -0,0 +1,12 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"account_analytic_contract_salesman","Recurring Salesman","contract.model_account_analytic_contract","sales_team.group_sale_salesman",1,1,1,0 +"account_analytic_contract_sale_manager","Recurring Sale Manager","contract.model_account_analytic_contract","sales_team.group_sale_manager",1,1,1,1 +"account_analytic_invoice_line_saleman","Recurring Invoice Line Saleman","contract.model_account_analytic_invoice_line","sales_team.group_sale_salesman",1,1,1,0 +"account_analytic_invoice_line_manager","Recurring Invoice Line Manager","contract.model_account_analytic_invoice_line","sales_team.group_sale_manager",1,1,1,1 +"account_analytic_contract_line_salesman","Recurring Contract Line Salesman","contract.model_account_analytic_contract_line","sales_team.group_sale_salesman",1,1,1,0 +"account_analytic_contract_line_manager","Recurring Contract Line Manager","contract.model_account_analytic_contract_line","sales_team.group_sale_manager",1,1,1,1 +"account_analytic_line_contract_salesman","Recurring Analytic Line Salesman","analytic.model_account_analytic_line","sales_team.group_sale_salesman",1,1,1,0 +"account_analytic_account_contract_salesman","Recurring Analytic Account Salesman","analytic.model_account_analytic_account","sales_team.group_sale_salesman",1,1,1,0 +"account_analytic_tag_contract_salesman","Recurring Account Analytic Tag Salesman","analytic.model_account_analytic_tag","sales_team.group_sale_salesman",1,1,1,0 +"account_invoice_contract_salesman","Recurring Account Inoice Salesman","account.model_account_invoice","sales_team.group_sale_salesman",1,0,0,0 +"account_journal_contract_salesman","Recurring Account Journal Salesman","account.model_account_journal","sales_team.group_sale_salesman",1,0,0,0 diff --git a/contract_sale/static/description/icon.png b/contract_sale/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/contract_sale/static/description/icon.png differ diff --git a/contract_sale/views/account_analytic_account_view.xml b/contract_sale/views/account_analytic_account_view.xml new file mode 100644 index 00000000..87f21763 --- /dev/null +++ b/contract_sale/views/account_analytic_account_view.xml @@ -0,0 +1,11 @@ + + + + + +