Browse Source

[IMP] update to renaming agreement -> base_contract

pull/398/head
Iryna Vyshnevska 5 years ago
parent
commit
5e3407a173
  1. 2
      agreement_sale/__manifest__.py
  2. 4
      agreement_sale/models/res_config_settings.py
  3. 6
      agreement_sale/security/ir.model.access.csv
  4. 6
      agreement_sale/views/agreement.xml
  5. 2
      agreement_sale/views/res_config_settings.xml
  6. 2
      agreement_sale/views/sale_order.xml

2
agreement_sale/__manifest__.py

@ -9,7 +9,7 @@
"author": "Akretion, " "Odoo Community Association (OCA)", "author": "Akretion, " "Odoo Community Association (OCA)",
"website": "https://github.com/oca/contract", "website": "https://github.com/oca/contract",
"license": "AGPL-3", "license": "AGPL-3",
"depends": ["sale_management", "agreement"],
"depends": ["sale_management", "base_contract"],
"data": [ "data": [
"security/ir.model.access.csv", "security/ir.model.access.csv",
"views/agreement.xml", "views/agreement.xml",

4
agreement_sale/models/res_config_settings.py

@ -5,8 +5,8 @@ class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings" _inherit = "res.config.settings"
group_use_agreement_type = fields.Boolean( group_use_agreement_type = fields.Boolean(
"Use agreement types", implied_group="agreement.group_use_agreement_type"
"Use agreement types", implied_group="base_contract.group_use_agreement_type"
) )
group_use_agreement_template = fields.Boolean( group_use_agreement_template = fields.Boolean(
"Use agreement template", implied_group="agreement.group_use_agreement_template"
"Use agreement template", implied_group="base_contract.group_use_agreement_template"
) )

6
agreement_sale/security/ir.model.access.csv

@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
agreement.access_agreement_full,Full access on agreement grp,agreement.model_agreement,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_full,Full access on agreement type grp,agreement.model_agreement_type,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_read,Read access on agreement grp,agreement.model_agreement_type,base.group_user,1,0,0,0
base_contract.access_agreement_full,Full access on agreement grp,base_contract.model_agreement,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_full,Full access on agreement type grp,base_contract.model_agreement_type,sales_team.group_sale_manager,1,1,1,1
agreement_sale.access_agreement_type_read,Read access on agreement grp,base_contract.model_agreement_type,base.group_user,1,0,0,0

6
agreement_sale/views/agreement.xml

@ -2,9 +2,9 @@
<odoo> <odoo>
<menuitem id="agreement.agreement_menu" action="agreement.agreement_action"
<menuitem id="base_contract.agreement_menu" action="base_contract.agreement_action"
parent="sale.menu_sale_config" sequence="100"/> parent="sale.menu_sale_config" sequence="100"/>
<menuitem id="agreement.agreement_type_menu" action="agreement.agreement_type_action"
parent="sale.menu_sale_config" sequence="101" groups="agreement.group_use_agreement_type"/>
<menuitem id="base_contract.agreement_type_menu" action="base_contract.agreement_type_action"
parent="sale.menu_sale_config" sequence="101" groups="base_contract.group_use_agreement_type"/>
</odoo> </odoo>

2
agreement_sale/views/res_config_settings.xml

@ -22,7 +22,7 @@
</div> </div>
<div class="content-group" attrs="{'invisible': [('group_use_agreement_type','=',False)]}"> <div class="content-group" attrs="{'invisible': [('group_use_agreement_type','=',False)]}">
<div class="mt16"> <div class="mt16">
<button name="%(agreement.agreement_type_action)d" icon="fa-arrow-right" type="action" string="Agreement types" class="btn-link"/>
<button name="%(base_contract.agreement_type_action)d" icon="fa-arrow-right" type="action" string="Agreement types" class="btn-link"/>
</div> </div>
</div> </div>
</div> </div>

2
agreement_sale/views/sale_order.xml

@ -10,7 +10,7 @@
</field> </field>
<field name="partner_id" position="after"> <field name="partner_id" position="after">
<field name="agreement_type_id" <field name="agreement_type_id"
groups="agreement.group_use_agreement_type"
groups="base_contract.group_use_agreement_type"
/> />
</field> </field>
</field> </field>

Loading…
Cancel
Save