bzr revid: olt@tinyerp.com-20081027122644-qsw8nu4gli4b830k
This commit is contained in:
Olivier Laurent
2008-10-27 13:26:44 +01:00
67 changed files with 812 additions and 2649 deletions
+17
View File
@@ -665,6 +665,15 @@ class account_move(osv.osv):
return periods[0]
else:
return False
def _amount_compute(self, cr, uid, ids, name, args, context, where =''):
if not ids: return {}
cr.execute('select move_id,sum(debit) from account_move_line where move_id in ('+','.join(map(str,ids))+') group by move_id')
result = dict(cr.fetchall())
for id in ids:
result.setdefault(id, 0.0)
return result
_columns = {
'name': fields.char('Entry Name', size=64, required=True),
'ref': fields.char('Ref', size=64),
@@ -673,6 +682,8 @@ class account_move(osv.osv):
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'Status', required=True, readonly=True),
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Be Verified'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
'amount': fields.function(_amount_compute, method=True, string='Amount', digits=(16,2), store=True),
}
_defaults = {
'state': lambda *a: 'draft',
@@ -1861,8 +1872,14 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'code_digits':fields.integer('# of Digits',required=True,help="No. of Digits to use for account code"),
}
def _get_chart(self, cr, uid, context={}):
ids = self.pool.get('account.chart.template').search(cr, uid, [], context=context)
if ids:
return ids[0]
return False
_defaults = {
'company_id': lambda self, cr, uid, c: self.pool.get('res.users').browse(cr,uid,[uid],c)[0].company_id.id,
'chart_template_id': _get_chart,
'code_digits': lambda *a:6,
}
+68 -61
View File
@@ -465,6 +465,8 @@
<field name="name"/>
<field name="period_id"/>
<field name="journal_id"/>
<field name="partner_id"/>
<field name="amount"/>
<field name="state"/>
</tree>
</field>
@@ -714,9 +716,9 @@
<field colspan="4" name="analytic_lines" nolabel="1"/>
</page>
<page string="Move Lines">
<field colspan="4" name="reconcile_implicit"/>
<field colspan="4" name="reconcile_implicit"/>
<field colspan="4" name="parent_move_lines" nolabel="0"/>
</page>
</page>
</notebook>
</form>
</field>
@@ -756,7 +758,7 @@
<newline/>
<field name="account_tax_id" domain="[('parent_id','=',False)]"/>
<field name="analytic_account_id"/>
<field colspan="4" name="reconcile_implicit"/>
<field colspan="4" name="reconcile_implicit"/>
<separator colspan="4" string="State"/>
<newline/>
<field name="reconcile_id"/>
@@ -807,11 +809,15 @@
<field name="arch" type="xml">
<form string="Account Entry">
<separator colspan="4" string="General Information"/>
<group colspan="4" col="6">
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="period_id" select="2"/>
<field name="journal_id" select="1"/>
<field name="to_check" select="2"/>
<field name="partner_id" select="2"/>
<field name="amount" select="2"/>
<field name="ref" select="1" groups="base.group_extended"/>
<field name="to_check" select="2" groups="base.group_extended"/>
</group>
<separator colspan="4" string="Entry Lines"/>
<field colspan="4" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
@@ -871,7 +877,7 @@
<menuitem id="next_id_29" name="Search Entries" parent="account.menu_finance_accounting"/>
<menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Entries Encoding by Move</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
@@ -1347,9 +1353,9 @@
<field name="code"/>
<field name="date1"/>
<field name="date2"/>
<field name="period" colspan="4"/>
<separator col="4" colspan="4" string="Select Chart of Accounts"/>
<field name="charts"/>
<field name="period" colspan="4"/>
<separator col="4" colspan="4" string="Select Chart of Accounts"/>
<field name="charts"/>
<separator string="" colspan="4"/>
<label string="" colspan="2"/>
<group col="2" colspan="2">
@@ -1414,17 +1420,17 @@
</field>
</record>
<record id="view_account_template_tree" model="ir.ui.view">
<field name="name">account.account.template.tree</field>
<field name="model">account.account.template</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Template">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="view_account_template_tree" model="ir.ui.view">
<field name="name">account.account.template.tree</field>
<field name="model">account.account.template</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Template">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="action_account_template_form" model="ir.actions.act_window">
<field name="name">Account Templates</field>
@@ -1524,8 +1530,8 @@
<page groups="base.group_extended" string="Special Computation">
<separator colspan="4" string="Compute Code (if type=code)"/>
<field colspan="4" name="python_compute" nolabel="1" attrs="{'readonly':[('type','!=','code')]}"/>
<separator colspan="4" string="Compute Code for Taxes included prices"/>
<field colspan="4" name="python_compute_inv" nolabel="1"/>
<separator colspan="4" string="Compute Code for Taxes included prices"/>
<field colspan="4" name="python_compute_inv" nolabel="1"/>
<separator colspan="4" string="Applicable Code (if type=code)"/>
<field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')]}"/>
</page>
@@ -1553,8 +1559,8 @@
<menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="next_id_27" sequence="13"/>
<!-- Account Tax Code Templates -->
<record id="view_tax_code_template_tree" model="ir.ui.view">
<!-- Account Tax Code Templates -->
<record id="view_tax_code_template_tree" model="ir.ui.view">
<field name="name">account.tax.code.template.tree</field>
<field name="model">account.tax.code.template</field>
<field name="type">tree</field>
@@ -1592,50 +1598,51 @@
<menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="next_id_27" sequence="14"/>
<!-- Wizard for Multi Charts of Accounts -->
<!-- Wizard for Multi Charts of Accounts -->
<record id="view_wizard_multi_chart" model="ir.ui.view">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="model">wizard.multi.charts.accounts</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Generate Chart of Accounts from a Chart Template">
<separator col="4" colspan="4" string="Generate Chart of Accounts from a Chart Template"/>
<field name="company_id" />
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="model">wizard.multi.charts.accounts</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Generate Chart of Accounts from a Chart Template">
<separator col="4" colspan="4" string="Generate Chart of Accounts from a Chart Template"/>
<label align="0.0" string="This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template" colspan="4"/>
<field name="company_id" />
<field name ="code_digits" />
<field name="chart_template_id" colspan="4"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</form>
<tree editable="bottom" string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</tree>
</field>
<field name="chart_template_id" colspan="4"/>
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</form>
<tree editable="bottom" string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</tree>
</field>
<separator string="" colspan="4"/>
<label string="" colspan="2"/>
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" type="object" name="action_cancel" string="Cancel"/>
<button icon="gtk-ok" name="action_create" string="Create" type="object"/>
</group>
</form>
</field>
</record>
<label string="" colspan="2"/>
<group col="2" colspan="2">
<button icon="gtk-cancel" special="cancel" type="object" name="action_cancel" string="Cancel"/>
<button icon="gtk-ok" name="action_create" string="Create" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_wizard_multi_chart" model="ir.actions.act_window">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.multi.charts.accounts</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="action_wizard_multi_chart" model="ir.actions.act_window">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.multi.charts.accounts</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem parent="account.account_account_menu" action="action_wizard_multi_chart" id="menu_wizard"/>
<menuitem parent="account.account_account_menu" action="action_wizard_multi_chart" id="menu_wizard"/>
<record id="account_account_graph" model="ir.ui.view">
<record id="account_account_graph" model="ir.ui.view">
<field name="name">account.account.graph</field>
<field name="model">account.account</field>
<field name="type">graph</field>
@@ -134,11 +134,11 @@ class wizard_report(wizard.interface):
},
'account_selection': {
'actions': [],
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel'),('checktype','Print')]}
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel','gtk-cancel'),('checktype','Print','gtk-print')]}
},
'checktype': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel'),('report','Print')]}
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
'actions': [_check_state],
@@ -182,11 +182,11 @@ class wizard_report(wizard.interface):
},
'account_selection': {
'actions': [],
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel'),('checktype','Print')]}
'result': {'type':'form', 'arch':account_form,'fields':account_fields, 'state':[('end','Cancel','gtk-cancel'),('checktype','Print','gtk-print')]}
},
'checktype': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel'),('checkreport','Print')]}
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('checkreport','Print','gtk-print')]}
},
'checkreport': {
'actions': [],
@@ -119,7 +119,7 @@ class wizard_report(wizard.interface):
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel'),('report','Print')]}
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
@@ -135,7 +135,7 @@ class wizard_report(wizard.interface):
states = {
'init': {
'actions': [_get_defaults],
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel'),('report','Print')]}
'result': {'type':'form', 'arch':period_form, 'fields':period_fields, 'state':[('end','Cancel','gtk-cancel'),('report','Print','gtk-print')]}
},
'report': {
'actions': [_check_state],
@@ -45,13 +45,12 @@
<menuitem action="action_account_analytic_managed_pending" id="menu_analytic_account_to_valid_pending" parent="account_analytic_analysis.menu_analytic_account_managed"/>
<record id="action_account_analytic_managed_overpassed" model="ir.actions.act_window">
<field name="name">Overpassed accounts</field>
<field name="name">Overpassed Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('date','&lt;=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
</record>
<menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" parent="account_analytic_analysis.next_id_71"/>
<record id="action_account_analytic_all" model="ir.actions.act_window">
@@ -51,8 +51,8 @@ class accounting_report(report_sxw.rml_parse):
'amount':res[0]['amount'],
'note':res[0]['note'],
'level': level,
'color_font':res[0]['color_font'],
'color_back':res[0]['color_back'],
# 'color_font':res[0]['color_font'],
# 'color_back':res[0]['color_back'],
}
self.ret_list.append(ret_dict)
@@ -119,13 +119,13 @@
<blockTable colWidths="362.0,73.0,93.0" repeatRows="1" style="Table3">
<tr>
<td>
<para style="P11">[[ ' \t '*(obj['level']) + obj['name'] ]] [[ obj['color_font'] and ( setTag('para','para',{'textColor':obj['color_font']})) ]] [[ obj['color_back'] and ( setTag('para','para',{'backColor':obj['color_back']})) ]]</para>
<para style="P11"><font color="white">[[ '....'*(obj['level']) ]]</font>[[ obj['name'] ]]</para>
</td>
<td>
<para style="P11">[[obj['code'] ]] [[ obj['color_font'] and (setTag('para','para',{'textColor':obj['color_font']})) ]] [[ obj['color_back'] and ( setTag('para','para',{'backColor':obj['color_back']})) ]]</para>
<para style="P11">[[obj['code'] ]]</para>
</td>
<td>
<para style="P12">[['%.2f' % obj['amount'] ]] [[ obj['color_font'] and ( setTag('para','para',{'textColor':obj['color_font']})) ]][[ obj['color_back'] and ( setTag('para','para',{'backColor':obj['color_back']})) ]]</para>
<para style="P12">[['%.2f' % obj['amount'] ]] </para>
</td>
</tr>
<tr>
+23 -23
View File
@@ -61,31 +61,9 @@
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_categ_act0"/>
</record>
<menuitem name="Bug Tracking" id="menu_crm_case_bug_track" parent="crm.menu_crm"/>
<menuitem name="Bug Tracking" id="menu_crm_case_bug_track" parent="crm.menu_crm" action="crm_case_categ_act0"/>
<menuitem id="menu_crm_case_categ_act0" action="crm_case_categ_act0" parent="menu_crm_case_bug_track"/>
<record model="ir.actions.act_window" id="crm_case_categ_act_new">
<field name="name">New Bug</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view1_new">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_categ_act_new"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view1_new">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="act_window_id" ref="crm_case_categ_act_new"/>
</record>
<menuitem id="menu_crm_case_categ_act_new" action="crm_case_categ_act_new" parent="menu_crm_case_categ_act0"/>
<record model="ir.actions.act_window" id="crm_case_category_act_all1">
<field name="name">Bugs Waiting Approval</field>
<field name="res_model">crm.case</field>
@@ -341,6 +319,28 @@
</record>
<menuitem parent="menu_crm_case_bug_track" id="menu_crm_case_categ0_act_my0" action="crm_case_category_act_my0"/>
<record model="ir.actions.act_window" id="crm_case_categ_act_new">
<field name="name">New Bug</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view1_new">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view"/>
<field name="act_window_id" ref="crm_case_categ_act_new"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view1_new">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view"/>
<field name="act_window_id" ref="crm_case_categ_act_new"/>
</record>
<menuitem id="menu_crm_case_categ_act_new" action="crm_case_categ_act_new" parent="menu_crm_case_categ0_act_my0"/>
<record model="ir.actions.act_window" id="crm_case_category_act_my1">
<field name="name">My Open Bugs</field>
<field name="res_model">crm.case</field>
+32 -30
View File
@@ -14,43 +14,45 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bug Tracker Form">
<group colspan="4" col="4">
<field name="name" string="Title" colspan="2"/>
<field name="section_id" colspan="1"/>
<newline/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration"/>
</group>
<notebook>
<page string="General">
<field name="name" string="Title" colspan="2"/>
<field name="section_id" colspan="1"/>
<newline/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" colspan="2"/>
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
<newline/>
<field name="email_from" colspan="2"/>
<field name="user_id" />
<separator colspan="4"/>
<field name="categ_id" on_change="onchange_categ_id(categ_id)"/>
<field name="priority" string="Severity"/>
<newline/>
<field name="stage_id" string="Resolution" colspan="2"/>
<field name="category2_id" string="Version"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, email_from)" colspan="2"/>
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
<newline/>
<field name="email_from" colspan="2"/>
<field name="user_id" />
<separator colspan="4"/>
<field name="categ_id" on_change="onchange_categ_id(categ_id)"/>
<field name="priority" string="Severity"/>
<newline/>
<field name="stage_id" string="Resolution" colspan="2"/>
<field name="category2_id" string="Version"/>
<separator colspan="4"/>
<field name="history_line" colspan="2" nolabel="1" mode="tree,form">
<form string="Resolution history">
<group col="6" colspan="4">
<field name="date"/>
<field name="email" />
<field name="canal_id" />
</group>
<newline/>
<field name="description" colspan="4" nolabel="1" />
</form>
<tree string="Resolution history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
<form string="Resolution history">
<group col="6" colspan="4">
<field name="date"/>
<field name="email" />
<field name="canal_id" />
</group>
<newline/>
<field name="description" colspan="4" nolabel="1" />
</form>
<tree string="Resolution history">
<field name="description"/>
<field name="email"/>
<field name="date"/>
</tree>
</field>
<group col="2" colspan="2" expand="1">
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration"/>
<button name="add_reply" string="Add Last Mail for Replying"
states="open" type="object" colspan="2"/>
<field name="description" colspan="2" nolabel="1"/>
@@ -44,5 +44,19 @@
<field name="action_id" ref="action_view_config_crm_menu"/>
<field name="state">open</field>
</record>
<!-- graph view -->
<record model="ir.ui.view" id="crm_case_graph_view_stage_cost">
<field name="name">CRM -Graph</field>
<field name="model">crm.case</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Cases By Stage and Estimates" type="bar" orientation="vertical">
<field name="stage_id"/>
<field name="planned_cost" operator="+"/>
<field name="planned_revenue" operator="+"/>
</graph>
</field>
</record>
</data>
</openerp>
+41 -40
View File
@@ -7,28 +7,33 @@
</record>
<!-- MENU -->
<menuitem name="Fund Raising" id="menu_crm_case_fund_raise" parent="crm.menu_crm"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund1">
<field name="name">Funds</field>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all1">
<field name="name">All Funds</field>
<field name="res_model">crm.case</field>
<field name="view_mode">form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund1">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_fund1">
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_all1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_fund_all1">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund1"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<menuitem name="New Fund Opportunity" id="menu_crm_case_categ0_act_fund" action="crm_case_category_act_fund1" parent="menu_crm_case_fund_raise"/>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_fund_all1">
<field name="sequence" eval="3"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<menuitem name="Fund Raising" id="menu_crm_case_fund_raise" parent="crm.menu_crm" action="crm_case_category_act_fund_all1"/>
<!-- My Funds -->
<record model="ir.actions.act_window" id="crm_case_category_act_fund_my1">
@@ -58,6 +63,27 @@
</record>
<menuitem name="My Funds" id="menu_crm_case_category_act_fund_my1" action="crm_case_category_act_fund_my1" parent="menu_crm_case_fund_raise"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund1">
<field name="name">Funds</field>
<field name="res_model">crm.case</field>
<field name="view_mode">form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund1">
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_fund1">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund1"/>
</record>
<menuitem name="New Fund Opportunity" id="menu_crm_case_categ0_act_fund" action="crm_case_category_act_fund1" parent="menu_crm_case_category_act_fund_my1"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_my2">
<field name="name">My Funds Waiting Validation</field>
<field name="res_model">crm.case</field>
@@ -113,31 +139,6 @@
<menuitem name="My Funds To Be Processed" id="menu_crm_case_categ0_act_fund_my3" action="crm_case_category_act_fund_my3" parent="menu_crm_case_category_act_fund_my1"/>
<!-- All Funds -->
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all1">
<field name="name">All Funds</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,graph</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support4)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_fund_all1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_configuration.crm_case_tree_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_fund_all1">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_configuration.crm_case_form_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_fund_all1">
<field name="sequence" eval="3"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_configuration.crm_case_graph_view_fund"/>
<field name="act_window_id" ref="crm_case_category_act_fund_all1"/>
</record>
<menuitem name="All Funds" id="menu_crm_case_categ0_act_fund_all1" action="crm_case_category_act_fund_all1" parent="menu_crm_case_fund_raise"/>
<record model="ir.actions.act_window" id="crm_case_category_act_fund_all2">
+9 -10
View File
@@ -28,28 +28,28 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Funds Form">
<notebook>
<page string="Funds">
<group colspan="4" col="6">
<field name="name" select="1" string="Name" colspan="2"/>
<field name="section_id" colspan="1"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)"/>
<newline/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration"/>
<field name="category2_id" select="1" string="Payment Mode"/>
</group>
<notebook>
<page string="Funds">
<field name="partner_id" select="1" on_change="onchange_partner_id(partner_id, email_from)" colspan="2"/>
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
<newline/>
<field name="email_from" colspan="2"/>
<field name="user_id" select="2" string="Responsible"/>
<separator colspan="4"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)"/>
<field name="category2_id" select="1" string="Payment Mode"/>
<newline/>
<separator colspan="4" string="Estimates"/>
<field name="planned_cost" string="Amount"/>
<field name="probability"/>
<field name="planned_cost"/>
<field name="planned_revenue"/>
<field name="probability" colspan="4"/>
<separator colspan="4" string="Description Information"/>
<field name="note" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="2"/>
@@ -61,7 +61,6 @@
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object"/>
</group>
</page>
<page string="Extra Info">
<field name="id"/>
<field name="active"/>
+49 -27
View File
@@ -6,8 +6,32 @@
<field name="code">support</field>
</record>
######################## Help Desk (menu) ###########################
<menuitem name="Helpdesk and Support" id="menu_help_support_main" parent="crm.menu_crm"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act111">
<field name="name">All Helpdesk Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('crm.section_support_help'))+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_act111">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_act111">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm.crm_case_calendar-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_act111">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<menuitem name="Helpdesk and Support" id="menu_help_support_main" parent="crm.menu_crm" action="crm_case_helpdesk_act111"/>
<record model="ir.actions.act_window" id="crm_case_categ_help_act">
<field name="name">My Helpdesk</field>
@@ -37,6 +61,28 @@
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_my_act" action="crm_case_categ_help_act"/>
<record model="ir.actions.act_window" id="crm_case_categ_help_new_act">
<field name="name">New Helpdesk</field>
<field name="res_model">crm.case</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm.crm_case-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('crm.section_support_help'))+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_helpdesk_tree_view1">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="act_window_id" ref="crm_case_categ_help_new_act"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_helpdesk_tree_view2">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_categ_help_new_act"/>
</record>
<menuitem parent="menu_crm_case_helpdesk_my_act" id="menu_crm_case_categ_help_new_act" action="crm_case_categ_help_new_act" sequence="1"/>
<record model="ir.actions.act_window" id="crm_case_helpdesk_act_my1">
<field name="name">My Unclosed Requests</field>
<field name="res_model">crm.case</field>
@@ -180,31 +226,7 @@
<!--
ALL Helpdesk REQUESTS
-->
<record model="ir.actions.act_window" id="crm_case_helpdesk_act111">
<field name="name">All Helpdesk Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(ref('crm.section_support_help'))+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_act111">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm.crm_case_tree-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_act111">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm.crm_case_calendar-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_act111">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm.crm_case-view"/>
<field name="act_window_id" ref="crm_case_helpdesk_act111"/>
</record>
<menuitem parent="menu_help_support_main" id="menu_crm_case_helpdesk_act_all" action="crm_case_helpdesk_act111"/>
+270 -177
View File
@@ -7,181 +7,10 @@
</record>
######################## JOB OPPORTUNITIES (menu) ###########################
<menuitem name="Jobs Requests" id="menu_crm_case_job_req_main" parent="crm.menu_crm"/>
<!--
MY JOBS REQUESTS
-->
<record model="ir.actions.act_window" id="crm_case_categ0_act11">
<field name="name">My Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view3">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<menuitem parent="menu_crm_case_job_req_main" id="menu_crm_case_categ0_act11" action="crm_case_categ0_act11"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my3">
<field name="name">My Unclosed Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my3">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my3">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my3">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs3" action="crm_case_categ0_act_my3"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my2">
<field name="name">My Jobs Propositions to Review</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my2">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my2">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs2" action="crm_case_categ0_act_my2"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my1">
<field name="name">My Pending Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'pending\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my1">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my1">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs1" action="crm_case_categ0_act_my1"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my0">
<field name="name">My Open Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my0">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my0">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my0">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs0" action="crm_case_categ0_act_my0"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_myjobs">
<field name="name">Calendar Of Jobs Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'done\'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_myjobs">
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_myjobs">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_myjobs">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs_myjobs" action="crm_case_categ0_act_myjobs"/>
<!--
ALL JOBS REQUESTS
-->
<record model="ir.actions.act_window" id="crm_case_categ0_act111">
<field name="name">All Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+')]'"/>
</record>
@@ -203,13 +32,247 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act111"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_act111">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act111"/>
</record>
<menuitem name="Jobs Requests" id="menu_crm_case_job_req_main" parent="crm.menu_crm" action="crm_case_categ0_act111"/>
<!--
MY JOBS REQUESTS
-->
<record model="ir.actions.act_window" id="crm_case_categ0_act11">
<field name="name">My Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view3">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act11"/>
</record>
<menuitem parent="menu_crm_case_job_req_main" id="menu_crm_case_categ0_act11" action="crm_case_categ0_act11"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my_new3">
<field name="name">New Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my3">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my_new3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my3">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my_new3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_my_new3" action="crm_case_categ0_act_my_new3"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my3">
<field name="name">My Unclosed Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my3">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my3">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my3">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_my3">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_my3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs3" action="crm_case_categ0_act_my3"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my2">
<field name="name">My Jobs Propositions to Review</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my2">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my2">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my2">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_my2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_my2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs2" action="crm_case_categ0_act_my2"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my1">
<field name="name">My Pending Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'pending\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my1">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my1">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my1">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_my1">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_my1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs1" action="crm_case_categ0_act_my1"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_my0">
<field name="name">My Open Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'open\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_my0">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_my0">
<field name="sequence" eval="2"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_my0">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_my0">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_my0"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs3" id="menu_crm_case_categ0_act_myjobs0" action="crm_case_categ0_act_my0"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_myjobs">
<field name="name">Calendar Of Jobs Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'done\'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_calendar_view_myjobs">
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_tree_view_myjobs">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_form_view_myjobs">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_myjobs">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_myjobs"/>
</record>
<menuitem parent="menu_crm_case_categ0_act11" id="menu_crm_case_categ0_act_myjobs_myjobs" action="crm_case_categ0_act_myjobs"/>
<!--
ALL JOBS REQUESTS
-->
<menuitem parent="menu_crm_case_job_req_main" id="menu_crm_case_categ0_act111" action="crm_case_categ0_act111"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all3">
<field name="name">All Unclosed Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'&lt;&gt;\',\'done\')]'"/>
</record>
@@ -231,12 +294,18 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_all3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_all3">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all3"/>
</record>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_all3" action="crm_case_categ0_act_all3"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all2">
<field name="name">All Jobs Propositions</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'draft\')]'"/>
</record>
@@ -258,12 +327,18 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_all2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_all2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all2" action="crm_case_categ0_act_all2"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all1">
<field name="name">All Pending Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'pending\')]'"/>
</record>
@@ -285,13 +360,19 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_all1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_all1">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all1" action="crm_case_categ0_act_all1"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_all0">
<field name="name">All Open Jobs Requests</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'open\')]'"/>
</record>
@@ -313,12 +394,18 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_all0"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_all0">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_all0"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_myjobs_all3" id="menu_crm_case_categ0_act_myjobs_all0" action="crm_case_categ0_act_all0"/>
<record model="ir.actions.act_window" id="crm_case_categ0_act_alljobs">
<field name="name">Calendar Of Jobs Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_mode">calendar,tree,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view11"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support0)+'),(\'state\',\'=\',\'done\')]'"/>
</record>
@@ -340,6 +427,12 @@
<field name="view_id" ref="crm_case_form_view11"/>
<field name="act_window_id" ref="crm_case_categ0_act_alljobs"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_sec_graph_view_alljobs">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_categ0_act_alljobs"/>
</record>
<menuitem parent="menu_crm_case_categ0_act111" id="menu_crm_case_categ0_act_myjobs_alljobs" action="crm_case_categ0_act_alljobs"/>
</data>
+9 -8
View File
@@ -30,12 +30,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Jobs - Recruitment Form">
<group colspan="4" col="6">
<field name="partner_name"/>
<field name="section_id" colspan="1"/>
<field name="categ_id" string="Applied Job" select="1" on_change="onchange_categ_id(categ_id)"/>
<newline/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration" widget="float_time"/>
<field name="category2_id" string="Degree" select="1"/>
</group>
<notebook>
<page string="Job Info">
<field name="name" string="Jobs Description" colspan="2"/>
<field name="section_id" colspan="1"/>
<newline/>
<field name="partner_name"/>
<field name="partner_name2"/>
<newline/>
<field name="partner_phone"/>
@@ -45,8 +51,6 @@
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
<newline/>
<separator colspan="4"/>
<field name="categ_id" string="Applied Job" select="1" on_change="onchange_categ_id(categ_id)"/>
<field name="category2_id" string="Degree" select="1"/>
<field name="priority" string="Quality"/>
<field name="probability" string="Availability (weeks)"/>
<newline/>
@@ -54,9 +58,6 @@
<field name="planned_revenue" string="Proposed Salary"/>
<field name="stage_id" colspan="2"/>
<field name="user_id" string="Responsible" select="2"/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration" widget="float_time"/>
<newline/>
<separator colspan="4"/>
<field name="history_line" colspan="2" nolabel="1" mode="tree,form">
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
+23 -22
View File
@@ -7,28 +7,6 @@
</record>
<!-- MENU -->
<record model="ir.actions.act_window" id="crm_case_category_act_leads">
<field name="name">Leads</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_leads">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads"/>
</record>
<menuitem parent="crm.menu_crm" id="menu_crm_case_categ0_act_leads" action="crm_case_category_act_leads"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all">
<field name="name">All Leads</field>
@@ -55,6 +33,7 @@
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_all"/>
</record>
<menuitem parent="crm.menu_crm" name="Leads" id="menu_crm_case_categ0_act_leads" action="crm_case_category_act_leads_all"/>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_all" action="crm_case_category_act_leads_all"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all1">
@@ -247,6 +226,28 @@
</record>
<menuitem parent="menu_crm_case_categ0_act_leads" id="menu_crm_case_categ0_act_leads_my" action="crm_case_category_act_leads_my"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my_new">
<field name="name">New Leads</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support2)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_leads_new">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my_new"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_leads_new">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_leads"/>
<field name="act_window_id" ref="crm_case_category_act_leads_my_new"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_leads_my" id="menu_crm_case_category_act_leads_my_new" action="crm_case_category_act_leads_my_new"/>
<record model="ir.actions.act_window" id="crm_case_category_act_leads_my1">
<field name="name">My Unclosed Leads</field>
<field name="res_model">crm.case</field>
+7 -5
View File
@@ -12,11 +12,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Leads Form">
<notebook>
<page string="Leads">
<field name="name" select="1" string="Name"/>
<group colspan="4" col="4">
<field name="name" select="1" string="Name"/>
<field name="section_id" colspan="1"/>
<newline/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration" widget="float_time"/>
</group>
<notebook>
<page string="Leads">
<field name="partner_name" string="Designation"/>
<field name="partner_name2" string="Email"/>
<newline/>
@@ -32,8 +36,6 @@
<field name="email_from"/>
<field name="priority" string="Priority"/>
<field name="category2_id" string="Campaign Type" select="1"/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration" widget="float_time"/>
<newline/>
<separator colspan="4" string="Description Information"/>
<field name="note" nolabel="1" colspan="4"/>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
+76 -75
View File
@@ -7,8 +7,62 @@
</record>
######################## MEETINGS (menu) ###########################
<record model="ir.actions.act_window" id="crm_case_categ_meet">
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet">
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form__meet">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<menuitem parent="crm.menu_crm" name="Meetings" id="menu_crm_case_category_act_meetings" action="crm_case_categ_meet"/>
<!--
MY MEETINGS
-->
<record model="ir.actions.act_window" id="crm_case_categ_meetmy">
<field name="res_model">crm.case</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_my">
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet_my">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_meet_my">
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<menuitem name="My Meetings" id="menu_crm_case_categ_meet_my" action="crm_case_categ_meetmy" parent="menu_crm_case_category_act_meetings"/>
<record model="ir.actions.act_window" id="crm_case_category_act_meetings">
<field name="name">Meetings</field>
<field name="name">New Meeting</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
@@ -26,59 +80,29 @@
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetings"/>
</record>
<menuitem parent="crm.menu_crm" id="menu_crm_case_category_act_meetings" action="crm_case_category_act_meetings"/>
<!--
MY MEETINGS
-->
<record model="ir.actions.act_window" id="crm_case_categ_meetmy">
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_my">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet_my">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_meet_my">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meetmy"/>
</record>
<menuitem name="My Meetings" id="menu_crm_case_categ_meet_my" action="crm_case_categ_meetmy" parent="menu_crm_case_category_act_meetings"/>
<menuitem parent="menu_crm_case_categ_meet_my" id="menu_crm_case_category_act_meetings_new" action="crm_case_category_act_meetings" sequence="1"/>
<record model="ir.actions.act_window" id="crm_case_category_act_meetmy1">
<field name="name">Draft Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'draft\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet_my1">
<field name="sequence" eval="3"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_meetmy1">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetmy1">
<field name="sequence" eval="2"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy1"/>
@@ -89,24 +113,24 @@
<record model="ir.actions.act_window" id="crm_case_category_act_meetmy2">
<field name="name">Confirmed Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'user_id\',\'=\',uid),(\'state\',\'=\',\'done\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetmy2">
<field name="sequence" eval="3"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_meetmy2">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetmy2">
<field name="sequence" eval="2"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetmy2"/>
@@ -117,52 +141,29 @@
<!--
ALL MEETINGS
-->
<record model="ir.actions.act_window" id="crm_case_categ_meet">
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="crm_case_calendar_view"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_meet">
<field name="sequence" eval="3"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_meet">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form__meet">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_categ_meet"/>
</record>
<menuitem name="All Meetings" id="menu_crm_case_categ_meet" action="crm_case_categ_meet" parent="menu_crm_case_category_act_meetings"/>
<record model="ir.actions.act_window" id="crm_case_category_act_meetall1">
<field name="name">Draft Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'state\',\'=\',\'draft\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetall1">
<field name="sequence" eval="3"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_meetall1">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetall1">
<field name="sequence" eval="2"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall1"/>
@@ -172,24 +173,24 @@
<record model="ir.actions.act_window" id="crm_case_category_act_meetall2">
<field name="name">Confirmed Meetings</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support1)+'),(\'state\',\'=\',\'done\')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetall2">
<field name="sequence" eval="3"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_meetall2">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetall2">
<field name="sequence" eval="2"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall2"/>
@@ -200,24 +201,24 @@
<field name="name">Next Deadlines</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">calendar,tree,form</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="domain" eval="[('section_id','=',str(section_support1)),('state','!=','done'),('date','>=',time.strftime('%Y-%m-%d'))]"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_calendar_view_meetall3">
<field name="sequence" eval="3"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="crm_case_calendar_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_meetall3">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_meetall3">
<field name="sequence" eval="2"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_meet"/>
<field name="act_window_id" ref="crm_case_category_act_meetall3"/>
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="crm.case.section" id="section_support3">
<record model="crm.case.section" id="section_support3">
<field name="name">Opportunities</field>
<field name="code">oppor</field>
</record>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
@@ -18,6 +18,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="75000.0" name="planned_cost"/>
<field eval="85000.0" name="planned_revenue"/>
<field name="section_id" ref="crm_configuration.section_support3"/>
<field eval="time.strftime('%Y-%m-07 10:05:15')" name="date"/>
<field name="categ_id" ref="crm_configuration.categ_oppor1"/>
@@ -33,6 +34,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;draft&quot;" name="state"/>
<field eval="30000.0" name="planned_cost"/>
<field eval="45000.0" name="planned_revenue"/>
<field eval="0.5" name="probability"/>
<field eval="8.0" name="duration"/>
<field name="section_id" ref="crm_configuration.section_support3"/>
@@ -51,6 +53,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;pending&quot;" name="state"/>
<field eval="50000.0" name="planned_cost"/>
<field eval="55000.0" name="planned_revenue"/>
<field eval="0.75" name="probability"/>
<field eval="10.0" name="duration"/>
<field name="section_id" ref="crm_configuration.section_support3"/>
@@ -70,6 +73,7 @@
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="50000.0" name="planned_cost"/>
<field eval="45000.0" name="planned_revenue"/>
<field eval="24.0" name="duration"/>
<field name="section_id" ref="crm_configuration.section_support3"/>
<field eval="time.strftime('%Y-%m-23 16:32:23')" name="date"/>
@@ -88,6 +92,7 @@
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;done&quot;" name="state"/>
<field eval="25000.0" name="planned_cost"/>
<field eval="42000.0" name="planned_revenue"/>
<field name="section_id" ref="crm_configuration.section_support3"/>
<field eval="time.strftime('%Y-%m-25 16:05:15')" name="date"/>
<field name="categ_id" ref="crm_configuration.categ_oppor2"/>
@@ -1,18 +1,15 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="crm.case.section" id="section_support3">
<record model="crm.case.section" id="section_support3">
<field name="name">Opportunities</field>
<field name="code">oppor</field>
</record>
<menuitem name="Opportunities" id="menu_crm_case_opp" parent="crm.menu_crm"/>
<!-- MENU -->
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">All Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_mode">tree,form,calendar,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
</record>
@@ -34,34 +31,22 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor11" action="crm_case_category_act_oppor11"/>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor11">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<menuitem name="Opportunities" id="menu_crm_case_opp" parent="crm.menu_crm" action="crm_case_category_act_oppor11"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor">
<field name="name">Opportunity</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<menuitem name="New Opportunity" parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor" action="crm_case_category_act_oppor"/>
<!-- MENU -->
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor11" action="crm_case_category_act_oppor11"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor1">
<field name="name">All Open Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'open\')]'"/>
</record>
@@ -83,13 +68,19 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor1"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor1">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor1"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor1" action="crm_case_category_act_oppor1"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor_all2">
<field name="name">All Pending Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'pending\')]'"/>
</record>
@@ -111,6 +102,12 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_all2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor_all2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_all2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor11" id="menu_crm_case_categ0_act_oppor_all2" action="crm_case_category_act_oppor_all2"/>
@@ -118,7 +115,7 @@
<record model="ir.actions.act_window" id="crm_case_category_act_oppor22">
<field name="name">My Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_calendar_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'user_id\',\'=\',uid)]'"/>
</record>
@@ -140,13 +137,40 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor22"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor22">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor22"/>
</record>
<menuitem parent="menu_crm_case_opp" id="menu_crm_case_categ0_act_oppor22" action="crm_case_category_act_oppor22"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor">
<field name="name">Opportunity</field>
<field name="res_model">crm.case</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor">
<field name="sequence" eval="1"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor">
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor"/>
</record>
<menuitem name="New Opportunity" parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor" action="crm_case_category_act_oppor"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor2">
<field name="name">My Open Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'open\'),(\'user_id\',\'=\',uid)]'"/>
</record>
@@ -168,12 +192,18 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor2" action="crm_case_category_act_oppor2"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor_my2">
<field name="name">My Pending Opportunities</field>
<field name="res_model">crm.case</field>
<field name="view_mode">tree,calendar,form</field>
<field name="view_mode">tree,calendar,form,graph</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+'),(\'state\',\'=\',\'pending\'),(\'user_id\',\'=\',uid)]'"/>
</record>
@@ -195,6 +225,12 @@
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_my2"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor_my2">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_stage_cost"/>
<field name="act_window_id" ref="crm_case_category_act_oppor_my2"/>
</record>
<menuitem parent="menu_crm_case_categ0_act_oppor22" id="menu_crm_case_categ0_act_oppor_my2" action="crm_case_category_act_oppor_my2"/>
<!-- REPORTS -->
@@ -204,7 +240,7 @@
<field name="view_mode">graph,tree</field>
<field name="domain" eval="'[(\'section_id\',\'=\','+str(section_support3)+')]'"/>
</record>
<menuitem name="Opportunity" parent="report_crm.next_id_64" id="menu_action_report_crm_case_oppor"/>
<menuitem name="Opportunity" parent="report_crm.next_id_64" id="menu_action_report_crm_case_oppor"/>
<menuitem name="Cases by Opportunities and User" parent="menu_action_report_crm_case_oppor" action="action_report_crm_case_oppor_user" id="menu_action_report_crm_case_oppor_user"/>
<record model="ir.actions.act_window" id="action_report_crm_case_oppor_categ">
@@ -12,27 +12,30 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Opportunities Form">
<notebook>
<page string="Opportunities">
<group colspan="4" col="6">
<field name="name" select="1" string="Name" colspan="2"/>
<field name="section_id" colspan="1"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Lead Source"/>
<newline/>
<field name="date" string="Next Meeting"/>
<field name="duration" string="Meeting Duration"/>
<field name="stage_id" select="1" string="Sales Stage"/>
</group>
<notebook>
<page string="Opportunities">
<field name="partner_id" select="1" on_change="onchange_partner_id(partner_id, email_from)" colspan="2"/>
<field name="partner_address_id" string="Contact" on_change="onchange_partner_address_id(partner_address_id, email_from)" colspan="1"/>
<newline/>
<field name="email_from" colspan="2"/>
<field name="user_id" select="2" string="Responsible"/>
<separator colspan="4"/>
<field name="categ_id" select="1" on_change="onchange_categ_id(categ_id)" string="Lead Source"/>
<field name="stage_id" select="1" string="Sales Stage"/>
<field name="category2_id" select="1" string="Type"/>
<field name="priority" string="Priority"/>
<newline/>
<separator colspan="4" string="Estimates"/>
<field name="planned_cost" string="Amount"/>
<field name="probability"/>
<field name="planned_cost"/>
<field name="planned_revenue"/>
<field name="probability" colspan="4"/>
<separator colspan="4" string="Description Information"/>
<field name="note" nolabel="1" colspan="4"/>
@@ -119,8 +122,8 @@
<field name="stage_id" string="Sales Stage"/>
<field name="categ_id" string="Lead Source"/>
<field name="category2_id" string="Type"/>
<field name="planned_cost" string="Amount"/>
<field name="probability"/>
<field name="planned_cost"/>
<field name="planned_revenue"/>
<field name="user_id"/>
<field name="state"/>
</tree>
-122
View File
@@ -35,127 +35,5 @@
<field name="product_id" ref="product_consultant"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
<record id="analytic_timesheet1" model="hr.analytic.timesheet">
<field name="amount">-240.0</field>
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
<field name="name">Letters</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Administratif')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet2" model="hr.analytic.timesheet">
<field name="amount">-120.0</field>
<field eval="time.strftime('%Y-%m-01')" name="date"/>
<field name="name">Support by phone</field>
<field name="unit_amount">4.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Seagate P1')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet3" model="hr.analytic.timesheet">
<field name="amount">-120.0</field>
<field eval="time.strftime('%Y-%m-01')" name="date"/>
<field name="name">Support</field>
<field name="unit_amount">4.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Seagate P2')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet4" model="hr.analytic.timesheet">
<field name="amount">-240.0</field>
<field eval="time.strftime('%Y-%m-02')" name="date"/>
<field name="name">Repport on this</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Seagate P1')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet5" model="hr.analytic.timesheet">
<field name="amount">-240.0</field>
<field eval="time.strftime('%Y-%m-03')" name="date"/>
<field name="name">Repport on that</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Seagate P1')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet6" model="hr.analytic.timesheet">
<field name="amount">-240.0</field>
<field eval="time.strftime('%Y-%m-04')" name="date"/>
<field name="name">Phone support</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Sednacom')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet7" model="hr.analytic.timesheet">
<field name="amount">-210.0</field>
<field name="name">Phone support on reporting engine</field>
<field eval="time.strftime('%Y-%m-05')" name="date"/>
<field name="unit_amount">7.0</field>
<field name="account_id" ref="base.res_partner_c2c"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet8" model="hr.analytic.timesheet">
<field name="amount">-210.0</field>
<field eval="time.strftime('%Y-%m-06')" name="date"/>
<field name="name">Quotation 234 done</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Agrolait')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet9" model="hr.analytic.timesheet">
<field name="amount">-210.0</field>
<field eval="time.strftime('%Y-%m-07')" name="date"/>
<field name="name">Quotation 356</field>
<field name="unit_amount">8.0</field>
<field model="account.analytic.account" name="account_id" search="[('name','=', 'Agrolait')]"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
<record id="analytic_timesheet10" model="hr.analytic.timesheet">
<field name="amount">-210.0</field>
<field eval="time.strftime('%Y-%m-08', time.localtime(time.mktime(time.localtime()[0:2] + (0,)*7)-1))" name="date"/>
<field name="name">Quotation 42</field>
<field name="unit_amount">5.0</field>
<field name="account_id" ref="account.analytic_agrolait"/>
<field name="product_id" ref="hr_timesheet.product_consultant"/>
<field name="product_uom_id" ref="hr_timesheet.uom_hour"/>
<field name="user_id" ref="base.user_root"/>
<field name="journal_id" ref="analytic_journal"/>
<field name="general_account_id" ref="account.a_recv"/>
</record>
</data>
</openerp>
-6
View File
@@ -1,6 +0,0 @@
# -*- encoding: utf-8 -*-
import lunch
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-15
View File
@@ -1,15 +0,0 @@
# -*- encoding: utf-8 -*-
{
"name": "Lunch Module",
"author": "Tiny",
"version": "0.1",
"depends": ["base", "process", "hr"],
"init_xml": [],
"update_xml": ['lunch_wizard.xml', 'lunch_view.xml', 'lunch_report.xml',
'process/lunch_process.xml'
],
"demo_xml": ['lunch_demo.xml'],
"installable": True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-171
View File
@@ -1,171 +0,0 @@
# -*- encoding: utf-8 -*-
from osv import osv, fields
import time
class lunch_category(osv.osv):
_name = 'lunch.category'
_description = "Category"
_columns = {
'name': fields.char('Name', required=True, size=50),
}
_order = 'name'
lunch_category()
class lunch_product(osv.osv):
_name = 'lunch.product'
def _category_name_get(self, cr, uid, context={}):
obj = self.pool.get('lunch.category')
cat_ids= obj.search(cr,uid,[])
res = obj.read(cr,uid,cat_ids,['name', 'category'])
return [(str(r['id']), r['name']) for r in res]+ [('0','')]
_columns = {
'name': fields.char('Name', size=50, required=True),
'category_id': fields.selection(_category_name_get, 'Category', size=32),
'description': fields.char('Description', size=128, required=False),
'price': fields.float('Price', digits=(16,2)),
'active': fields.boolean('Active'),
}
_defaults = {
'active': lambda *a : True,
}
lunch_product()
class lunch_cashbox(osv.osv):
_name='lunch.cashbox'
def amount_available(self, cr, uid, ids, field_name, arg, context):
cr.execute("SELECT box,sum(amount) from lunch_cashmove where active = 't' group by box")
r = dict(cr.fetchall())
for i in ids :
r.setdefault(i,0)
return r
_columns={
'manager':fields.many2one('res.users','Manager'),
'name':fields.char('Name',size=30,required=True, unique = True),
'sum_remain': fields.function(amount_available, method=True, string='Remained Total'),
}
lunch_cashbox()
class lunch_cashmove(osv.osv):
_name= 'lunch.cashmove'
_columns={
'name': fields.char('Name',size=128),
'user_cashmove': fields.many2one('res.users','User Name', required=True),
'amount': fields.float('Amount', digits=(16,2)),
'box':fields.many2one('lunch.cashbox','Box Name',size=30,required=True),
'active':fields.boolean('Active'),
'create_date': fields.datetime('Created date', readonly=True),
}
_defaults={
'active': lambda *a: True,
}
lunch_cashmove()
class lunch_order(osv.osv):
_name='lunch.order'
_rec_name= "user_id"
def _price_get(self, cr, uid, ids, name, args, context=None):
res = {}
for o in self.browse(cr, uid, ids):
res[o.id] = o.product.price
return res
_columns={
'user_id': fields.many2one('res.users','User Name', required=True,
readonly=True, states={'draft':[('readonly',False)]}),
'product':fields.many2one('lunch.product','Product', required=True,
readonly=True, states={'draft':[('readonly',False)]}, change_default=True),
'date': fields.date('Date',readonly=True,states={'draft':[('readonly',False)]}),
'cashmove':fields.many2one('lunch.cashmove', 'CashMove' , readonly=True ),
'descript':fields.char('Description Order', readonly=True, size=50,
states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft','Draft'), ('confirmed','Confirmed'),],
'State', readonly=True, select=True),
'price': fields.function(_price_get, method=True, string="Price"),
}
_defaults={
'user_id': lambda self,cr,uid,context: uid,
'date': lambda self,cr,uid,context: time.strftime('%Y-%m-%d'),
'state': lambda self,cr,uid,context: 'draft',
}
def confirm(self,cr,uid,ids,box,context):
cashmove_ref= self.pool.get('lunch.cashmove')
for order in self.browse(cr,uid,ids):
if order.state == 'confirmed':
continue
new_id= cashmove_ref.create(cr,uid,{'name': order.product.name+' order',
'amount':-order.product.price,
'user_cashmove':order.user_id.id,
'box':box,
'active':True,
})
self.write(cr,uid,[order.id],{'cashmove':new_id, 'state':'confirmed'})
return {}
def lunch_order_cancel(self,cr,uid,ids,context):
orders= self.browse(cr,uid,ids)
for order in orders:
if not order.cashmove:
continue
self.pool.get('lunch.cashmove').unlink(cr, uid, [order.cashmove.id])
self.write(cr,uid,ids,{'state':'draft'})
return {}
def onchange_product(self, cr, uid, ids, product):
if not product:
return {'value': {'price': 0.0}}
price = self.pool.get('lunch.product').read(cr, uid, product, ['price'])['price']
return {'value': {'price': price}}
lunch_order()
class report_lunch_amount(osv.osv):
_name='report.lunch.amount'
_description = "Amount available by user and box"
_auto = False
_rec_name= "user"
_columns = {
'user_id': fields.many2one('res.users','User Name',readonly=True),
'amount': fields.float('Amount', readonly=True, digits=(16,2)),
'box':fields.many2one('lunch.cashbox','Box Name',size=30,readonly=True),
}
def init(self, cr):
cr.execute("""
create or replace view report_lunch_amount as (
select
min(lc.id) as id,
lc.user_cashmove as user_id,
sum(amount) as amount,
lc.box as box
from
lunch_cashmove lc
where
active = 't'
group by lc.user_cashmove, lc.box
)""")
report_lunch_amount()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-20
View File
@@ -1,20 +0,0 @@
<?xml version="1.0"?>
<terp>
<data noupdate="1">
<record model="lunch.category" id="categ_sandwich">
<field name="name">Sandwich</field>
</record>
<record model="lunch.product" id="product_club">
<field name="name">Club</field>
<field name="category_id" eval="str(ref('categ_sandwich'))"/>
<field name="price">2.75</field>
</record>
<record model="lunch.cashbox" id="cashbox_cashbox">
<field name="name">Cashbox</field>
<field name="manager" ref="base.user_admin"/>
</record>
</data>
</terp>
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<terp>
<data>
<report
id="report_lunch_order"
string="Print Order"
model="lunch.order"
name="lunch.order"
rml="lunch/report/order.rml"
auto="False"
/>
</data>
</terp>
-232
View File
@@ -1,232 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Tools" id="menu_tools" icon="STOCK_PREFERENCES"/>
<menuitem name="Lunch" parent="menu_tools" id="menu_lunch" />
<menuitem name="Configuration" parent="menu_lunch" id="menu_lunch_category_root" sequence="1"/>
<record model="ir.ui.view" id="view_lunch_order_form">
<field name="name">Order</field>
<field name="model">lunch.order</field>
<field name="arch" type="xml">
<form string="Order">
<group colspan="2" col="4">
<field name="user_id" select="1"/>
<field name="date" select="1"/>
<field name="product" select="1" on_change="onchange_product(product)"/>
<field name="price"/>
<field name="descript"/>
<field name="cashmove"/>
<field name="state" select="2"/>
</group>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lunch_order_tree">
<field name="name">Order</field>
<field name="model">lunch.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Order">
<field name="user_id"/>
<field name="product"/>
<field name="date"/>
<field name="cashmove"/>
<field name="state"/>
<field name="descript"/>
<field name="price" sum="Total price"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_lunch_order_form">
<field name="name">Make order</field>
<field name="res_model">lunch.order</field>
<field name="view_mode">form,tree</field>
</record>
<menuitem name="Make order" parent="menu_lunch" id="menu_lunch_order_form" action="action_lunch_order_form"/>
<record model="ir.actions.act_window" id="action_lunch_order_day_form">
<field name="name"> Order of the day</field>
<field name="res_model">lunch.order</field>
<field name="domain">[('date','=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem name="Order of the day" parent="menu_lunch_order_form" id="menu_lunch_order_day_form" action="action_lunch_order_day_form"/>
<record model="ir.ui.view" id="view_lunch_cashbox_form">
<field name="name">CashBox</field>
<field name="model">lunch.cashbox</field>
<field name="arch" type="xml">
<form string="CashBox">
<field name="name" select="1"/>
<field name="manager" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lunch_cashbox_tree">
<field name="name">CashBox</field>
<field name="model">lunch.cashbox</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="CashBox" colors="red:sum_remain&lt;=0">
<field name="name" select="1"/>
<field name="manager" select="1"/>
<field name="sum_remain" select="1"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_lunch_cashbox_form">
<field name="name"> CashBox </field>
<field name="res_model">lunch.cashbox</field>
</record>
<menuitem name="CashBox" parent="menu_lunch_category_root" id="menu_lunch_cashbox_form" action="action_lunch_cashbox_form"/>
<record model="ir.ui.view" id="view_lunch_cashmove_form">
<field name="name">CashMove</field>
<field name="model">lunch.cashmove</field>
<field name="arch" type="xml">
<form string="CashMove">
<field name="name" select="1"/>
<field name="user_cashmove" select="1"/>
<field name="amount" select="2"/>
<field name="box" select="1"/>
<field name="create_date" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lunch_cashmove_tree">
<field name="name">CashMove</field>
<field name="model">lunch.cashmove</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="CashMove" editable="top">
<field name="name" select="1" required="1"/>
<field name="user_cashmove" select="1"/>
<field name="amount" select="1" sum="Total amount"/>
<field name="box" select="1"/>
<field name="create_date"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_lunch_cashmove_form">
<field name="name">CashMove</field>
<field name="res_model">lunch.cashmove</field>
</record>
<menuitem name="Cash Moves" parent="menu_lunch" id="menu_lunch_cashmove_form" action="action_lunch_cashmove_form"/>
<record model="ir.ui.view" id="view_lunch_category_form">
<field name="name"> Category of product </field>
<field name="model">lunch.category</field>
<field name="arch" type="xml">
<form string="Category">
<separator string="Category related to Products" colspan="4"/>
<field name="name" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lunch_category_tree">
<field name="name">Category</field>
<field name="model">lunch.category</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Order">
<field name="name" select="1"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_lunch_category_form">
<field name="name"> Category of product </field>
<field name="res_model">lunch.category</field>
</record>
<record model="ir.ui.view" id="view_lunch_product_form">
<field name="name">Products</field>
<field name="type">form</field>
<field name="model">lunch.product</field>
<field name="arch" type="xml">
<form string="Products">
<field name="name" select="1"/>
<field name="category_id" select="1"/>
<field name="description" select="1"/>
<field name="price" select="1"/>
<field name="active" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_lunch_product_tree">
<field name="name">Products</field>
<field name="model">lunch.product</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Products">
<field name="name" select="1"/>
<field name="category_id" select="1"/>
<field name="description" select="1"/>
<field name="price" select="1"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_lunch_product_form">
<field name="name">Product</field>
<field name="res_model">lunch.product</field>
</record>
<menuitem name="Tools/Lunch/Configuration/Products" id="menu_lunch_product_form" action="action_lunch_product_form" sequence="1"/>
<menuitem name="Products" parent="menu_lunch_category_root" id="menu_lunch_product_form" action="action_lunch_product_form" sequence="1"/>
<menuitem name="Category of product" parent="menu_lunch_product_form" id="menu_lunch_category_form" action="action_lunch_category_form" />
<record model="ir.ui.view" id="view_report_lunch_amount_tree">
<field name="name">Lunch amount</field>
<field name="model">report.lunch.amount</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Box Amount by User">
<field name="box" select="1"/>
<field name="user_id" select="1"/>
<field name="amount" select="1" sum="Total box" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_lunch_amount_form">
<field name="name">Lunch amount</field>
<field name="model">report.lunch.amount</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Box Amount by User">
<field name="user_id" select="1"/>
<field name="box" select="1"/>
<field name="amount" select="1"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_lunch_amount_tree">
<field name="name">Lunch amount</field>
<field name="res_model">report.lunch.amount</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Box Amount by User" parent="menu_lunch" action="action_report_lunch_amount_tree" id="menu_lunch_report_amount_tree"/>
</data>
</openerp>
-27
View File
@@ -1,27 +0,0 @@
<?xml version="1.0" ?>
<terp>
<data>
<wizard
string="Confirm Order"
model="lunch.order"
name="lunch.order.confirm"
keyword="client_action_multi"
id="lunch_order_confirm"/>
<wizard
string="Cancel Order"
model="lunch.order"
name="lunch.order.cancel"
keyword="client_action_multi"
id="wizard_id_cancel"/>
<wizard
string="Set CashBox to Zero"
model="lunch.cashbox"
name="lunch.cashbox.clean"
keyword="client_action_multi"
id="wizard_clean_cashbox"/>
</data>
</terp>
-25
View File
@@ -1,25 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="process_node_lunchbox0" model="process.node">
<field name="menu_id" ref="lunch.menu_lunch_product_form"/>
<field name="model_id" ref="lunch.model_lunch_product"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Lunchbox&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get lunchbox if he wants lunch&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr.process_process_employeecontractworkflow0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_transition_employeelunch0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee lunch&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get lunch&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_lunchbox0"/>
<field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
</record>
</data>
</openerp>
-4
View File
@@ -1,4 +0,0 @@
# -*- encoding: utf-8 -*-
import order
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-53
View File
@@ -1,53 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import time
from report import report_sxw
from osv import osv
class order(report_sxw.rml_parse):
def sum_price(self, orders):
res = 0.0
for o in orders:
res += o.price
return res
def __init__(self, cr, uid, name, context):
super(order, self).__init__(cr, uid, name, context)
self.localcontext.update({
'time': time,
'sum_price': self.sum_price,
})
report_sxw.report_sxw('report.lunch.order', 'lunch.order',
'addons/lunch/report/order.rml',parser=order, header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-132
View File
@@ -1,132 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="34.0" y1="42.0" width="527" height="758"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="15.0" leading="19"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="16.0" leading="20"/>
<paraStyle name="P3" fontName="Times-Roman"/>
<paraStyle name="P4" fontName="Times-Bold" fontSize="8.0" leading="10" alignment="CENTER"/>
<paraStyle name="P5" fontName="Times-BoldItalic" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P6" fontName="Times-BoldItalic" fontSize="9.0" leading="11"/>
<paraStyle name="P7" fontName="Times-Italic" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="9.0" leading="11"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="P12" fontName="Times-BoldItalic" fontSize="6.0" leading="8"/>
<paraStyle name="P13" fontName="Times-Italic" fontSize="9.0" leading="11" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="RIGHT"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Times-Roman"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<para style="P1">
<font face="Times-Roman">Printed at : [[time.strftime("%Hh%M")]]</font>
</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P3">
<font color="white"> </font>
</para>
<blockTable colWidths="149.0,135.0,103.0,140.0" repeatRows="1" style="Tableau2">
<tr>
<td>
<para style="P4">Name</para>
</td>
<td>
<para style="P4">Order</para>
</td>
<td>
<para style="P4">Description</para>
</td>
<td>
<para style="P4">Unit Price</para>
</td>
</tr>
</blockTable>
<section>
<para style="P5">
<font color="white"> </font>
</para>
</section>
<blockTable colWidths="148.0,135.0,103.0,140.0" style="Tableau1">
<tr>
<td>
<para style="P7">[[repeatIn(objects, 'o') ]]</para>
<para style="P7">[[ o.user_id.name ]]</para>
</td>
<td>
<para style="P8">[[o.product.name ]]</para>
</td>
<td>
<para style="P9">[[ o.descript ]]</para>
<para style="P10">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">[['%.2f' % o.price ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P11">[[ '%.2f' % sum_price(objects) ]]</para>
</td>
</tr>
</blockTable>
<para style="P6">
<font color="white"> </font>
</para>
</story>
</document>
-6
View File
@@ -1,6 +0,0 @@
# -*- encoding: utf-8 -*-
import confirm
import cancel
import reset_box
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-34
View File
@@ -1,34 +0,0 @@
# -*- encoding: utf-8 -*-
import wizard
import netsvc
import ir
import pooler
cancel_form = """<?xml version="1.0"?>
<form string="Cancel Order">
<label string="Are you sure you want to cancel this order ?"/>
</form>"""
cancel_fields = {
}
def _cancel(self,cr,uid,data,context):
return pooler.get_pool(cr.dbname).get('lunch.order').lunch_order_cancel(cr,uid,data['ids'],context)
class order_cancel(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type':'form', 'arch':cancel_form, 'fields':cancel_fields, 'state':[('end','No'),('cancel','Yes')]}
},
'cancel': {
'actions': [_cancel],
'result': {'type':'state', 'state':'end'}
}
}
order_cancel('lunch.order.cancel')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-67
View File
@@ -1,67 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import wizard
import netsvc
import ir
import pooler
confirm_order_form = """<?xml version="1.0"?>
<form title="Confirm">
<separator string="Orders Confirmation" colspan="4"/>
<field name="confirm_cashbox"/>
<newline/>
</form>
"""
confirm_order_fields = {
'confirm_cashbox': {'string':'Name of box', 'type':'many2one', 'required':True, 'relation':'lunch.cashbox' },
}
def _confirm(self,cr,uid,data,context):
pool= pooler.get_pool(cr.dbname)
order_ref = pool.get('lunch.order')
order_ref.confirm(cr,uid,data['ids'],data['form']['confirm_cashbox'],context)
return {}
class order_confirm(wizard.interface):
states = {
'init': {
'action':[],
'result':{'type' : 'form', 'arch' : confirm_order_form, 'fields' : confirm_order_fields, 'state' : [('end', 'Cancel'),('go', 'Confirm Order') ]},
},
'go' : {
'actions' : [_confirm],
'result' : {'type' : 'state', 'state' : 'end'}
},
}
order_confirm('lunch.order.confirm')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-56
View File
@@ -1,56 +0,0 @@
# -*- encoding: utf-8 -*-
import wizard
import netsvc
import ir
import pooler
set_to_zero_form = """<?xml version="1.0"?>
<form string="Reset cashbox">
<label string="Are you sure you want to reset this cashbox ?"/>
</form>"""
confirm_setting_zero_fields = {}
def _set_to_zero(self,cr,uid,data,context):
pool= pooler.get_pool(cr.dbname)
cashmove_ref = pool.get('lunch.cashmove')
cr.execute("select user_cashmove, box,sum(amount) from lunch_cashmove where active= 't' and box in (%s) group by user_cashmove, box"%','.join(map(str,data['ids'])))
res= cr.fetchall()
cr.execute("update lunch_cashmove set active = 'f' where active= 't' and box in (%s)"%','.join(map(str,data['ids'])))
## to_unactive= {}.fromkeys([r[0] for r in cr.fetchall]).keys()
## print to_unactive
## cashmove_ref.write(cr,uid,to_unactive,{'active':False})
##
for (user_id,box_id,amount) in res:
cashmove_ref.create(cr,uid,{'name': 'Summary for user'+ str(user_id),
'amount': amount,
'user_cashmove': user_id,
'box': box_id,
'active': True,
})
return {}
class cashbox_set_to_zero(wizard.interface):
states = {
'init': {
'action':[],
'result':{'type' : 'form',
'arch' : set_to_zero_form,
'fields' : confirm_setting_zero_fields,
'state' : [('end', 'Cancel'),('zero', 'Set to Zero') ]},
},
'zero' : {
'actions' : [_set_to_zero],
'result' : {'type' : 'state', 'state' : 'end'}
},
}
cashbox_set_to_zero('lunch.cashbox.clean')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+7 -2
View File
@@ -176,8 +176,13 @@ class mrp_bom(osv.osv):
'name': fields.char('Name', size=64, required=True),
'code': fields.char('Code', size=16),
'active': fields.boolean('Active'),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True, help="Use a phantom bill of material in lines that have a sub-bom and that have to be automatically computed in one line, without having two production orders."),
'type': fields.selection([('normal','Normal BoM'),('phantom','Sets / Phantom')], 'BoM Type', required=True, help=
"Use a phantom bill of material in raw materials lines that have to be " \
"automatically computed in on eproduction order and not one per level." \
"If you put \"Phantom/Set\" at the root level of a bill of material " \
"it is considered as a set or pack: the products are replaced by the components " \
"between the sale order to the picking without going through the production order." \
"The normal BoM will generate one production order per BoM level."),
'method': fields.function(_compute_type, string='Method', method=True, type='selection', selection=[('',''),('stock','On Stock'),('order','On Order'),('set','Set / Pack')]),
'date_start': fields.date('Valid From', help="Validity of this BoM or component. Keep empty if it's always valid."),
-5
View File
@@ -1,5 +0,0 @@
# -*- encoding: utf-8 -*-
import partner
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-18
View File
@@ -1,18 +0,0 @@
# -*- encoding: utf-8 -*-
{
"name" : "Partner extension to synchronize TinyERP with ldap",
"version" : "1.0",
"author" : "Tiny",
"depends" : ["base", "hr", "process"],
"category" : "Generic Modules/Inventory Control",
"description": "Synchronise partners through a LDAP module. Has been used to synchronise partners in Outlook and Tiny ERP.",
"init_xml" : [],
"demo_xml" : [],
"update_xml" : ["wizard.xml",
"process/partner_ldap_process.xml"
],
"active": False,
"installable": True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-42
View File
@@ -1,42 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from osv import osv, fields
class address_ldap(osv.osv):
_inherit = 'res.partner.address'
_columns = {
'dn' : fields.char('Distinguished name', size=128),
}
address_ldap()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -1,33 +0,0 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="process_node_ldap0" model="process.node">
<field name="model_id" ref="base.model_res_partner_address"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;LDAP&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;LDAP (all services)&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr.process_process_employeecontractworkflow0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_transition_employeeldap0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee LDAP&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get all services of that company&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_ldap0"/>
<field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
</record>
<record id="process_transition_ldapuser0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;LDAP User&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Create your own openerp user&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="hr.process_node_openerpuser0"/>
<field model="process.node" name="source_node_id" ref="process_node_ldap0"/>
</record>
</data>
</openerp>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" ?>
<terp>
<data>
<wizard string="Synchronize with ldap" model="res.partner.address" name="partners.sync_ldap" id="wizard_ldap_sync" />
<menuitem name="Partners/Synchronize With Ldap" action="wizard_ldap_sync" type="wizard" />
</data>
</terp>
-4
View File
@@ -1,4 +0,0 @@
# -*- encoding: utf-8 -*-
import synchronize
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-149
View File
@@ -1,149 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id$
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import sys
if sys.version_info[:2] < (2, 4):
from sets import Set as set
import time
import ldap
import ldap.modlist
import wizard
import pooler
BASE_DN = 'ou=addressbook,dc=localdomain'
def terp2ldap(data):
res = {}
for ldap_name, terp in LDAP_TERP_MAPPER.items():
if callable(terp) and terp(data):
res[ldap_name] = [terp(data)]
elif isinstance(terp, basestring) and data[terp]:
res[ldap_name] = ['%s' % data[terp]]
return res
def get_lastname(dico):
lnames = dico['name'].split(' ', 1)[1:]
if lnames:
return ' '.join(lnames)
else:
return dico['name']
def get_street(dico):
return ' '.join([dico[x] for x in ('street', 'street2') if dico[x]])
def get_name(attribute):
def func(dico):
return dico[attribute][1]
return func
LDAP_TERP_MAPPER = {
'displayname': 'name',
'mail': 'email',
'o': get_name('partner_id'),
'telephoneNumber': 'phone',
'street': get_street,
'postalcode': 'zip',
'l': 'city',
'cn': 'name',
'sn': get_lastname,
'uid': 'id',
}
class sync_ldap(wizard.interface):
_login_arch = '''<?xml version="1.0" ?>
<form string="LDAP Credentials">
<field name="ldap_host" colspan="4" />
<field name="dn" colspan="4" />
<field name="password" colspan="4" />
</form>
'''
_login_fields = {
'ldap_host': {'string': 'LDAP Host', 'type': 'char', 'size': 128},
'dn': {'string': 'Distinguished name', 'type': 'char', 'size': 128},
'password': {'string': 'Password', 'type': 'char', 'size': 128},
}
def _do_sync(self, cr, uid, data, context):
l = ldap.open(data['form']['ldap_host'])
l.simple_bind_s(data['form']['dn'], data['form']['password'])
ldap_objs = dict(l.search_s(BASE_DN, ldap.SCOPE_ONELEVEL, 'objectclass=*',
LDAP_TERP_MAPPER.keys()))
address = pooler.get_pool(cr.dbname).get('res.partner.address')
terp_objs = dict([(x['id'], x) for x in address.read(cr, uid, address.search(cr, uid, []))])
ldap_set = [int(x['uid'][0]) for x in ldap_objs.values()]
terp_set = terp_objs.keys()
for to_delete in ldap_set:
if to_delete in terp_set:
continue
l.delete_s('uid=%s,%s' % (to_delete, BASE_DN))
for to_add in terp_set:
if to_add in ldap_set:
continue
new_dn = 'uid=%s,%s' % (to_add, BASE_DN)
ldap_data = {'objectclass' : ['organizationalPerson', 'inetOrgPerson']}
ldap_data.update(terp2ldap(terp_objs[to_add]))
l.add_s(new_dn, ldap.modlist.addModlist(ldap_data))
address.write(cr, uid, [to_add], {'dn' : new_dn})
for to_update in terp_set:
if to_update not in ldap_set:
continue
current_dn = 'uid=%s,%s' % (to_update, BASE_DN)
modlist = ldap.modlist.modifyModlist(ldap_objs[current_dn], terp2ldap(terp_objs[to_update]))
if modlist:
l.modify_s(current_dn, modlist)
return {}
states = {
'init' : {
'actions' : [],
'result' : {
'type' : 'form',
'arch' : _login_arch,
'fields' : _login_fields,
'state' : (('end', 'Cancel'),('sync', 'Synchronize'))
},
},
'sync' : {
'actions' : [ _do_sync ],
'result' : { 'type' : 'state', 'state' : 'end' },
},
}
sync_ldap('partners.sync_ldap')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+28 -8
View File
@@ -132,7 +132,7 @@ class project(osv.osv):
'warn_footer': fields.text('Mail footer'),
'notes': fields.text('Notes'),
'timesheet_id': fields.many2one('hr.timesheet.group', 'Working Time'),
'state': fields.selection([('template', 'Template'), ('open', 'Open'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True),
'state': fields.selection([('template', 'Template'), ('open', 'Open'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', required=True, readonly=True),
}
_defaults = {
@@ -153,6 +153,22 @@ class project(osv.osv):
res = self.setActive(cr, uid, ids, value=False, context=context)
return res
def set_done(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'done'}, context=context)
return True
def set_cancel(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'cancelled'}, context=context)
return True
def set_pending(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'pending'}, context=context)
return True
def set_open(self, cr, uid, ids, context={}):
self.write(cr, uid, ids, {'state':'open'}, context=context)
return True
def reset_project(self, cr, uid, ids, context={}):
res = self.setActive(cr, uid, ids,value=True, context=context)
return res
@@ -176,7 +192,11 @@ class project(osv.osv):
project_ids = [x[0] for x in res]
for child in project_ids:
self.duplicate_template(cr, uid, [child],context={'parent_id':new_id})
return True
# TODO : Improve this to open the new project (using a wizard)
cr.commit()
raise osv.except_osv(_('Operation Done'), _('A new project has been created !\nWe suggest you to close this one and work on this new project.'))
# set active value for a project, its sub projects and its tasks
def setActive(self, cr, uid, ids, value=True, context={}):
@@ -269,12 +289,12 @@ class task(osv.osv):
'history': fields.function(_history_get, method=True, string="Task Details", type="text"),
'notes': fields.text('Notes'),
'planned_hours': fields.float('Planned Hours', readonly=True, states={'draft':[('readonly',False)]}, required=True),
'effective_hours': fields.function(_hours_get, method=True, string='Hours Spent', multi='hours', store=True),
'remaining_hours': fields.float('Remaining Hours', digits=(16,2)),
'total_hours': fields.function(_hours_get, method=True, string='Total Hours', multi='hours', store=True),
'progress': fields.function(_hours_get, method=True, string='Progress (%)', multi='hours', store=True),
'delay_hours': fields.function(_hours_get, method=True, string='Delay Hours', multi='hours', store=True),
'planned_hours': fields.float('Planned Hours', readonly=True, states={'draft':[('readonly',False)]}, required=True, help='Estimated time to do the task, usually set by the project manager when the task is in draft state.'),
'effective_hours': fields.function(_hours_get, method=True, string='Hours Spent', multi='hours', store=True, help="Computed using the sum of the task work done."),
'remaining_hours': fields.float('Remaining Hours', digits=(16,2), help="Total remaining time, can be re-estimated periodically by the assignee of the task."),
'total_hours': fields.function(_hours_get, method=True, string='Total Hours', multi='hours', store=True, help="Computed as: Time Spent + Remaining Time."),
'progress': fields.function(_hours_get, method=True, string='Progress (%)', multi='hours', store=True, help="Computed as: Time Spent / Total Time."),
'delay_hours': fields.function(_hours_get, method=True, string='Delay Hours', multi='hours', store=True, help="Computed as: Total Time - Estimated Time. It gives the difference of the time estimated by the project manager and the real time to close the task."),
'user_id': fields.many2one('res.users', 'Assigned to'),
'partner_id': fields.many2one('res.partner', 'Partner'),
+19
View File
@@ -6,6 +6,19 @@
Resource: project.project
-->
<record id="project_tt_analysis" model="project.task.type">
<field name="name">Analysis</field>
</record>
<record id="project_tt_feature" model="project.task.type">
<field name="name">New Feature</field>
</record>
<record id="project_tt_quote" model="project.task.type">
<field name="name">Quotation</field>
</record>
<record id="project_tt_bug" model="project.task.type">
<field name="name">Bug</field>
</record>
<record id="project_project_9" model="project.project">
<field name="warn_manager">1</field>
<field name="name">Tiny ERP Integration</field>
@@ -37,6 +50,7 @@
<record id="project_task_116" model="project.task">
<field name="planned_hours">38.0</field>
<field name="remaining_hours">38.0</field>
<field name="type" ref="project_tt_feature"/>
<field name="user_id" ref="base.user_root"/>
<field name="project_id" ref="project_project_22"/>
<field name="description">BoM, After sales returns, interventions. Tracability.</field>
@@ -45,6 +59,7 @@
<record id="project_task_130" model="project.task">
<field name="planned_hours">16.0</field>
<field name="remaining_hours">16.0</field>
<field name="type" ref="project_tt_feature"/>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project_project_23"/>
<field name="name">Data importation + Doc</field>
@@ -52,6 +67,7 @@
<record id="project_task_131" model="project.task">
<field name="planned_hours">16.0</field>
<field name="remaining_hours">16.0</field>
<field name="type" ref="project_tt_feature"/>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project_project_23"/>
<field name="name">Modifications asked by the customer.</field>
@@ -59,6 +75,7 @@
<record id="project_task_184" model="project.task">
<field name="planned_hours">16.0</field>
<field name="remaining_hours">16.0</field>
<field name="type" ref="project_tt_feature"/>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="priority">0</field>
<field name="project_id" ref="project_project_21"/>
@@ -68,6 +85,7 @@
<field name="sequence">15</field>
<field name="planned_hours">8.0</field>
<field name="remaining_hours">8.0</field>
<field name="type" ref="project_tt_feature"/>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="project_id" ref="project_project_21"/>
<field name="name">Internal testing + Software Install</field>
@@ -77,6 +95,7 @@
<field name="sequence">17</field>
<field name="planned_hours">16.0</field>
<field name="remaining_hours">16.0</field>
<field name="type" ref="project_tt_feature"/>
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
<field name="priority">2</field>
<field name="project_id" ref="project_project_21"/>
+18 -4
View File
@@ -30,11 +30,17 @@
<newline/>
<separator colspan="4" string="Project's members"/>
<field colspan="4" name="members" nolabel="1"/>
<group col="6" colspan="8">
<group col="9" colspan="8">
<field name="state"/>
<button name="set_template" string="Set as Template" type="object" states="open"/>
<button name="set_open" string="Reopen Project" type="object" states="pending,cancelled,done"/>
<button name="set_pending" string="Set as Pending" type="object" states="open"/>
<button name="set_cancel" string="Set as Cancel" type="object" states="open,pending"/>
<button name="set_done" string="Set as Done" type="object" states="open,pending"/>
<button name="reset_project" string="Reset as Project" type="object" states="template"/>
<button name="duplicate_template" string="Duplicate Template" type="object" states="template"/>
<button name="duplicate_template" string="New Project Based on Template"
type="object"
states="template"/>
</group>
</page>
<page groups="base.group_extended" string="Partner Info">
@@ -48,6 +54,7 @@
<field name="warn_header" nolabel="1" colspan="2"/>
<field name="warn_footer" nolabel="1" colspan="2"/>
<group col="3" colspan="4">
<separator string="Automatic variables for headers and footer. Use exactly the same notation." colspan="4"/>
<label string="Task: %%(name)s"/>
<label string="User: %%(user_id)s"/>
<label string="ID: %%(task_id)s"/>
@@ -472,6 +479,15 @@
<act_window domain="[('manager', '=', active_id)]" id="act_res_users_2_project_project" name="User's projects" res_model="project.project" src_model="res.users" view_mode="tree,form" view_type="form"/>
<act_window
domain="[('project_id', '=', active_id)]"
id="act_project_project_2_project_task_new"
name="Create a Task"
res_model="project.task"
src_model="project.project"
view_mode="form,tree,calendar,graph"
view_type="form"/>
<act_window
domain="[('project_id', '=', active_id)]"
id="act_project_project_2_project_task_all"
@@ -490,8 +506,6 @@
view_mode="tree,form,calendar,graph"
view_type="form"/>
<act_window id="act_project_project_2_project_task_all" name="All tasks" res_model="project.task" src_model="project.project" view_mode="tree,form" view_type="form"/>
<record id="task_company" model="ir.ui.view">
<field name="name">res.company.task.config</field>
<field name="model">res.company</field>
+1
View File
@@ -31,6 +31,7 @@
import wizard
from tools import email_send as email
import pooler
from osv import osv
mail_form = """<?xml version="1.0" ?>
<form string="Send mail to customer">
-6
View File
@@ -1,6 +0,0 @@
# -*- encoding: utf-8 -*-
import sandwich
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-14
View File
@@ -1,14 +0,0 @@
# -*- encoding: utf-8 -*-
{
"name" : "Sandwich Module",
"author" : "Tiny",
"version" : "1.0",
"category" : "Generic Modules/Others",
"depends" : ["base", "product"],
"demo_xml" : ["sandwich_demo.xml"],
"update_xml" : ["sandwich_view.xml", "sandwich_report.xml", "sandwich_wizard.xml"],
"active": False,
"installable": True
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-4
View File
@@ -1,4 +0,0 @@
# -*- encoding: utf-8 -*-
import sandwich_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-45
View File
@@ -1,45 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import time
from report import report_sxw
#
# sandwich command report
#
class sandwich_order_print(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(sandwich_order_print, self).__init__(cr, uid, name, context)
self.localcontext.update( {
'time': time,
})
report_sxw.report_sxw('report.sandwich.order.print','sandwich.order','addons/sandwich/report/sandwich_report.rml',parser=sandwich_order_print)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-142
View File
@@ -1,142 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#c0c0c0" start="0,0" stop="0,0"/>
<blockBackground colorName="#c0c0c0" start="1,0" stop="1,0"/>
<blockBackground colorName="#c0c0c0" start="2,0" stop="2,0"/>
<blockBackground colorName="#c0c0c0" start="3,0" stop="3,0"/>
<blockBackground colorName="#c0c0c0" start="4,0" stop="4,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="RIGHT"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="12.0" leading="15"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="12.0" leading="15"/>
<paraStyle name="P5" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="12.0" leading="15"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="RIGHT"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="P9" fontName="Times-Roman" alignment="RIGHT"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<para style="P1">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="280.0,202.0" repeatRows="1" style="Tableau2">
<tr>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P2">[[ o.partner['name'] ]]</para>
<para style="P2">[[ o.partner.address[0]['street'] ]]</para>
<para style="P2">[[ o.partner.address[0]['street2'] ]]</para>
<para style="P2">[[ o.partner.address[0]['zip'] ]], [[ o.partner.address[0]['city'] ]]</para>
<para style="P2">[[ o.partner.address[0].state_id['name'] ]]</para>
<para style="P2">[[ o.partner.address[0].country_id['name'] ]]</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P2">Phone : [[ o.partner.address[0]['phone'] ]]</para>
<para style="P2">FAX : [[ o.partner.address[0]['fax'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P2">Document : [[ o['name'] ]]</para>
<para style="P2">Date : [[ o['date'] ]]</para>
<para style="P3">Printing date : [[ time.strftime('%d/%m/%Y') ]]</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<blockTable colWidths="192.0,71.0,87.0,69.0,64.0" style="Tableau1">
<tr>
<td>
<para style="P5">Item</para>
</td>
<td>
<para style="Table Heading">Quantity</para>
</td>
<td>
<para style="Table Heading">User</para>
</td>
<td>
<para style="Table Heading">Unit price</para>
</td>
<td>
<para style="Table Heading">Total Price</para>
</td>
</tr>
<tr>
<td>
<para style="P6"><b>[[ repeatIn(o.order_lines, 'a') ]]</b>
[[ a.product_id['name'] ]]</para>
</td>
<td>
<para style="P8">[[ a['quantity'] ]]</para>
</td>
<td>
<para style="P8">[[ a.user_id['login'] ]]</para>
</td>
<td>
<para style="P9">[[ a.product_id['price'] ]]</para>
</td>
<td>
<para style="P9">[[ a.product_id['price'] * a['quantity'] ]]</para>
</td>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">[[ o['note'] ]]</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P10">
<font color="white"> </font>
</para>
</story>
</document>
-101
View File
@@ -1,101 +0,0 @@
# -*- encoding: utf-8 -*-
import time
from osv import osv, fields
import pooler
#
# Type of type of products (food, drink, lsd, other...)
#
class sandwich_product_type(osv.osv):
_name = 'sandwich.product.type'
_columns = {
'name': fields.char('Name of the type', size=20, required=True),
'description': fields.char('Type\'s description', size=255),
}
sandwich_product_type()
#
# Type Of Sandwich
#
class sandwich_product(osv.osv):
_name = 'sandwich.product'
_columns = {
'name': fields.char('Product name', size=50, required=True),
'price': fields.float('Product price'),
'product_type_id': fields.many2one('sandwich.product.type','Type of product'),
}
sandwich_product()
#
# Sandwich command
#
class sandwich_order(osv.osv):
_name = 'sandwich.order'
_columns = {
'name': fields.char('Name', size=50, required=True),
'date': fields.date('Order date'),
'order_lines': fields.one2many('sandwich.order.line','order_id','Order lines'),
'note': fields.text('Notes'),
'partner': fields.many2one('res.partner','Partner', required=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
}
sandwich_order()
#
# Sandwich lines of command
#
class sandwich_order_line(osv.osv):
_name = 'sandwich.order.line'
_columns = {
'name': fields.char('Description', size=50, required=True),
'product_id': fields.many2one('sandwich.product', 'Product'),
'user_id': fields.many2one('res.users', 'User id', required=True),
'quantity': fields.integer('Quantity', required=True),
'order_id': fields.many2one('sandwich.order', 'Order'),
'date': fields.date('Date'),
'product_type_id':fields.many2one('sandwich.product.type','Product type',change_default=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'user_id': lambda self, cr, uid, c: uid,
'quantity': lambda *a: 1
}
def onchange_user_id(self, cr, uid, id, user_id, product_type_id, context={}, *args):
# print id, user_id, product_type_id, context
if (not user_id) or (not product_type_id):
return {}
cr.execute('SELECT product_id,name,quantity FROM sandwich_order_line WHERE user_id=%d AND product_type_id=%d ORDER BY date DESC LIMIT 1', (user_id, product_type_id))
res = cr.dictfetchone()
if res:
return {'value': res}
# else
return {'value': {'product_id': False, 'name': '', 'quantity': 1}}
def onchange_product_type_id(self, cr, uid, id, user_id, product_type_id, context={}):
if (not product_type_id) or (not user_id):
return {}
cr.execute('SELECT product_id,name,quantity FROM sandwich_order_line WHERE user_id=%d AND product_type_id=%d ORDER BY date DESC LIMIT 1', (user_id, product_type_id))
res = cr.dictfetchone()
if res:
return {'value': res}
# else
return {'value': {'product_id': False, 'name': '', 'quantity': 1}}
def onchange_product_id(self, cr, uid, id, product_id, context={}):
if not product_id:
return {}
res = pooler.get_pool(cr.dbname).get('sandwich.product').read(cr, uid, [ product_id ], ['name','product_type_id'])
return {'value': res}
#return {'value': {'name': name or product_id.name, 'product_type_id': product_id.product_type_id}}
sandwich_order_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-81
View File
@@ -1,81 +0,0 @@
<?xml version="1.0"?>
<terp>
<data noupdate="1">
<record model="sandwich.product.type" id="sandwich">
<field name="name">sandwich</field>
<field name="description">something to eat</field>
</record>
<record model="sandwich.product.type" id="drink">
<field name="name">drink</field>
<field name="description">Something to drink</field>
</record>
<record model="sandwich.product.type" id="candy">
<field name="name">candy</field>
<field name="description">so sweeeeeet, but so bad for your teeth...</field>
</record>
<record model="sandwich.product" id="club">
<field name="name">club</field>
<field name="price">2.00</field>
<field name="product_type_id" ref="sandwich"/>
</record>
<record model="sandwich.product" id="chicken_curry">
<field name="name">chicken-curry</field>
<field name="price">2.00</field>
<field name="product_type_id" ref="sandwich"/>
</record>
<record model="sandwich.product" id="tuna">
<field name="name">Tuna</field>
<field name="price">2.50</field>
<field name="product_type_id" ref="sandwich"/>
</record>
<record model="sandwich.product" id="cheese">
<field name="name">cheese</field>
<field name="price">1.50</field>
<field name="product_type_id" ref="sandwich"/>
</record>
<record model="sandwich.product" id="little_coke">
<field name="name">Little Coke 0.5l</field>
<field name="price">1.05</field>
<field name="product_type_id" ref="drink"/>
</record>
<record model="sandwich.product" id="coke">
<field name="name">Coke 1.0l</field>
<field name="price">2.00</field>
<field name="product_type_id" ref="drink"/>
</record>
<record model="sandwich.product" id="big_coke">
<field name="name">Big Coke 2.0l</field>
<field name="price">3.50</field>
<field name="product_type_id" ref="drink"/>
</record>
<record model="sandwich.product" id="cecemel">
<field name="name">Cecemel</field>
<field name="price">1.35</field>
<field name="product_type_id" ref="drink"/>
</record>
<record model="sandwich.product" id="water">
<field name="name">water</field>
<field name="price">0.75</field>
<field name="product_type_id" ref="drink"/>
</record>
<record model="sandwich.product" id="mars">
<field name="name">Mars</field>
<field name="price">0.80</field>
<field name="product_type_id" ref="candy"/>
</record>
<record model="sandwich.product" id="snicker">
<field name="name">Snickers</field>
<field name="price">0.80</field>
<field name="product_type_id" ref="candy"/>
</record>
<record model="sandwich.product" id="twix">
<field name="name">Twix</field>
<field name="price">1.00</field>
<field name="product_type_id" ref="candy"/>
</record>
</data>
</terp>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0"?>
<terp>
<data>
<report id="sandwich_order_print"
string="Sandwichs order"
model="sandwich.order"
name="sandwich.order.print"
rml="sandwich/report/sandwich_report.rml"
auto="False"/>
</data>
</terp>
-191
View File
@@ -1,191 +0,0 @@
<terp>
<data>
<menuitem name="Tools" id="menu_tools" icon="STOCK_PREFERENCES"/>
<record model="ir.ui.view" id="sandwich_product_type_view_form">
<field name="name">sandwich.product.type</field>
<field name="model">sandwich.product.type</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product type definition">
<field name="name" select="1"/>
<field name="description" select="1" />
</form>
</field>
</record>
<record model="ir.ui.view" id="sandwich_product_type_view_tree">
<field name="name">sandwich.product.type</field>
<field name="model">sandwich.product.type</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Product type definition">
<field name="name"/>
<field name="description"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_sandwich_product_type">
<field name="res_model">sandwich.product.type</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="domain">[]</field>
</record>
<menuitem name="Sandwich" id="menu_tools_sandwich" parent="menu_tools"/>
<menuitem name="Configuration" id="menu_tools_sandwich_configuration" parent="menu_tools_sandwich"/>
<menuitem name="Type of Product" id="menu_tools_sandwich_type_product" parent="menu_tools_sandwich_configuration" action="action_sandwich_product_type"/>
<record model="ir.ui.view" id="sandwich_product_view_tree">
<field name="name">sandwich.product</field>
<field name="model">sandwich.product</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Product definition">
<field name="name"/>
<field name="price"/>
<field name="product_type_id"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="sandwich_product_view_form">
<field name="name">sandwich.product</field>
<field name="model">sandwich.product</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product definition">
<field name="name" select="1"/>
<field name="price" select="1" />
<field name="product_type_id" select="1"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_sandwich_product">
<field name="res_model">sandwich.product</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[]</field>
</record>
<menuitem name="Product" id="menu_tools_sandwich_product" parent="menu_tools_sandwich_configuration" action="action_sandwich_product"/>
<record model="ir.ui.view" id="sandwich_order_line_view_tree">
<field name="name">sandwich.order.line.tree</field>
<field name="model">sandwich.order.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Product order lines">
<field name="date"/>
<field name="product_id"/>
<field name="quantity"/>
<field name="user_id" />
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="sandwich_order_line_view_form">
<field name="name">sandwich.order.line.form</field>
<field name="model">sandwich.order.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Product order lines">
<field name="product_type_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
<field name="user_id" select="1" on_change="onchange_user_id(user_id,product_type_id)"/>
<field name="product_id" select="1" onchange="onchange_product_id(product_id)" domain="[('product_type_id','=',product_type_id)]"/>
<field name="quantity" select="1"/>
<field name="name" select="1"/>
<field name="date" select="1"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_sandwich_order_line">
<field name="res_model">sandwich.order.line</field>
<field name="view_type">form</field>
<field name="domain">[]</field>
<field name="view_id" ref="sandwich_order_line_view_form"/>
</record>
<menuitem name="Order Lines" id="menu_tools_sandwich_orderlines" parent="menu_tools_sandwich" action="action_sandwich_order_line"/>
<record model="ir.actions.act_window" id="action_sandwich_my_order_line">
<field name="name">My order lines</field>
<field name="res_model">sandwich.order.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid)]</field>
</record>
<menuitem name="My Order Lines" id="menu_tools_sandwich_my_orderlines" parent="menu_tools_sandwich_orderlines" action="action_sandwich_my_order_line"/>
<record model="ir.actions.act_window" id="action_sandwich_my_order_line_of_the_day">
<field name="name">My order lines of the day</field>
<field name="res_model">sandwich.order.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('date','=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem name="My Order Lines of the Day" id="menu_tools_sandwich_my_orderlines_day" parent="menu_tools_sandwich_my_orderlines" action="action_sandwich_my_order_line_of_the_day"/>
<record model="ir.actions.act_window" id="action_sandwich_order_line_of_the_day">
<field name="name">Order lines of the day</field>
<field name="res_model">sandwich.order.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('date','=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem name="Order Lines of the Day" id="menu_tools_sandwich_orderlines_day" parent="menu_tools_sandwich_orderlines" action="action_sandwich_order_line_of_the_day"/>
<record model="ir.ui.view" id="sandwich_order_view_tree">
<field name="name">sandwich.order.tree</field>
<field name="model">sandwich.order</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Ordering of this day sandwich">
<field name="order_lines"/>
<field name="name"/>
<field name="note"/>
<field name="partner"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="sandwich_order_view_form">
<field name="name">sandwich.order.form</field>
<field name="model">sandwich.order</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Ordering of this day sandwich">
<notebook>
<page string="Sandwich Order">
<separator string="Informations" colspan="4"/>
<field name="name" colspan="4" select="1"/>
<field name="partner" select="1"/>
<field name="date" select="1"/>
<separator string="Order lines" colspan="4"/>
<field name="order_lines" colspan="4"/>
</page>
<page string="notes">
<field name="note" colspan="4" nolabel="1" select="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_sandwich_order">
<field name="name">Today's orders</field>
<field name="res_model">sandwich.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="False"/>
<field name="domain">[('date','=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem name="Today's Orders" id="menu_tools_sandwich_today_order" parent="menu_tools_sandwich" action="action_sandwich_order"/>
</data>
</terp>
-16
View File
@@ -1,16 +0,0 @@
<?xml version="1.0"?>
<terp>
<data>
<wizard string="Reload / Complete order" id="sandwich_order_wizard" model="sandwich.order" name="sandwich.order.wizard"/>
<wizard string="Send remind request" id="sandwich_order_recall_wizard" model="sandwich.order" name="sandwich.order.recall.wizard"/>
<record model="ir.actions.wizard" id="wiz_sandwich_create">
<field name="name">Create Order of the day</field>
<field name="wiz_name">sandwich.order_create</field>
</record>
<menuitem name="Create Order" id="menu_tools_sandwich_createorder" parent="menu_tools_sandwich" action="wiz_sandwich_create" type="wizard"/>
</data>
</terp>
-32
View File
@@ -1,32 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import sandwich_wizard
import order_create
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-83
View File
@@ -1,83 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: makesale.py 1183 2005-08-23 07:43:32Z pinky $
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from mx.DateTime import now
import wizard
import netsvc
import ir
import pooler
sale_form = """<?xml version="1.0"?>
<form string="Make an order">
<field name="name" required="True" />
<field name="partner_id" required="True" />
</form>"""
sale_fields = {
'name' : {'string' : 'Order name', 'type': 'char'},
'partner_id' : {'string':'Suplier', 'relation':'res.partner', 'type':'many2one'},
}
class make_sale(wizard.interface):
def _makeOrder(self, cr, uid, data, context):
order = pooler.get_pool(cr.dbname).get('sandwich.order')
line = pooler.get_pool(cr.dbname).get('sandwich.order.line')
oid = order.create(cr, uid, {
'name': data['form']['name'],
'partner': data['form']['partner_id'],
})
name=data['form']['name']
cr.execute('update sandwich_order_line set order_id=%d where order_id is null', (oid,))
value = {
'domain': "[('id','in',["+str(oid)+"])]",
'name': "Create Sandwich Orders:"+name,
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'sandwich.order',
'view_id': False,
'type': 'ir.actions.act_window',
'res_id': oid
}
return value
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form', 'arch' : sale_form, 'fields' : sale_fields, 'state' : [('end', 'Cancel'),('order', 'Make an order')]}
},
'order' : {
'actions': [],
'result': {'type': 'action', 'action': _makeOrder, 'state':'end'},
}
}
make_sale('sandwich.order_create')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-131
View File
@@ -1,131 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import wizard
import pooler
#
# This class fill in the order with kind of automatically generated order lines, based on the last order for a user concerning a type of product
#
class sandwich_order_wizard(wizard.interface):
def _sandwich_order_wizard_order(self, cr, uid, data, context):
if not len(data['ids']):
return {}
cr.execute('update sandwich_order_line set order_id=%d where order_id is null', (data['ids'][0],))
for order in pooler.get_pool(cr.dbname).get('sandwich.order').browse(cr, uid, data['ids']):
for user_id in data['form']['user_id'][0][2]:
for producttype in data['form']['product_type_id'][0][2]:
if not pooler.get_pool(cr.dbname).get('sandwich.order.line').search(cr, uid, [('user_id','=',user_id),('product_type_id','=',producttype),('order_id','=',order.id)]):
vals = {
'user_id': user_id,
'order_id': order.id,
'date': order.date,
'product_type_id': producttype
}
vals.update( pooler.get_pool(cr.dbname).get('sandwich.order.line').onchange_user_id(cr, uid, uid, user_id, producttype)['value'] )
pooler.get_pool(cr.dbname).get('sandwich.order.line').create(cr, uid, vals)
return {}
_sandwich_order_wizard_form = '''<?xml version="1.0"?>
<form string="Complete order">
<separator string="Set orders for the day" colspan="4"/>
<field name="user_id"/>
<field name="product_type_id"/>
</form> '''
_sandwich_order_wizard_fields = {
'user_id': {'string': 'User', 'type': 'many2many','relation':'res.users'},
'product_type_id': {'string': 'Product', 'type': 'many2many', 'relation':'sandwich.product.type'},
}
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':_sandwich_order_wizard_form, 'fields':_sandwich_order_wizard_fields, 'state':[('end','Cancel'),('complete','Complete order')]}
},
'complete': {
'actions': [_sandwich_order_wizard_order],
'result': {'type': 'state', 'state': 'end'}
}
}
sandwich_order_wizard('sandwich.order.wizard')
#
# This class send a request message to users who don't have their order filled in for this day
#
class sandwich_order_recall_wizard(wizard.interface):
def _sandwich_order_recall_wizard_send(self, cr, uid, data, context):
for user_id in data['form']['user_id'][0][2]:
if not pooler.get_pool(cr.dbname).get('sandwich.order.line').search(cr, uid, [('user_id','=',user_id),('order_id','=',data['id'])]):
request = pooler.get_pool(cr.dbname).get('res.request')
request.create(cr, uid, {
'name' : "Please order your lunch of the day",
'priority' : '0',
'state' : 'active',
'body' : """Hello,
It seems like you have forgotten to order your sandwich (or meal).
As it will be ordered soon, it seems to be a rather nice idea to complete your
order for today ASAP. If you do not, you'll probably get the same meal as yesterday...
Thanks,
--
Tiny ERP
""",
'act_from' : uid,
'act_to' : user_id,
})
return {}
_sandwich_order_recall_wizard_form = '''<?xml version="1.0"?>
<form string="Recall orders to users">
<separator string="List of user to remind the order" colspan="4"/>
<field name="user_id" colspan="4"/>
</form>'''
_sandwich_order_recall_wizard_fields = {
'user_id': {'string': 'Baaaad users !', 'type': 'many2many', 'relation': 'res.users'},
}
states = {
'init' : {
'actions' : [],
'result' : {'type': 'form', 'arch': _sandwich_order_recall_wizard_form, 'fields': _sandwich_order_recall_wizard_fields, 'state': [('end','Cancel'),('send','Send')]},
},
'send' : {
'actions' : [_sandwich_order_recall_wizard_send],
'result' : {'type': 'state', 'state': 'end'},
}
}
sandwich_order_recall_wizard('sandwich.order.recall.wizard')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: