diff options
| author | Antony Lesuisse <al@openerp.com> | 2013-02-14 20:56:45 +0100 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2013-02-14 20:56:45 +0100 |
| commit | b0699326710656a0ca16643c60f3cac2b000514b (patch) | |
| tree | f5642309616651e1e720a22108d41810782cadca /addons/account_analytic_analysis | |
| parent | 77477a5e2d7e8c5533a751f915a487f931e780e4 (diff) | |
reorder and document contract views in one clear file.
bzr revid: al@openerp.com-20130214195645-oia0msv4fz1h14zx
Diffstat (limited to 'addons/account_analytic_analysis')
3 files changed, 122 insertions, 129 deletions
diff --git a/addons/account_analytic_analysis/__openerp__.py b/addons/account_analytic_analysis/__openerp__.py index 5ff15c09076..99e4353afa1 100644 --- a/addons/account_analytic_analysis/__openerp__.py +++ b/addons/account_analytic_analysis/__openerp__.py @@ -38,7 +38,6 @@ Adds menu to show relevant information to each manager.You can also view the rep 'security/ir.model.access.csv', 'security/account_analytic_analysis_security.xml', 'account_analytic_analysis_view.xml', - 'account_analytic_analysis_menu.xml', 'account_analytic_analysis_cron.xml', 'res_config_view.xml', ], diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml deleted file mode 100644 index 32a9d489453..00000000000 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ /dev/null @@ -1,114 +0,0 @@ -<openerp> - <data> - <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/> - - <record id="action_hr_tree_invoiced_all" model="ir.actions.act_window"> - <field name="name">Time & Materials to Invoice</field> - <field name="res_model">account.analytic.line</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="domain">[('invoice_id','=',False)]</field> - <field name="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field> - <field name="search_view_id" ref="account.view_account_analytic_line_filter"/> - <field name="help" type="html"> - <p> - You will find here timesheets and purchases you did for - contracts that can be reinvoiced to the customer. If you want - to record new activities to invoice, you should use the timesheet - menu instead. - </p> - </field> - </record> - <menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/> - - <record id="view_account_analytic_account_overdue_search" model="ir.ui.view"> - <field name="name">account.analytic.account.search</field> - <field name="model">account.analytic.account</field> - <field name="arch" type="xml"> - <search string="Contracts"> - <field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/> - <field name="date"/> - <field name="partner_id"/> - <field name="manager_id"/> - <field name="parent_id"/> - <filter name="open" string="In Progress" domain="[('state','in',('open','draft'))]" help="Contracts in progress (open, draft)"/> - <filter name="pending" string="To Renew" domain="[('state','=','pending')]" help="Pending contracts"/> - <filter name="closed" string="Closed" domain="[('state','=','pending')]" help="Closed contracts"/> - <filter name="cancelled" string="Cancelled" domain="[('state','=','cancel')]" help="Cancelled contracts"/> - <separator/> - <filter - string="Expired or consumed" - domain="[('state','in',('open','draft','pending')), '|', '&', ('date', '!=', False), ('date', '<=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" - help="End date passed or prepaid unit consumed" /> - <filter - string="Expiring soon" - domain="[('date', '!=', False), ('date', '<=', (context_today() + datetime.timedelta(30)).strftime('%%Y-%%m-%%d') )]" - help="End date is in the next month" /> - <separator/> - <filter string="Customer Contracts" help="Contracts assigned to a customer." name="has_partner" domain="[('partner_id', '!=', False)]"/> - <filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]"/> - <separator/> - <group expand="0" string="Group By..."> - <filter string="Status" domain="[]" context="{'group_by':'state'}"/> - <filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/> - <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/> - <filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/> - <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/> - <filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" /> - <filter string="End Date" domain="[]" context="{'group_by' : 'date'}" /> - </group> - </search> - </field> - </record> - - - <record id="action_account_analytic_overdue" model="ir.actions.act_window"> - <field name="name">Contracts to Renew</field> - <field name="res_model">account.analytic.account</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="context">{'search_default_manager_id':uid, 'search_default_pending':1, 'search_default_renew':1}</field> - <field name="domain">[('type','=','contract')]</field> - <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/> - <field name="help" type="html"> - <p class="oe_view_nocontent_create"> - Click to define a new contract. - </p><p> - You will find here the contracts to be renewed because the - end date is passed or the working effort is higher than the - maximum authorized one. - </p><p> - OpenERP automatically sets contracts to be renewed in a pending - state. After the negociation, the salesman should close or renew - pending contracts. - </p> - </field> - </record> - <menuitem action="action_account_analytic_overdue" id="menu_action_account_analytic_overdue" sequence="50" parent="base.menu_invoiced"/> - - <record id="action_account_analytic_overdue_all" model="ir.actions.act_window"> - <field name="name">Contracts</field> - <field name="res_model">account.analytic.account</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - <field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1, 'default_manager_id':uid}</field> - <field name="domain">[('type','=','contract')]</field> - <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/> - <field name="help" type="html"> - <p class="oe_view_nocontent_create"> - Click to create a new contract. - </p><p> - Use contracts to follow tasks, issues, timesheets or invoicing based on - work done, expenses and/or sales orders. OpenERP will automatically manage - the alerts for the renewal of the contracts to the right salesperson. - </p> - </field> - </record> - <menuitem id="base.menu_sales" name="Sales" - parent="base.menu_base_partner" - sequence="1"/> - <menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="7" parent="base.menu_sales"/> - - - </data> -</openerp> diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index f8f718882af..dfbded83baa 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -1,17 +1,13 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data> - - <!-- - Analytic Account form - --> - <record model="ir.actions.act_window" id="action_sales_order"> <field name="name">Sales Orders</field> <field name="res_model">sale.order</field> <field name="src_model">account.analytic.account</field> </record> + <!-- Inherited Analytic Account form for contracts --> <record id="account_analytic_account_form_form" model="ir.ui.view"> <field name="name">account.analytic.account.invoice.form.inherit</field> <field name="model">account.analytic.account</field> @@ -142,8 +138,22 @@ </field> </record> + <!-- Inherited Analytic Account form for template required --> + <record id="view_account_analytic_account_template_required" model="ir.ui.view"> + <field name="name">account.analytic.account.form.template.required</field> + <field name="model">account.analytic.account</field> + <field name="groups_id" eval="[(6, 0, [ref('group_template_required')])]"/> + <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> + <field name="arch" type="xml"> + <field name="template_id" position="attributes"> + <attribute name="attrs">{'required': [('type','=','contract')], 'invisible': [('type','in',['view', 'normal','template'])]}</attribute> + </field> + </field> + </record> + + <!-- Inherited Analytic Account list for contracts --> <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view"> - <field name="name">account.analytic.account.tree</field> + <field name="name">account.analytic.account.list.contract</field> <field name="model">account.analytic.account</field> <field name="inherit_id" ref="account.view_account_analytic_account_list"/> <field name="arch" type="xml"> @@ -155,18 +165,116 @@ </field> </record> - <record id="view_account_analytic_account_template_required" model="ir.ui.view"> - <field name="name">account.analytic.account.form.template.required</field> + <!-- Analytic Account search view for contract --> + <record id="view_account_analytic_account_overdue_search" model="ir.ui.view"> + <field name="name">account.analytic.account.search</field> <field name="model">account.analytic.account</field> - <field name="groups_id" eval="[(6, 0, [ref('group_template_required')])]"/> - <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> <field name="arch" type="xml"> - <field name="template_id" position="attributes"> - <attribute name="attrs">{'required': [('type','=','contract')], 'invisible': [('type','in',['view', 'normal','template'])]}</attribute> - </field> + <search string="Contracts"> + <field name="name" filter_domain="['|', ('name','ilike',self),('code','ilike',self)]" string="Contract"/> + <field name="date"/> + <field name="partner_id"/> + <field name="manager_id"/> + <field name="parent_id"/> + <filter name="open" string="In Progress" domain="[('state','in',('open','draft'))]" help="Contracts in progress (open, draft)"/> + <filter name="pending" string="To Renew" domain="[('state','=','pending')]" help="Pending contracts"/> + <filter name="closed" string="Closed" domain="[('state','=','pending')]" help="Closed contracts"/> + <filter name="cancelled" string="Cancelled" domain="[('state','=','cancel')]" help="Cancelled contracts"/> + <separator/> + <filter + string="Expired or consumed" + domain="[('state','in',('open','draft','pending')), '|', '&', ('date', '!=', False), ('date', '<=', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]" + help="End date passed or prepaid unit consumed" /> + <filter + string="Expiring soon" + domain="[('date', '!=', False), ('date', '<=', (context_today() + datetime.timedelta(30)).strftime('%%Y-%%m-%%d') )]" + help="End date is in the next month" /> + <separator/> + <filter string="Customer Contracts" help="Contracts assigned to a customer." name="has_partner" domain="[('partner_id', '!=', False)]"/> + <filter string="Contracts not assigned" help="Contracts that are not assigned to an account manager." domain="[('manager_id', '=', False)]"/> + <separator/> + <group expand="0" string="Group By..."> + <filter string="Status" domain="[]" context="{'group_by':'state'}"/> + <filter string="Account Manager" domain="[]" context="{'group_by':'manager_id'}"/> + <filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/> + <filter string="Parent" domain="[]" context="{'group_by':'parent_id'}"/> + <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/> + <filter string="Start Date" domain="[]" context="{'group_by' : 'date_start'}" /> + <filter string="End Date" domain="[]" context="{'group_by' : 'date'}" /> + </group> + </search> + </field> + </record> + + <!-- Action Sales/Sales/Contracts --> + <record id="action_account_analytic_overdue_all" model="ir.actions.act_window"> + <field name="name">Contracts</field> + <field name="res_model">account.analytic.account</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="context">{'default_type':'contract', 'search_default_open':1, 'search_default_pending':1, 'default_manager_id':uid}</field> + <field name="domain">[('type','=','contract')]</field> + <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/> + <field name="help" type="html"> + <p class="oe_view_nocontent_create"> + Click to create a new contract. + </p><p> + Use contracts to follow tasks, issues, timesheets or invoicing based on + work done, expenses and/or sales orders. OpenERP will automatically manage + the alerts for the renewal of the contracts to the right salesperson. + </p> </field> </record> + <menuitem id="base.menu_sales" name="Sales" parent="base.menu_base_partner" sequence="1"/> + <menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="7" parent="base.menu_sales"/> + <!-- Action Sales/Invoicing/Time and Material to Invoice --> + <record id="action_hr_tree_invoiced_all" model="ir.actions.act_window"> + <field name="name">Time & Materials to Invoice</field> + <field name="res_model">account.analytic.line</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="domain">[('invoice_id','=',False)]</field> + <field name="context">{'search_default_to_invoice': 1, 'search_default_sales': 1}</field> + <field name="search_view_id" ref="account.view_account_analytic_line_filter"/> + <field name="help" type="html"> + <p> + You will find here timesheets and purchases you did for + contracts that can be reinvoiced to the customer. If you want + to record new activities to invoice, you should use the timesheet + menu instead. + </p> + </field> + </record> + <menuitem id="base.menu_invoiced" name="Invoicing" parent="base.menu_base_partner" sequence="5"/> + <menuitem action="action_hr_tree_invoiced_all" id="menu_action_hr_tree_invoiced_all" parent="base.menu_invoiced" sequence="5"/> + + <!-- Action Sales/Invoicing/Contract to renew --> + <record id="action_account_analytic_overdue" model="ir.actions.act_window"> + <field name="name">Contracts to Renew</field> + <field name="res_model">account.analytic.account</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + <field name="context">{'search_default_manager_id':uid, 'search_default_pending':1, 'search_default_renew':1}</field> + <field name="domain">[('type','=','contract')]</field> + <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/> + <field name="help" type="html"> + <p class="oe_view_nocontent_create"> + Click to define a new contract. + </p><p> + You will find here the contracts to be renewed because the + end date is passed or the working effort is higher than the + maximum authorized one. + </p><p> + OpenERP automatically sets contracts to be renewed in a pending + state. After the negociation, the salesman should close or renew + pending contracts. + </p> + </field> + </record> + <menuitem action="action_account_analytic_overdue" id="menu_action_account_analytic_overdue" sequence="50" parent="base.menu_invoiced"/> + + <!-- Action Sales/Configuration/Contract template --> <record id="template_of_contract_action" model="ir.actions.act_window"> <field name="name">Contract Template</field> <field name="type">ir.actions.act_window</field> @@ -184,8 +292,8 @@ terms and conditions of the contract. </p> </field> - </record> <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/> + </data> </openerp> |
