Browse Source

[IMP] review menu definitions and access rights

pull/33/head
robin.keunen 5 years ago
parent
commit
719fa13796
  1. 4
      easy_my_coop/views/account_journal_view.xml
  2. 14
      easy_my_coop/views/menus.xml
  3. 2
      easy_my_coop/views/product_view.xml
  4. 2
      easy_my_coop/views/res_company_view.xml
  5. 12
      easy_my_coop/views/res_partner_view.xml
  6. 10
      easy_my_coop/views/subscription_request_view.xml
  7. 2
      easy_my_coop/wizard/update_partner_info.xml
  8. 2
      easy_my_coop/wizard/update_share_line.xml
  9. 2
      easy_my_coop_dividend/views/dividend_views.xml
  10. 2
      easy_my_coop_recompute_coop_number/wizard/cooperator_number_wizard.xml
  11. 10
      easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

4
easy_my_coop/views/account_journal_view.xml

@ -6,7 +6,7 @@
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="bank_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
</field>
@ -18,7 +18,7 @@
<field name="inherit_id" ref="account.view_account_bank_journal_form"/>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="get_cooperator_payment" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="get_general_payment"/>
</field>
</field>

14
easy_my_coop/views/menus.xml

@ -6,21 +6,21 @@
<odoo>
<menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="40" />
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="10" />
<menuitem name="Share Management" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="10" />
<menuitem name="Subscriptions" id="menu_easy_my_coop_subscription_request" action="subscription_request_action" parent="menu_easy_my_coop_main_subscription" sequence="110" />
<menuitem name="Register Payment" id="menu_action_invoice_tree_coop" action="action_invoice_tree_coop" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="130" />
<menuitem name="Cooperator Candidates" id="menu_easy_my_coop_cooperator_candidate" action="action_partner_cooperator_candidate_form" parent="menu_easy_my_coop_main_subscription" sequence="140" />
<menuitem name="Subscription Register" id="menu_easy_my_coop_subscription_register" action="subscription_register_action" parent="menu_easy_my_coop_main_subscription" sequence="150" />
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request" action="operation_request_action" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_manager" sequence="160" />
<menuitem name="Share lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="group_easy_my_coop_super_manager" sequence="170" />
<menuitem name="Operation request" id="menu_easy_my_coop_operation_request" action="operation_request_action" parent="menu_easy_my_coop_main_subscription" groups="easy_my_coop.group_easy_my_coop_user" sequence="160" />
<menuitem name="Share lines" id="menu_easy_my_coop_share_line" action="share_line_action" parent="menu_easy_my_coop_main_subscription" groups="group_easy_my_coop_manager" sequence="170" />
<menuitem name="Contacts" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="20"/>
<menuitem name="Cooperators" id="menu_easy_my_coop_cooperator" action="action_partner_cooperator_form" parent="menu_easy_my_coop_main_coop" sequence="210" />
<menuitem name="Company representative" id="menu_easy_my_coop_company_representative" action="action_company_representative_form" parent="menu_easy_my_coop_main_coop" sequence="220" />
<menuitem name="Company representative" id="menu_easy_my_coop_company_representative" action="action_company_representative_form" parent="menu_easy_my_coop_main_coop" groups="base.group_erp_manager" sequence="220" />
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="30" />
<menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<menuitem name="Configuration" id="menu_easy_my_coop_config" parent="menu_main_easy_my_coop" sequence="40" />
<menuitem name="Configuration" id="menu_easy_my_coop_config" parent="menu_main_easy_my_coop" sequence="40" groups="group_easy_my_coop_manager" />
<menuitem name="Share type" id="menu_easy_my_coop_share_product" action="share_product_action" parent="menu_easy_my_coop_config" sequence="410" />
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates" action="action_easy_my_coop_email_templates" parent="menu_easy_my_coop_config" groups="group_easy_my_coop_manager" sequence="430" />
<menuitem name="Mail Templates" id="menu_easy_my_coop_templates" action="action_easy_my_coop_email_templates" parent="menu_easy_my_coop_config" sequence="430" />
</odoo>

2
easy_my_coop/views/product_view.xml

@ -6,7 +6,7 @@
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='purchase_ok']/.." position="after">
<div groups="easy_my_coop.group_easy_my_coop_super_manager">
<div groups="easy_my_coop.group_easy_my_coop_manager">
<field name="is_share"/>
<label for="is_share"/>
</div>

2
easy_my_coop/views/res_company_view.xml

@ -6,7 +6,7 @@
<field name="model">res.company</field>
<field name="arch" type="xml">
<group name="social_media" position="before">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_easy_my_coop_manager">
<group name="coop_grp" string="EasyMy Coop" groups="easy_my_coop.group_easy_my_coop_user">
<field name="unmix_share_type"/>
<field name="allow_id_card_upload"/>
<field name="create_user"/>

12
easy_my_coop/views/res_partner_view.xml

@ -12,10 +12,10 @@
<field name="arch" type="xml">
<sheet position="before">
<header>
<button id="action_view_create_subscription" string="Create Subscription" name="%(action_view_create_subscription)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button id="action_view_update_partner_info" string="Update info" name="%(action_view_update_partner_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button string="Create Subscription" name="%(action_view_create_subscription)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
<button string="Update info" name="%(action_view_update_partner_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_user"/>
</header>
</sheet>
@ -26,8 +26,8 @@
<field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/>
<field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="coop_candidate" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="member" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="member" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/>
<field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/>
</group>

10
easy_my_coop/views/subscription_request_view.xml

@ -21,7 +21,7 @@
<field name="validated" invisible="True"/>
<button type="object" string="Validate" aria-label="Validate" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}"/>
<button type="object" string="Block" aria-label="Block" name="block_subscription_request" states="draft" groups="easy_my_coop.group_easy_my_coop_user"/>
<button type="object" string="Unblock" aria-label="Unblock" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button type="object" string="Unblock" aria-label="Unblock" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_easy_my_coop_user"/>
</tree>
</field>
</record>
@ -34,14 +34,14 @@
<header>
<button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
<button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/>
<button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
</header>
<sheet>
<group>
<group>
<field name="already_cooperator"/>
<field name="is_company" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="is_company" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="is_operation" invisible="True"/>
<field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/>
<field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/>
@ -62,7 +62,7 @@
<field name="country_id" options="{'no_create':True}"/>
</group>
<group>
<field name="capital_release_request_date" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<field name="capital_release_request_date" groups="easy_my_coop.group_easy_my_coop_manager"/>
<field name="date"/>
<field name="source"/>
<field name="ordered_parts"/>
@ -136,7 +136,7 @@
<form string="Share line">
<header>
<button string="Update info" name="%(action_view_update_share_line_info)d"
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
</header>
<sheet>
<group>

2
easy_my_coop/wizard/update_partner_info.xml

@ -33,7 +33,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_user'))]"/>
</record>
</data>

2
easy_my_coop/wizard/update_share_line.xml

@ -29,7 +29,7 @@
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_super_manager'))]"/>
<field name="groups_id" eval="[(4,ref('easy_my_coop.group_easy_my_coop_manager'))]"/>
</record>
</data>

2
easy_my_coop_dividend/views/dividend_views.xml

@ -1,6 +1,6 @@
<odoo>
<data>
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_manager" sequence="30" />
<menuitem name="Dividend" id="menu_easy_my_coop_main_dividend" parent="easy_my_coop.menu_main_easy_my_coop" groups="easy_my_coop.group_easy_my_coop_user" sequence="30" />
<record id="dividend_year_form" model="ir.ui.view">
<field name="name">dividend.year.form</field>

2
easy_my_coop_recompute_coop_number/wizard/cooperator_number_wizard.xml

@ -29,7 +29,7 @@
<field name="multi">True</field>
</record>
<menuitem id="menu_register_number_wizard" parent="easy_my_coop.menu_easy_my_coop_config" action="action_register_number_wizard" sequence="30" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
<menuitem id="menu_register_number_wizard" parent="easy_my_coop.menu_easy_my_coop_config" action="action_register_number_wizard" sequence="30" groups="easy_my_coop.group_easy_my_coop_manager"/>
</data>
</openerp>

10
easy_my_coop_taxshelter_report/views/tax_shelter_declaration_view.xml

@ -9,9 +9,9 @@
<field name="arch" type="xml">
<form string="Tax shelter declaration">
<header>
<button name="compute_declaration" string="Process Declaration" type="object" states="draft" class="oe_highlight" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="validate_declaration" string="Validate Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="reset_declaration" string="Reset Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_manager"/>
<button name="compute_declaration" string="Process Declaration" type="object" states="draft" class="oe_highlight" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="validate_declaration" string="Validate Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<button name="reset_declaration" string="Reset Declaration" type="object" states="computed" groups="easy_my_coop.group_easy_my_coop_user"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
@ -73,7 +73,7 @@
<field name="view_id" ref="tax_shelter_declaration_tree"/>
</record>
<menuitem action="tax_shelter_declaration_action" name="Tax Shelter Declaration" id="menu_tax_shelter_declaration" parent="menu_easy_my_coop_main_declaration" sequence="10" groups="easy_my_coop.group_easy_my_coop_manager"/>
<menuitem action="tax_shelter_declaration_action" name="Tax Shelter Declaration" id="menu_tax_shelter_declaration" parent="menu_easy_my_coop_main_declaration" sequence="10" groups="easy_my_coop.group_easy_my_coop_user"/>
<record id="tax_shelter_certificate_form" model="ir.ui.view">
<field name="name">tax.shelter.certificate.form</field>
@ -196,6 +196,6 @@
<field name="view_id" ref="tax_shelter_certificate_tree"/>
</record>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_manager"/>
<menuitem action="tax_shelter_certificate_action" name="Tax Shelter Certificates" id="menu_tax_shelter_certificate" parent="menu_easy_my_coop_main_declaration" sequence="20" groups="easy_my_coop.group_easy_my_coop_user"/>
</data>
</odoo>
Loading…
Cancel
Save