[MERGE] merge with trunk addons

bzr revid: mra@mra-laptop-20100625115959-4h420qp32u11n9k8
This commit is contained in:
Mustufa Rangwala
2010-06-25 17:29:59 +05:30
54 changed files with 995 additions and 576 deletions
-2
View File
@@ -1620,8 +1620,6 @@
<act_window domain="[('journal_id', '=', active_id)]" id="act_account_journal_2_account_move_line" name="Entry lines" res_model="account.move.line" src_model="account.journal"/>
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_partner_account_move_unreconciled" name="Unreconciled Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables &amp; Payables" res_model="account.move.line" src_model="res.partner"/>
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
View File
@@ -18,8 +18,6 @@
<field name="product_id" invisible="1"/>
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
<field name="categ_id" invisible="1"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty"/>
<field name="state" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="currency_id" invisible="1"/>
@@ -29,6 +27,8 @@
<field name="address_invoice_id" invisible="1"/>
<field name="partner_bank" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="nbr" sum="# of Lines"/>
<field name="product_qty"/>
<field name="reconciled" sum="# Reconciled"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
@@ -57,31 +57,31 @@
<field name="arch" type="xml">
<search string="Invoices Analysis">
<group col="10" colspan="12">
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Invoices during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Invoices during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Current"
icon="terp-check"
domain="[('state','in',('draft','open'))]"
help = "Draft and Open Invoices"/>
<filter string="Pro-forma"
icon="terp-check"
domain="[('state','=','proforma'),('state','=','proforma2')]"
help = "Pro-forma Invoices"/>
<filter string="Current"
domain="[('state', '=' ,'open')]"
help = "open Invoices"/>
<filter string="Done"
icon="terp-check"
domain="[('state','in',('draft','open'))]"
help = "Draft and Open Invoices"/>
<filter string="Pro-forma"
icon="terp-check"
domain="[('state','=','proforma'),('state','=','proforma2')]"
help = "Pro-forma Invoices"/>
<filter string="Current"
domain="[('state', '=' ,'open')]"
help = "open Invoices"/>
<filter string="Done"
icon="terp-dialog-close"
domain="[('state','=','paid')]"
help = "Done Invoices"/>
@@ -89,14 +89,14 @@
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-dolar"
string="My Invoices"
help="My Invoices"
domain="[('user_id','=',uid)]"/>
string="My Invoices"
help="My Invoices"
domain="[('user_id','=',uid)]"/>
</field>
</group>
<newline/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Salesman" name='User' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
<separator orientation="vertical"/>
@@ -111,9 +111,9 @@
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<newline/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
@@ -139,11 +139,19 @@
<field name="res_model">account.invoice.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_invoice_report_search"/>
</record>
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statistic_report_statement" sequence="0"/>
<act_window
domain="[('partner_id', '=', active_id)]"
id="act_account_invoice_partner_relation"
name="Monthly Turnover"
context="{'search_default_month':1,'search_default_user':1,'group_by_no_leaf':1,'group_by':[]}"
res_model="account.invoice.report"
src_model="res.partner"/>
</data>
</openerp>
View File
View File
View File
+10 -8
View File
@@ -153,13 +153,15 @@ class account_analytic_account(osv.osv):
def name_get(self, cr, uid, ids, context={}):
if not len(ids):
return []
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
res = []
for record in reads:
name = record['name']
if record['parent_id']:
name = record['parent_id'][1]+' / '+name
res.append((record['id'], name))
for account in self.browse(cr, uid, ids, context=context):
data = []
acc = account
while acc:
data.insert(0, acc.name)
acc = acc.parent_id
data = ' / '.join(data)
res.append((account.id, data))
return res
def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
@@ -197,7 +199,7 @@ class account_analytic_account(osv.osv):
'date': fields.date('Date End'),
'company_id': fields.many2one('res.company', 'Company', required=True),
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'),
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True,
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
help='* When an account is created its in \'Draft\' state.\
\n* If any associated partner is there, it can be in \'Open\' state.\
\n* If any pending balance is there it can be in \'Pending\'. \
@@ -314,7 +316,7 @@ class account_analytic_line(osv.osv):
_columns = {
'name' : fields.char('Description', size=256, required=True),
'date' : fields.date('Date', required=True),
'date' : fields.date('Date', required=True, select=1),
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price.'),
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
+7 -7
View File
@@ -2,13 +2,13 @@
<openerp>
<data noupdate="1">
<record model="ir.ui.view_sc" id="sc_auction_dash">
<field name="name">Auction dashboard</field>
<field name="user_id" ref="base.user_root"/>
<field name="resource">ir.ui.menu</field>
<field name="sequence">4</field>
<field name="res_id" ref="menu_board_auction"/>
</record>
<!-- <record model="ir.ui.view_sc" id="sc_auction_dash">-->
<!-- <field name="name">Auction dashboard</field>-->
<!-- <field name="user_id" ref="base.user_root"/>-->
<!-- <field name="resource">ir.ui.menu</field>-->
<!-- <field name="sequence">4</field>-->
<!-- <field name="res_id" ref="menu_board_auction"/>-->
<!-- </record>-->
</data>
</openerp>
+1 -1
View File
@@ -179,7 +179,7 @@
<record id="res_partner_job_2" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_3"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;info@mediapole.net&quot;&quot;&quot;" name="email"/>
<field eval="&quot;&quot;&quot;info@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_passot0"/>
</record>
<record id="res_partner_job_3" model="res.partner.job">
+7 -8
View File
@@ -118,20 +118,18 @@ class crm_case(object):
@param context: A standard dictionary for contextual values"""
if not context:
context = {}
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage = False
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
st = case.stage_id.id or False
if st in s[section]:
data = {'stage_id': s[section][st]}
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
stage = s[section][st]
self.write(cr, uid, [case.id], data)
return True
return stage
def get_stage_dict(self, cr, uid, ids, context=None):
"""This function gives dictionary for stage according to stage levels
@@ -174,9 +172,10 @@ class crm_case(object):
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
data = {'stage_id': s[section][st]}
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
if s[section][st]:
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data)
return True
+11 -5
View File
@@ -120,8 +120,8 @@ and users by email"),
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
'partner_name': fields.char("Partner Name", size=64),
'optin': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-In'),
'optout': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-Out'),
'optin': fields.boolean('Opt-In'),
'optout': fields.boolean('Opt-Out'),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
@@ -153,8 +153,6 @@ and users by email"),
'user_id': crm_case._get_default_user,
'email_from': crm_case._get_default_email,
'state': lambda *a: 'draft',
'optin': lambda *a: 'unknown',
'optout': lambda *a: 'unknown',
'section_id': crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
@@ -238,6 +236,15 @@ and users by email"),
}
return value
def stage_next(self, cr, uid, ids, context=None):
stage = super(crm_lead, self).stage_next(cr, uid, ids, context)
if stage:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
if stage_obj.on_change:
data = {'probability': stage_obj.probability}
self.write(cr, uid, ids, data)
return stage
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
@@ -361,7 +368,6 @@ and users by email"),
@param **args: Return Dictionary of Keyword Value
"""
return True
crm_lead()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -55,7 +55,7 @@
<field name="categ_id" ref="crm.categ_oppor7"/>
<field name="stage_id" ref="crm.stage_oppor5"/>
<field eval="&quot;Mediapole - 5000 units&quot;" name="name"/>
<field eval="&quot;info@mediapole.net&quot;" name="email_from"/>
<field eval="&quot;info@mycompany.net&quot;" name="email_from"/>
</record>
<record id="crm_case_abcfuelcounits0" model="crm.lead">
<field eval="40" name="probability"/>
+2
View File
@@ -154,6 +154,8 @@
<field name="fax"/>
<newline/>
<field name="mobile"/>
<field name="optin"/>
<field name="optout"/>
</group>
</page>
-1
View File
@@ -38,7 +38,6 @@
<field name="model">crm.phonecall</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
+4 -4
View File
@@ -77,7 +77,6 @@ class crm_lead_report(osv.osv):
'name': fields.char('Year', size=64, required=False, readonly=True),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"),
'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"),
@@ -92,10 +91,10 @@ class crm_lead_report(osv.osv):
'create_date': fields.datetime('Create Date', readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'email': fields.integer('# of Emails', size=128, readonly=True),
'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
'probability': fields.float('Probability',digits=(16,2),readonly=True),
'probability': fields.float('Probability',digits=(16,2),readonly=True, group_operator="avg"),
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category',\
domain="[('section_id','=',section_id),\
@@ -107,6 +106,7 @@ class crm_lead_report(osv.osv):
'opening_date': fields.date('Opening Date', readonly=True),
'creation_date': fields.date('Creation Date', readonly=True),
'date_closed': fields.date('Close Date', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'type':fields.selection([
+52 -62
View File
@@ -23,35 +23,15 @@
<field name="partner_id" invisible="1"/>
<field name="day" invisible="1"/>
<field name="nbr" sum="# Leads"/>
<field name="email" sum="#Mails"/>
<field name="delay_open" sum='Avg Closing Delay'/>
<field name="delay_close" sum='Avg Closing Delay'/>
<field name="email" sum="# Mails"/>
<field name="delay_open"/>
<field name="delay_close"/>
<field name="delay_expected"/>
<field name="avg_answers"/>
</tree>
</field>
</record>
<!-- Leads by user and section Form View -->
<record id="view_report_crm_lead_form" model="ir.ui.view">
<field name="name">crm.lead.report.form</field>
<field name="model">crm.lead.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Leads Analysis">
<field name="name" select="1"/>
<field name="month" select="1"/>
<field name="user_id" select="1"/>
<field name="section_id" select="1"/>
<field name="nbr" select="1"/>
<field name="delay_close"/>
<field name="stage_id"/>
<field name="state" select="1"/>
</form>
</field>
</record>
<!-- Leads by user and section Graph View -->
<record id="view_report_crm_lead_graph" model="ir.ui.view">
@@ -75,37 +55,49 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Leads Analysis">
<group col="16" colspan="8">
<filter string="Last 365 Days" icon="terp-go-year"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
<filter string="Last 30 Days" icon="terp-go-month" name="This Month"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
<group col="20" colspan="8">
<filter icon="terp-check"
string="Opportunities"
name="opportunity"
domain="[('type','=','opportunity')]"/>
<filter icon="terp-check"
string="Leads"
name="lead"
domain="[('type','=','lead')]"/>
<separator orientation="vertical" />
<filter string="Last 365 Days" icon="terp-go-year"
domain="[('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
domain="[('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
<filter icon="terp-go-week" string="7 Days" separator="1"
domain="[('create_date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical" />
domain="[('create_date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
<separator orientation="vertical" />
<filter icon="terp-check"
string="Current"
domain="[('state','in',('draft','open')]"/>
<filter icon="terp-check"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical" />
<field name="section_id"
default="context.get('section_id', False)"
widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My section" />
</field>
<field name="user_id" widget="selection">
<filter icon="terp-check"
string="Closed"
domain="[('state','=','done')]"/>
<separator orientation="vertical" />
<field name="section_id"
default="context.get('section_id', False)"
widget="selection"
context="{'invisible_section': False}">
<filter icon="terp-crm"
context="{'invisible_section': False}"
domain="[('section_id.user_id','=',uid)]"
help="My section" />
</field>
<field name="user_id" widget="selection">
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
</field>
</field>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="User" name="User" icon="terp-personal"
<filter string="User" name="user" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
<separator orientation="vertical" />
@@ -133,19 +125,19 @@
<filter string="Year" icon="terp-go-year"
domain="[]" context="{'group_by':'name'}" />
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="creation_date"/>
<field name="opening_date"/>
<field name="date_closed"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="partner_id"/>
<separator orientation="vertical"/>
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="creation_date"/>
<field name="opening_date"/>
<field name="date_closed"/>
</group>
</search>
</field>
</record>
@@ -187,10 +179,9 @@
<field name="name">Leads Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{'search_default_opportunity':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">['|',('type', '=', 'lead'),('type', '=', False)]</field>
<field name="search_view_id" ref="view_report_crm_lead_filter"/>
<field name="domain">[]</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_lead_tree">
@@ -211,10 +202,9 @@
<field name="name">Opportunities Analysis</field>
<field name="res_model">crm.lead.report</field>
<field name="view_type">form</field>
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="context">{"search_default_opportunity": 1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_mode">tree,graph</field>
<field name="domain">[('type', '=', 'opportunity')]</field>
<field name="search_view_id" ref="view_report_crm_lead_filter"/>
<field name="domain">[]</field>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_tree">
+78 -48
View File
@@ -4,62 +4,92 @@
<!-- Partners inherited form -->
<record id="view_crm_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.crm.info.inherit</field>
<record id="view_crm_partner_info_form1" model="ir.ui.view">
<field name="name">res.partner.crm.info.inherit1</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook[last()]" position="after">
<notebook colspan="4">
<page string="CRM">
<field name="meeting_ids" colspan="4" nolabel="1" />
<field name="phonecall_ids" colspan="4" nolabel="1" />
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
<field name="create_date"/>
<field name="partner_name"/>
<field name="name"/>
<field name="email_from"/>
<field name="phone"/>
<page string="History" position="inside">
<field name="meeting_ids" colspan="4" nolabel="1" >
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
<field name="user_id" string="Responsible"/>
<field name="name" string="Subject" />
<field name="date" string="Start Date" />
<field name="date_deadline" string="End Date"/>
</tree>
</field>
</page>
</field>
</record>
<field name="categ_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="referred" invisible="1"/>
<record id="view_crm_partner_info_form2" model="ir.ui.view">
<field name="name">res.partner.crm.info.inherit2</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="phonecall_ids" colspan="4" nolabel="1">
<tree string="Phone Calls" colors="gray:state in ('draft', 'cancel','done','pending')">
<field name="date" string="Date"/>
<field name="name" string="Call Summary"/>
<field name="categ_id"/>
<field name="user_id"/>
<field name="state"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
</tree>
</field>
</page>
</field>
</record>
<field name="stage_id"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id" />
<field name="state" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button string="Convert to Opportunity"
name="convert_opportunity"
states="draft,open,pending" icon="gtk-index"
type="object" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</page>
</notebook>
</xpath>
<record id="view_crm_partner_info_form3" model="ir.ui.view">
<field name="name">res.partner.crm.info.inherit3</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
<tree string="Opportunities" colors="blue:state=='pending';grey:state=='cancel')">
<field name="create_date"/>
<field name="name"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id" />
<field name="state" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Close"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button string="Convert to Opportunity"
name="convert_opportunity"
states="draft,open,pending" icon="gtk-index"
type="object" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</tree>
</field>
</page>
</field>
</record>
</data>
</openerp>
@@ -81,9 +81,7 @@ class crm_lead2opportunity(osv.osv_memory):
'partner_id': this.partner_id.id,
'type': 'opportunity'
}
lead_obj.write(cr, uid, lead.id, vals, context=context)
lead_obj._history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
value = {
+1 -6
View File
@@ -107,12 +107,7 @@ class crm_send_new_email(osv.osv_memory):
body = obj.text
body = case_pool.format_body(body)
email_from = getattr(obj, 'email_from', False)
x_headers = {
'model': model,
'resource-id': res_id
}
email_from = getattr(obj, 'email_from', False)
if message_id:
x_headers['References'] = "%s" % (message_id)
+18 -9
View File
@@ -222,39 +222,41 @@ class email_template(osv.osv):
'template_language' : lambda *a:'mako',
}
_sql_constraints = [
('name', 'unique (name)', _('The template name must be unique !'))
]
def create(self, cr, uid, vals, context=None):
id = super(email_template, self).create(cr, uid, vals, context)
src_obj = self.pool.get('ir.model').read(cr, uid, vals['object_name'], ['model'], context)['model']
def create_action(self, cr, uid, ids, context):
vals = {}
template_obj = self.browse(cr, uid, ids)[0]
src_obj = template_obj.object_name.model
vals['ref_ir_act_window'] = self.pool.get('ir.actions.act_window').create(cr, uid, {
'name': _("%s Mail Form") % vals['name'],
'name': _("%s Mail Form") % template_obj.name,
'type': 'ir.actions.act_window',
'res_model': 'email_template.send.wizard',
'src_model': src_obj,
'view_type': 'form',
'context': "{'src_model':'%s','template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, id),
'context': "{'src_model':'%s','template_id':'%d','src_rec_id':active_id,'src_rec_ids':active_ids}" % (src_obj, template_obj.id),
'view_mode':'form,tree',
'view_id': self.pool.get('ir.ui.view').search(cr, uid, [('name', '=', 'email_template.send.wizard.form')], context=context)[0],
'target': 'new',
'auto_refresh':1
}, context)
vals['ref_ir_value'] = self.pool.get('ir.values').create(cr, uid, {
'name': _('Send Mail (%s)') % vals['name'],
'name': _('Send Mail (%s)') % template_obj.name,
'model': src_obj,
'key2': 'client_action_multi',
'value': "ir.actions.act_window," + str(vals['ref_ir_act_window']),
'object': True,
}, context)
self.write(cr, uid, id, {
self.write(cr, uid, ids, {
'ref_ir_act_window': vals['ref_ir_act_window'],
'ref_ir_value': vals['ref_ir_value'],
}, context)
return id
return True
def unlink(self, cr, uid, ids, context=None):
def unlink_action(self, cr, uid, ids, context):
for template in self.browse(cr, uid, ids, context):
obj = self.pool.get(template.object_name.model)
try:
@@ -264,6 +266,13 @@ class email_template(osv.osv):
self.pool.get('ir.values').unlink(cr, uid, template.ref_ir_value.id, context)
except:
raise osv.except_osv(_("Warning"), _("Deletion of Record failed"))
def delete_action(self, cr, uid, ids, context):
self.unlink_action(cr, uid, ids, context)
return True
def unlink(self, cr, uid, ids, context=None):
self.unlink_action(cr, uid, ids, context)
return super(email_template, self).unlink(cr, uid, ids, context)
def copy(self, cr, uid, id, default=None, context=None):
@@ -41,6 +41,7 @@ class email_template_mailbox(osv.osv):
return True
def send_this_mail(self, cr, uid, ids=None, context=None):
result = True
for id in (ids or []):
try:
account_obj = self.pool.get('email_template.account')
@@ -114,6 +114,10 @@
<field name="file_name" colspan="2" />
<field name="report_template" colspan="2"
domain="[('model','=',model_int_name)]" />
<group colspan="2">
<button name="create_action" string="Create Action" type="object" colspan="1" attrs="{'invisible':[('ref_ir_act_window','!=',False), ('ref_ir_value','!=',False)]}"/>
<button name="delete_action" string="Delete Action" type="object" colspan="1" attrs="{'invisible':[('ref_ir_act_window','=',False), ('ref_ir_value','=',False)]}"/>
</group>
</page>
</notebook>
</form>
+7 -7
View File
@@ -6,13 +6,13 @@
Administrator shortcut
Demo user startup menu
-->
<record model="ir.ui.view_sc" id="sc_association_dash">
<field name="name">Dashboard</field>
<field name="user_id" ref="base.user_root"/>
<field name="resource">ir.ui.menu</field>
<field name="sequence">1</field>
<field name="res_id" ref="menu_board_associations_manager"/>
</record>
<!-- <record model="ir.ui.view_sc" id="sc_association_dash">-->
<!-- <field name="name">Dashboard</field>-->
<!-- <field name="user_id" ref="base.user_root"/>-->
<!-- <field name="resource">ir.ui.menu</field>-->
<!-- <field name="sequence">1</field>-->
<!-- <field name="res_id" ref="menu_board_associations_manager"/>-->
<!-- </record>-->
<record model="res.users" id="base.user_root">
<field name="action_id" ref="open_board_associations_manager"/>
</record>
+33 -7
View File
@@ -50,7 +50,7 @@ class email_server(osv.osv):
'type':fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
], 'State', select=True, readonly=False),
], 'Server Type', select=True, readonly=False),
'is_ssl':fields.boolean('SSL ?', required=False),
'attach':fields.boolean('Add Attachments ?', required=False),
'date': fields.date('Date', readonly=True, states={'draft':[('readonly', False)]}),
@@ -107,11 +107,13 @@ class email_server(osv.osv):
ids = self.search(cr, uid, [])
return self.fetch_mail(cr, uid, ids, context)
def fetch_mail(self, cr, uid, ids, context={}):
def fetch_mail(self, cr, uid, ids, context=None):
if not context:
context = {}
email_tool = self.pool.get('email.server.tools')
for server in self.browse(cr, uid, ids, context):
logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name))
context.update({'server_id': server.id, 'server_type': server.type})
count = 0
try:
if server.type == 'imap':
@@ -123,10 +125,10 @@ class email_server(osv.osv):
imap_server.login(server.user, server.password)
imap_server.select()
result, data = imap_server.search(None, '(UNSEEN)')
result, data = imap_server.search(None, '(UNSEEN)')
for num in data[0].split():
result, data = imap_server.fetch(num, '(RFC822)')
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, server_id=server.id, server_type=server.type, context=context)
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
if res_id and server.action_id:
action_pool = self.pool.get('ir.actions.server')
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
@@ -154,7 +156,7 @@ class email_server(osv.osv):
for num in range(1, numMsgs + 1):
(header, msges, octets) = pop_server.retr(num)
msg = '\n'.join(msges)
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, server_id=server.id, server_type=server.type, context=context)
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
if res_id and server.action_id:
action_pool = self.pool.get('ir.actions.server')
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
@@ -182,10 +184,34 @@ class mailgate_message(osv.osv):
'type':fields.selection([
('pop', 'POP Server'),
('imap', 'IMAP Server'),
], 'State', select=True, readonly=True),
], 'Server Type', select=True, readonly=True),
}
_order = 'id desc'
def create(self, cr, uid, values, context=None):
if not context:
context={}
server_id = context.get('server_id',False)
server_type = context.get('server_type',False)
if server_id:
values['server_id'] = server_id
if server_type:
values['server_type'] = server_type
res = super(mailgate_message,self).create(cr, uid, values, context=context)
return res
def write(self, cr, uid, ids, values, context=None):
if not context:
context={}
server_id = context.get('server_id',False)
server_type = context.get('server_type',False)
if server_id:
values['server_id'] = server_id
if server_type:
values['server_type'] = server_type
res = super(mailgate_message,self).write(cr, uid, ids, values, context=context)
return res
mailgate_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -54,7 +54,7 @@ class hr_attendance(osv.osv):
return res
_columns = {
'name' : fields.datetime('Date', required=True),
'name' : fields.datetime('Date', required=True, select=1),
'action' : fields.selection([('sign_in', 'Sign In'), ('sign_out', 'Sign Out'),('action','Action')], 'Action', required=True),
'action_desc' : fields.many2one("hr.action.reason", "Action reason", domain="[('action_type', '=', action)]", help='Specifies the reason for Signing In/Signing Out in case of extra hours.'),
'employee_id' : fields.many2one('hr.employee', "Employee's Name", required=True, select=True),
+1
View File
@@ -42,6 +42,7 @@ to set up a management by affair.
'update_xml': [
'security/ir.model.access.csv',
'hr_timesheet_view.xml',
'report/hr_timesheet_report_view.xml',
'hr_timesheet_report.xml',
'hr_timesheet_wizard.xml',
'process/hr_timesheet_process.xml',
+1 -2
View File
@@ -19,8 +19,7 @@
#
##############################################################################
import hr_timesheet_report
import user_timesheet
import users_timesheet
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,78 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class hr_timesheet_report(osv.osv):
_name = "hr.timesheet.report"
_description = "Timesheet"
_auto = False
_columns = {
'year': fields.char('Year',size=64,required=False, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'date': fields.date('Date', readonly=True),
'name': fields.char('Description', size=64,readonly=True),
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
'journal_id' : fields.many2one('account.analytic.journal', 'Journal',readonly=True),
'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
'user_id': fields.many2one('res.users', 'User',readonly=True),
'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
'company_id': fields.many2one('res.company', 'Company',readonly=True),
'cost': fields.float('Cost',readonly=True),
'quantity': fields.float('Quantity',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'hr_timesheet_report')
cr.execute("""
create or replace view hr_timesheet_report as (
select
min(t.id) as id,
l.date as date,
to_char(l.date,'YYYY') as year,
to_char(l.date,'MM') as month,
sum(l.amount) as cost,
sum(l.unit_amount) as quantity,
l.account_id as account_id,
l.journal_id as journal_id,
l.product_id as product_id,
l.general_account_id as general_account_id,
l.user_id as user_id,
l.company_id as company_id,
l.currency_id as currency_id
from
hr_analytic_timesheet as t
left join account_analytic_line as l ON (t.line_id=l.id)
group by
l.date,
l.account_id,
l.product_id,
l.general_account_id,
l.journal_id,
l.user_id,
l.company_id,
l.currency_id
)
""")
hr_timesheet_report()
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_hr_timesheet_report_graph" model="ir.ui.view">
<field name="name">hr.timesheet.report.graph</field>
<field name="model">hr.timesheet.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Timesheet" type="bar">
<field name="user_id" />
<field name="quantity" operator = "+"/>
</graph>
</field>
</record>
<record id="view_hr_timesheet_report_tree" model="ir.ui.view">
<field name="name">hr.timesheet.report.tree</field>
<field name="model">hr.timesheet.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Timesheet Analysis">
<field name="year" invisible="1"/>
<field name="month" invisible="1"/>
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="general_account_id" invisible="1"/>
<field name="quantity" sum="Hours"/>
<field name="cost" sum="Total Cost"/>
</tree>
</field>
</record>
<record id="view_hr_timesheet_report_search" model="ir.ui.view">
<field name="name">hr.timesheet.report.search</field>
<field name="model">hr.timesheet.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Timesheet">
<group col="10" colspan="12">
<filter icon="terp-go-year" string="This Year"
name="year"
domain="[('year','=', time.strftime('%%Y'))]"
help="Timesheet in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('month','=', time.strftime('%%m'))]"
help="Timesheet in this month"/>
<filter icon="terp-go-week"
string="Today"
domain="[('date','=', time.strftime('%%Y-%%m-%%d'))]"
help="Timesheet dof the day"/>
<separator orientation="vertical"/>
<field name="account_id"/>
<field name="user_id" />
<field name="date" />
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="group_user_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
<filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'date'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="general_account_id"/>
<field name="product_id"/>
<field name="journal_id"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
</search>
</field>
</record>
<record id="action_hr_timesheet_report_stat_all" model="ir.actions.act_window">
<field name="name">Timesheet Analysis</field>
<field name="res_model">hr.timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_group_user_id':1,'group_by_no_leaf':1,'group_by':[]}</field>
</record>
<menuitem
action="action_hr_timesheet_report_stat_all"
id="menu_hr_timesheet_report_all"
parent="menu_hr_reporting_timesheet" sequence="0"/>
</data>
</openerp>
@@ -101,6 +101,3 @@ class report_custom(report_rml):
report_custom('report.hr.analytical.timesheet', 'hr.employee', '', 'addons/hr_timesheet/report/user_timesheet.xsl')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -6,3 +6,4 @@
"access_hr_sign_out_project","hr.sign.out.project","model_hr_sign_out_project","hr.group_hr_user",1,1,1,1
"access_hr_analytal_timesheet_employee","hr.analytical.timesheet.employee","model_hr_analytical_timesheet_employee","hr.group_hr_manager",1,1,1,1
"access_hr_analytal_timesheet_user","hr.analytical.timesheet.user","model_hr_analytical_timesheet_users","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_report","hr.timesheet.report","model_hr_timesheet_report","hr.group_hr_manager",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_hr_sign_out_project hr.sign.out.project model_hr_sign_out_project hr.group_hr_user 1 1 1 1
7 access_hr_analytal_timesheet_employee hr.analytical.timesheet.employee model_hr_analytical_timesheet_employee hr.group_hr_manager 1 1 1 1
8 access_hr_analytal_timesheet_user hr.analytical.timesheet.user model_hr_analytical_timesheet_users hr.group_hr_user 1 1 1 1
9 access_hr_timesheet_report hr.timesheet.report model_hr_timesheet_report hr.group_hr_manager 1 0 0 0
@@ -96,12 +96,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Timesheet">
<field name="name"/>
<field name="user_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="department_id" groups="base.group_extended"/>
<group colspan="4" col="6">
<field name="name"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
<field name="department_id" groups="base.group_extended"/>
<newline/>
<field name="user_id"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<notebook colspan="4">
<page string="Daily View">
<group col="6" colspan="4">
@@ -124,7 +127,6 @@
<button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
<button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
</group>
<field name="state_attendance" groups="hr_attendance.group_hr_attendance"/>
<field name="total_attendance_day" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
<field colspan="4" context="date=date_current,user_id=user_id" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
@@ -137,8 +139,8 @@
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id"/>
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="amount"/>
<field name="general_account_id"/>
<field invisible="1" name="amount"/>
<field invisible="1" name="general_account_id"/>
<field invisible="1" name="user_id" required="1"/>
</tree>
<form string="Timesheet">
@@ -147,9 +149,9 @@
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
<field name="to_invoice"/>
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id"/>
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="journal_id"/>
<field name="product_id"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="amount"/>
<field name="general_account_id"/>
<field name="user_id" required="1"/>
@@ -8,8 +8,8 @@
<field name="arch" type="xml">
<graph string="Timesheet" type="bar">
<field name="user_id" />
<field name="quantity" operator = "+"/>
<field name="state" group = "True"/>
<field name="quantity" operator = "+"/>
<field name="state" group = "True"/>
</graph>
</field>
</record>
@@ -50,71 +50,71 @@
<search string="Timesheet">
<group col="10" colspan="12">
<filter icon="terp-go-year" string="This Year"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this month"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Confirmed"
domain="[('state','=','confirm')]"/>
<filter icon="terp-dialog-close"
string="Done"
domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="account_id"/>
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this year"/>
<filter icon="terp-go-month" string="This Month"
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this month"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-camera_test"
string="Confirmed"
domain="[('state','=','confirm')]"/>
<filter icon="terp-dialog-close"
string="Done"
domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="account_id"/>
<field name="user_id" />
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Type of Invoicing" icon="terp-stock_symbol-selection" context="{'group_by':'to_invoice'}"/>
<separator orientation="vertical"/>
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
<filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
<filter string="User" name="User_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Type of Invoicing" icon="terp-stock_symbol-selection" context="{'group_by':'to_invoice'}"/>
<separator orientation="vertical"/>
<filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
<filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="general_account_id"/>
<field name="to_invoice" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<separator orientation="vertical"/>
<field name="department_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date_to"/>
<field name="date_from"/>
</group>
<field name="general_account_id"/>
<field name="to_invoice" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<separator orientation="vertical"/>
<field name="department_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<newline/>
<field name="date_to"/>
<field name="date_from"/>
</group>
</search>
</field>
</record>
<record id="action_timesheet_report_stat_all" model="ir.actions.act_window">
<field name="name">Timesheet</field>
<field name="name">Timesheet Sheet Analysis</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
+3 -2
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,11 +15,12 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import mail_gateway
import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1
View File
@@ -32,6 +32,7 @@
'init_xml': [],
'update_xml': [
"mail_gateway_view.xml",
"res_partner_view.xml",
'security/ir.model.access.csv'
],
'demo_xml': [],
+6 -6
View File
@@ -35,7 +35,6 @@ class mailgate_thread(osv.osv):
'''
_name = 'mailgate.thread'
_description = 'Mailgateway Thread'
_rec_name = 'thread'
_columns = {
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True)]),
@@ -176,7 +175,7 @@ class mailgate_tool(osv.osv_memory):
bits = _email.sub(record, text)
return bits
def history(self, cr, uid, model, res_ids, msg, attach):
def history(self, cr, uid, model, res_ids, msg, attach, context=None):
"""This function creates history for mails fetched
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -206,7 +205,7 @@ class mailgate_tool(osv.osv_memory):
'user_id': uid,
'attachment_ids': [(6, 0, attach)]
}
msg_id = msg_pool.create(cr, uid, msg_data)
msg_id = msg_pool.create(cr, uid, msg_data, context=context)
return True
def email_send(self, cr, uid, model, res_id, msg, from_email=False, email_default=False):
@@ -424,7 +423,8 @@ Thanks
if not len(res_ids):
new_res_id = create_record(msg)
res_ids = [new_res_id]
# Store messages
# Store messages
context.update({'model' : model})
if hasattr(model_pool, '_history'):
model_pool._history(cr, uid, res_ids, _('Receive'), history=True,
subject = msg.get('subject'),
@@ -434,9 +434,9 @@ Thanks
message_id = msg.get('message-id'),
references = msg.get('references', False),
attach = msg.get('attachments', {}).items(),
context = {'model' : model})
context = context)
else:
self.history(cr, uid, model, res_ids, msg, att_ids)
self.history(cr, uid, model, res_ids, msg, att_ids, context=context)
return new_res_id
def get_partner(self, cr, uid, from_email, context=None):
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields,osv
class res_partner(osv.osv):
""" Inherits partner and adds CRM information in the partner form """
_inherit = 'res.partner'
_columns = {
'emails': fields.one2many('mailgate.message', 'partner_id',\
'Emails', readonly=True),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Partners inherited form -->
<record id="view_emails_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.emails.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="emails" colspan="4" nolabel="1"/>
</page>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -20,6 +20,7 @@
##############################################################################
import marketing_campaign
import res_partner
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+4 -3
View File
@@ -24,7 +24,7 @@
"name" : "",
"version" : "1.1",
"depends" : ["marketing",
"crm",
"crm",
"document",
"email_template"
],
@@ -42,8 +42,9 @@ are dynamic and multi-channels. The process:
'init_xml': [],
'update_xml': [
'marketing_campaign_view.xml',
'marketing_campaign_data.xml',
'marketing_campaign_workflow.xml',
'marketing_campaign_data.xml',
'marketing_campaign_workflow.xml',
'res_partner_view.xml',
'report/campaign_analysis_view.xml',
"security/marketing_campaign_security.xml",
"security/ir.model.access.csv"
@@ -289,7 +289,9 @@ class marketing_campaign_activity(osv.osv):
context = {}
server_obj = self.pool.get('ir.actions.server')
context['active_id'] = workitem.res_id
return server_obj.run(cr, uid, [activity.server_action_id.id], context)
res = server_obj.run(cr, uid, [activity.server_action_id.id], context)
#server action return False if the action is perfomed except client_action,other and python code
return res==False and True or res
def process(self, cr, uid, act_id, wi_id, context={}):
activity = self.browse(cr, uid, act_id)
@@ -2,6 +2,8 @@
<openerp>
<data>
<menuitem name="Configuration" id="menu_marketing_configuration" parent="marketing.marketing_menu" sequence="1"/>
<!--
======================
Marketing Campaign
+37
View File
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields,osv
class res_partner(osv.osv):
""" Inherits partner and adds CRM information in the partner form """
_inherit = 'res.partner'
_columns = {
'workitem_ids': fields.one2many('marketing.campaign.workitem', 'partner_id',\
'Workitems', readonly=True),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Partners inherited form -->
<record id="view_workitem_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.workitem.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="workitem_ids" colspan="4" nolabel="1"/>
</page>
</field>
</record>
</data>
</openerp>
+1
View File
@@ -25,6 +25,7 @@ import installer
import project_mailgate
import report
import wizard
import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1
View File
@@ -46,6 +46,7 @@ work done on tasks, eso. It is able to render planning, order tasks, eso.
"project_report.xml",
"process/task_process.xml",
"project_installer.xml",
"res_partner_view.xml",
"report/project_report_view.xml",
"wizard/project_close_task_view.xml",
"board_project_view.xml",
+2 -2
View File
@@ -7,13 +7,13 @@
Administrator shortcut
Demo user startup menu
-->
<record id="sc_account_dash" model="ir.ui.view_sc">
<!--record id="sc_account_dash" model="ir.ui.view_sc">
<field name="name">project dashboard</field>
<field name="user_id" ref="base.user_demo"/>
<field name="resource">ir.ui.menu</field>
<field name="sequence">3</field>
<field name="res_id" ref="menu_board_project"/>
</record>
</record-->
<record id="base.user_root" model="res.users">
<field name="action_id" ref="open_board_project"/>
</record>
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields,osv
class res_partner(osv.osv):
""" Inherits partner and adds CRM information in the partner form """
_inherit = 'res.partner'
_columns = {
'task_ids': fields.one2many('project.task', 'partner_id',\
'Tasks', readonly=True),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Partners inherited form -->
<record id="view_task_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.task.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="History" position="inside">
<field name="task_ids" colspan="4" nolabel="1"/>
</page>
</field>
</record>
</data>
</openerp>
+1 -1
View File
@@ -34,7 +34,7 @@
'crm',
'project',
'hr_timesheet_sheet',
'project_long_term',
'resource'
],
'init_xml': [
'project_issue_data.xml'
+8
View File
@@ -428,3 +428,11 @@ class project_issue(osv.osv, crm.crm_case):
project_issue()
class project(osv.osv):
_inherit = "project.project"
_columns = {
'resource_calendar_id': fields.many2one('resource.calendar', 'Working Time', help="Timetable working hours to adjust the gantt diagram report"),
}
project()
+257 -269
View File
@@ -1,290 +1,278 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<!--For Issue Tracking-->
<record id="crm_case_buginaccountsmodule0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_8"/>
<field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;5&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_agrolait"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="15.0" name="duration"/>
<field eval="&quot;Bug in Accounts module&quot;" name="name"/>
<field eval="&quot;agr@agrolait.com&quot;" name="email_from"/>
</record>
<record id="crm_case_log_takecorrectiveactions0" model="mailgate.message">
<field eval="time.strftime('%Y-%m-08')" name="date"/>
<field name="case_id" ref="crm_case_buginaccountsmodule0"/>
<field name="som" ref="base.som_normal"/>
<field eval="&quot;Take corrective actions&quot;" name="name"/>
<field model="res.partner.canal" name="canal_id" search="[('name','=','website')]"/>
</record>
<record id="crm_case_buginaccountsmodule0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_8"/>
<field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;5&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_agrolait"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="15.0" name="duration"/>
<field eval="&quot;Bug in Accounts module&quot;" name="name"/>
<field eval="&quot;agr@agrolait.com&quot;" name="email_from"/>
</record>
<record id="crm_case_programnotgivingproperoutput0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_tang"/>
<field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_asus"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.5" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage2"/>
<field eval="&quot;Program not giving proper output&quot;" name="name"/>
<field name="project_id" ref="project.project_project_22"/>
</record>
<record id="crm_case_programnotgivingproperoutput0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_tang"/>
<field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_asus"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.5" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage2"/>
<field eval="&quot;Program not giving proper output&quot;" name="name"/>
<field name="project_id" ref="project.project_project_22"/>
</record>
<record id="crm_case_outputincorrect0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_9"/>
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_23"/>
<field eval="&quot;Output incorrect&quot;" name="name"/>
</record>
<record id="crm_case_outputincorrect0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_9"/>
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_23"/>
<field eval="&quot;Output incorrect&quot;" name="name"/>
</record>
<record id="crm_case_problemloadingpage0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_13"/>
<field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_14"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage4"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Problem loading page&quot;" name="name"/>
</record>
<record id="crm_case_problemloadingpage0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_13"/>
<field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_14"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage4"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Problem loading page&quot;" name="name"/>
</record>
<record id="crm_case_pagenotfound0" model="project.issue">
<field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_desertic_hispafuentes"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="1.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Page not Found&quot;" name="name"/>
</record>
<record id="crm_case_pagenotfound0" model="project.issue">
<field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_desertic_hispafuentes"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="1.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Page not Found&quot;" name="name"/>
</record>
<record id="crm_case_programmingerror0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Programming Error&quot;" name="name"/>
</record>
<record id="crm_case_programmingerror0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Programming Error&quot;" name="name"/>
</record>
<record id="crm_case_logicalerrorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-26 11:10:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Logical Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_logicalerrorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-26 11:10:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Logical Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_constrainterror0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-25 13:35:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="7.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Constraint Error&quot;" name="name"/>
</record>
<record id="crm_case_constrainterror0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-25 13:35:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="7.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Constraint Error&quot;" name="name"/>
</record>
<record id="crm_case_errorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-28 15:40:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="1" name="active"/>
<field eval="1.3" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_errorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
<field eval="time.strftime('%Y-%m-28 15:40:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="1" name="active"/>
<field eval="1.3" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_patcheserrorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_9"/>
<field eval="time.strftime('%Y-%m-28 16:30:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_2"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="13.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Patches Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_patcheserrorinprogram0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_9"/>
<field eval="time.strftime('%Y-%m-28 16:30:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_2"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="13.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Patches Error in Program&quot;" name="name"/>
</record>
<record id="crm_case_newfeaturestobeadded0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
<field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_maxtor"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.2" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;New Features To Be Added&quot;" name="name"/>
</record>
<record id="crm_case_newfeaturestobeadded0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
<field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_maxtor"/>
<field eval="&quot;open&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.2" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;New Features To Be Added&quot;" name="name"/>
</record>
<record id="crm_case_addmenustothemodule0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="time.strftime('%Y-%m-05 18:00:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage2"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;Add menus to the module&quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_addmenustothemodule0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="time.strftime('%Y-%m-05 18:00:00')" name="date"/>
<field name="type_id" ref="type2"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;done&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="3.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage2"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;Add menus to the module&quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_includeattendancesheetinproject0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
<field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Include Attendance sheet in Project&quot;" name="name"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
</record>
<record id="crm_case_includeattendancesheetinproject0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
<field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="&quot;cancel&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Include Attendance sheet in Project&quot;" name="name"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
</record>
<record id="crm_case_createnewobject0" model="project.issue">
<field model="res.partner.canal" name="canal_id" search="[('name','=','phone')]"/>
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field name="som" ref="base.som_happy"/>
<field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.45" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Create new object&quot;" name="name"/>
</record>
<record id="crm_case_createnewobject0" model="project.issue">
<field model="res.partner.canal" name="canal_id" search="[('name','=','phone')]"/>
<field name="partner_address_id" ref="base.res_partner_address_6"/>
<field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;draft&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="2.45" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Create new object&quot;" name="name"/>
</record>
<record id="crm_case_improvereportsinhrms0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="15.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in HRMS&quot;" name="name"/>
</record>
<record id="crm_case_improvereportsinhrms0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;4&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="15.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in HRMS&quot;" name="name"/>
</record>
<record id="crm_case_improvereportsinpms0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-21 14:30:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="06.15" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in PMS&quot;" name="name"/>
</record>
<record id="crm_case_improvereportsinpms0" model="project.issue">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="time.strftime('%Y-%m-21 14:30:00')" name="date"/>
<field name="type_id" ref="type1"/>
<field eval="&quot;2&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;pending&quot;" name="state"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field eval="06.15" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in PMS&quot;" name="name"/>
</record>
</data>
</openerp>
+2 -2
View File
@@ -28,9 +28,9 @@ import pooler
from tools.translate import _
sale_form = """<?xml version="1.0"?>
<form string="Create a Sale Order">
<form string="Convert to Sale Order">
<field name="partner_id" required="True"/>
<field name="shop_id" required="True"/>
<field name="shop_id" required="True" widget="selection"/>
<field name="analytic_account"/>
<field name="picking_policy" required="True"/>
<field name="close"/>
+3 -3
View File
@@ -108,7 +108,7 @@ class scrum_sprint(osv.osv):
'date_stop': fields.date('Ending Date', required=True),
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
'product_owner_id': fields.many2one('res.users', 'Product Owner', required=True,help="The person who is responsible for the product"),
'scrum_master_id': fields.many2one('res.users', 'Scrum Manager', required=True,help="The person who is maintains the processes for the product"),
'scrum_master_id': fields.many2one('res.users', 'Scrum Master', required=True,help="The person who is maintains the processes for the product"),
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
'review': fields.text('Sprint Review'),
'retrospective': fields.text('Sprint Retrospective'),
@@ -308,7 +308,7 @@ class scrum_meeting(osv.osv):
meeting_id = self.browse(cr, uid, ids)[0]
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if meeting_id and meeting_id.sprint_id.scrum_master_id.user_email:
self.email_send(cr, uid, ids, email)
self.email_send(cr, uid, ids, meeting_id.sprint_id.scrum_master_id.user_email)
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for scrum master defined on sprint.'))
return True
@@ -316,7 +316,7 @@ class scrum_meeting(osv.osv):
def button_send_product_owner(self, cr, uid, ids, context=None):
meeting_id = self.browse(cr, uid, ids)[0]
if meeting_id.sprint_id.product_owner_id.user_email:
self.email_send(cr,uid,ids,email)
self.email_send(cr,uid,ids,meeting_id.sprint_id.product_owner_id.user_email)
else:
raise osv.except_osv(_('Error !'), _('Please provide email address for product owner defined on sprint.'))
return True