Browse Source
[REF] Contract Sale: split from analytic account
[REF] Contract Sale: split from analytic account
[REF] Contract Sale: update translationspull/207/head
Thomas Binsfeld
6 years ago
committed by
sbejaoui
10 changed files with 74 additions and 47 deletions
-
4contract_sale/__manifest__.py
-
2contract_sale/i18n/contract_sale.pot
-
1contract_sale/i18n/gl.po
-
32contract_sale/migrations/12.0.2.0.0/pre-migration.py
-
8contract_sale/security/contract_security.xml
-
14contract_sale/security/ir.model.access.csv
-
18contract_sale/views/abstract_contract_line.xml
-
2contract_sale/views/contract.xml
-
18contract_sale/views/contract_line.xml
-
20contract_sale/views/contract_template.xml
@ -0,0 +1,32 @@ |
|||
# Copyright 2019 ACSONE SA/NV |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
|
|||
import logging |
|||
|
|||
from openupgradelib import openupgrade |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
def migrate(cr, version): |
|||
xmlids_to_rename = [ |
|||
('contract_sale.account_analytic_account_own_salesman', |
|||
'contract_sale.contract_contract_own_salesman'), |
|||
('contract_sale.account_analytic_account_see_all', |
|||
'contract_sale.contract_contract_see_all'), |
|||
('contract_sale.account_analytic_contract_salesman', |
|||
'contract_sale.contract_template_salesman'), |
|||
('contract_sale.account_analytic_contract_sale_manager', |
|||
'contract_sale.contract_template_sale_manager'), |
|||
('contract_sale.account_analytic_invoice_line_saleman', |
|||
'contract_sale.contract_line_saleman'), |
|||
('contract_sale.account_analytic_invoice_line_manager', |
|||
'contract_sale.contract_line_manager'), |
|||
('contract_sale.account_analytic_contract_line_salesman', |
|||
'contract_sale.contract_template_line_salesman'), |
|||
('contract_sale.account_analytic_contract_line_manager', |
|||
'contract_sale.contract_template_line_manager'), |
|||
('contract_sale.account_analytic_account_contract_salesman', |
|||
'contract_sale.contract_contract_salesman'), |
|||
] |
|||
openupgrade.rename_xmlids(cr, xmlids_to_rename) |
@ -1,15 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo noupdate="1"> |
|||
|
|||
<record id="account_analytic_account_own_salesman" model="ir.rule"> |
|||
<record id="contract_contract_own_salesman" model="ir.rule"> |
|||
<field name="name">See Own Contracts</field> |
|||
<field name="model_id" ref="analytic.model_account_analytic_account"/> |
|||
<field name="model_id" ref="contract.model_contract_contract"/> |
|||
<field name="domain_force">['|', ('user_id','=',user.id), ('user_id','=',False)]</field> |
|||
<field name="groups" eval="[(4,ref('sales_team.group_sale_salesman'))]"/> |
|||
</record> |
|||
<record id="account_analytic_account_see_all" model="ir.rule"> |
|||
<record id="contract_contract_see_all" model="ir.rule"> |
|||
<field name="name">See All Contracts</field> |
|||
<field name="model_id" ref="analytic.model_account_analytic_account"/> |
|||
<field name="model_id" ref="contract.model_contract_contract"/> |
|||
<field name="domain_force">[(1,'=',1)]</field> |
|||
<field name="groups" eval="[ |
|||
(4,ref('sales_team.group_sale_salesman_all_leads')), |
@ -1,12 +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 |
|||
"contract_template_salesman","Recurring Salesman","contract.model_contract_template","sales_team.group_sale_salesman",1,1,1,0 |
|||
"contract_template_sale_manager","Recurring Sale Manager","contract.model_contract_template","sales_team.group_sale_manager",1,1,1,1 |
|||
"contract_line_saleman","Recurring Invoice Line Saleman","contract.model_contract_line","sales_team.group_sale_salesman",1,1,1,0 |
|||
"contract_line_manager","Recurring Invoice Line Manager","contract.model_contract_line","sales_team.group_sale_manager",1,1,1,1 |
|||
"contract_template_line_salesman","Recurring Contract Line Salesman","contract.model_contract_template_line","sales_team.group_sale_salesman",1,1,1,0 |
|||
"contract_template_line_manager","Recurring Contract Line Manager","contract.model_contract_template_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 |
|||
"contract_contract_salesman","Recurring Analytic Account Salesman","contract.model_contract_contract","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 |
@ -1,17 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="account_abstract_analytic_contract_line_view_form" |
|||
model="ir.ui.view"> |
|||
<field name="name">account.abstract.analytic.contract.line.form (in contract_sale)</field> |
|||
<field name="model">account.abstract.analytic.contract.line</field> |
|||
<field name="inherit_id" |
|||
ref="contract.account_abstract_analytic_contract_line_view_form"/> |
|||
<!--FORM view--> |
|||
<record id="contract_abstract_contract_line_form_view" model="ir.ui.view"> |
|||
<field name="name">contract.abstract.contract.line form view (in contract_sale)</field> |
|||
<field name="model">contract.abstract.contract.line</field> |
|||
<field name="inherit_id" ref="contract.contract_abstract_contract_line_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='discount']" position="attributes"> |
|||
<attribute name="groups">sale.group_discount_per_so_line |
|||
</attribute> |
|||
</xpath> |
|||
<field name="discount" position="attributes"> |
|||
<attribute name="groups">sale.group_discount_per_so_line</attribute> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
|
@ -1,17 +1,15 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="account_analytic_invoice_line_view_tree" |
|||
model="ir.ui.view"> |
|||
<field name="name">account.analytic.invoice.line.tree (in contract_sale)</field> |
|||
<field name="model">account.analytic.invoice.line</field> |
|||
<field name="inherit_id" |
|||
ref="contract.account_analytic_invoice_line_view_tree"/> |
|||
<!--TREE view--> |
|||
<record id="contract_line_tree_view" model="ir.ui.view"> |
|||
<field name="name">contract.template.line tree view (in contract_sale)</field> |
|||
<field name="model">contract.line</field> |
|||
<field name="inherit_id" ref="contract.contract_line_tree_view"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//field[@name='discount']" position="attributes"> |
|||
<attribute name="groups">sale.group_discount_per_so_line |
|||
</attribute> |
|||
</xpath> |
|||
<field name="discount" position="attributes"> |
|||
<attribute name="groups">sale.group_discount_per_so_line</attribute> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue