[MERGE] merge from lp:~openerp-commiter/openobject-addons/crm-improvement/

bzr revid: hmo@tinyerp.com-20100305115427-ret1u3hnl13am4lu
This commit is contained in:
Harry (Open ERP) 2010-03-05 17:24:27 +05:30
commit 39d1e6b57a
43 changed files with 330 additions and 501 deletions

View File

@ -87,3 +87,4 @@
"access_account_fiscal_position_account_template","account.fiscal.position.account.template","model_account_fiscal_position_account_template","account.group_account_manager",1,1,1,1
"access_account_sequence_fiscal_year","account.sequence.fiscalyear","model_account_sequence_fiscalyear","account.group_account_user",1,1,1,1
"access_account_sequence_fiscal_year_user","account.sequence.fiscalyear user","model_account_sequence_fiscalyear","base.group_user",1,0,0,0
"access_account_installer","account.installer","model_account_installer","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
87 access_account_fiscal_position_account_template account.fiscal.position.account.template model_account_fiscal_position_account_template account.group_account_manager 1 1 1 1
88 access_account_sequence_fiscal_year account.sequence.fiscalyear model_account_sequence_fiscalyear account.group_account_user 1 1 1 1
89 access_account_sequence_fiscal_year_user account.sequence.fiscalyear user model_account_sequence_fiscalyear base.group_user 1 0 0 0
90 access_account_installer account.installer model_account_installer base.group_user 1 0 0 0

View File

@ -39,6 +39,7 @@
],
"update_xml" : [
"security/account_security.xml",
"voucher_sequence.xml",
"account_report.xml",
"voucher_view.xml",

View File

@ -811,18 +811,18 @@ rule or repeating pattern for anexception to a recurrence set"),
'interval': lambda *x: 1,
}
def modify_this(self, cr, uid, ids, defaults, context=None, *args):
def modify_this(self, cr, uid, ids, defaults, real_date, context=None, *args):
ids = map(lambda x: base_calendar_id2real_id(x), ids)
datas = self.read(cr, uid, ids[0], context=context)
defaults.update({
'recurrent_uid': base_calendar_id2real_id(datas['id']),
'recurrent_id': defaults.get('date'),
'recurrent_id': defaults.get('date') or real_date,
'rrule_type': 'none',
'rrule': ''
})
exdate = datas['exdate'] and datas['exdate'].split(',') or []
if defaults.get('date'):
exdate.append(defaults.get('date'))
if real_date and defaults.get('date'):
exdate.append(real_date)
self.write(cr, uid, ids, {'exdate': ','.join(exdate)}, context=context)
new_id = self.copy(cr, uid, ids[0], default=defaults, context=context)
return new_id
@ -986,9 +986,13 @@ rule or repeating pattern for anexception to a recurrence set"),
new_ids = []
for id in select:
if len(str(id).split('-')) > 1:
data = self.read(cr, uid, id, ['date', 'date_deadline'])
self.modify_this(cr, uid, [id], vals, context)
continue
data = self.read(cr, uid, id, ['date', 'date_deadline', 'rrule', 'duration'])
if data.get('rrule'):
real_date = data.get('date')
data.update(vals)
new_id = self.modify_this(cr, uid, [id], data, real_date, context)
context.update({'active_id': new_id,'active_ids': [new_id]})
continue
id = base_calendar_id2real_id(id)
if not id in new_ids:
new_ids.append(id)

View File

@ -1,6 +1,7 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_basic_calendar_all","basic.calendar","model_basic_calendar",,1,1,1,1
"access_basic_calendar_event_all","basic.calendar.event","model_basic_calendar_event",,1,1,1,1
"access_basic_calendar_attendee_all","basic.calendar.attendee","model_basic_calendar_attendee",,1,1,1,1
"access_calendar_todo_all","basic.calendar.todo","model_basic_calendar_todo",,1,1,1,1
"access_basic_calendar_alarm_all","basic.calendar.alarm","model_basic_calendar_alarm",,1,1,1,1
"access_calendar_attendee","calendar.attendee","model_calendar_attendee",,1,1,1,1
"access_calendar_alarm","calendar.alarm","model_calendar_alarm",,1,1,1,1
"access_res_alarm","res.alarm","model_res_alarm",,1,1,1,1
"access_calendar_event_all","calendar.event","model_calendar_event",,1,1,1,1
"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_basic_calendar_all access_calendar_attendee basic.calendar calendar.attendee model_basic_calendar model_calendar_attendee 1 1 1 1
3 access_basic_calendar_event_all access_calendar_alarm basic.calendar.event calendar.alarm model_basic_calendar_event model_calendar_alarm 1 1 1 1
4 access_basic_calendar_attendee_all access_res_alarm basic.calendar.attendee res.alarm model_basic_calendar_attendee model_res_alarm 1 1 1 1
5 access_calendar_todo_all access_calendar_event_all basic.calendar.todo calendar.event model_basic_calendar_todo model_calendar_event 1 1 1 1
6 access_basic_calendar_alarm_all access_calendar_todo basic.calendar.alarm calendar.todo model_basic_calendar_alarm model_calendar_todo 1 1 1 1
7 access_base_calendar_invite_attendee base_calendar.invite.attendee model_base_calendar_invite_attendee 1 1 1 1

View File

@ -804,7 +804,10 @@ class Attendee(CalDAV, osv.osv_memory):
cn_val = [str(attendee[a_val['field']])]
if cn_val:
attendee_add.params['CN'] = cn_val
attendee_add.value = 'MAILTO:' + attendee['email']
if not attendee['email']:
raise osv.except_osv(_('Error !'), _('Attendee must have an Email Id'))
elif attendee['email']:
attendee_add.value = 'MAILTO:' + attendee['email']
return vevent
Attendee()

View File

@ -32,7 +32,7 @@ import crm_fundraising
import crm_helpdesk
#import report
import report
import wizard

View File

@ -26,7 +26,7 @@
'category': 'Generic Modules/CRM & SRM',
'description': """The generic Open ERP Customer Relationship Management
system enables a group of people to intelligently and efficiently manage
leads, opportunities, tasks, issues, requests, bugs, campaign, claims, etc.
leads, opportunities, claims, meeting, phonecall etc.
It manages key tasks such as communication, identification, prioritization,
assignment, resolution and notification.
@ -81,14 +81,21 @@ between mails and Open ERP.""",
'crm_claims_view.xml',
'crm_claims_menu.xml',
# 'crm_report_view.xml',
'crm_helpdesk_view.xml',
'crm_helpdesk_menu.xml',
#'crm_report.xml',
'security/crm_security.xml',
'security/ir.model.access.csv',
'process/crm_configuration_process.xml'
'report/crm_report_view.xml',
'report/crm_report_claim_view.xml',
'report/crm_report_lead_view.xml',
'report/crm_report_fundraising_view.xml',
'report/crm_report_opportunity_view.xml' ,
'report/crm_report_phonecall_view.xml',
'process/crm_configuration_process.xml',
],
'demo_xml': [
'crm_demo.xml',

View File

@ -296,8 +296,8 @@ class crm_case(osv.osv):
if section in s:
st = case.stage_id.id or False
if st in s[section]:
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
stage_value = self.pool.get('crm.case.stage').read(cr, uid,s[section][st] , ['probability'], context)
self.write(cr, uid, [case.id], {'stage_id': s[section][st],'probability':stage_value['probability']})
return True
def get_stage_dict(self, cr, uid, ids, context={}):
@ -319,7 +319,8 @@ class crm_case(osv.osv):
st = case.stage_id.id or False
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
stage_value = self.pool.get('crm.case.stage').read(cr, uid,s[section][st] ,['probability'], context)
self.write(cr, uid, [case.id], {'stage_id': s[section][st],'probability':stage_value['probability']})
return True
@ -609,3 +610,15 @@ class users(osv.osv):
'context_section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
users()
class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
res_partner()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -43,6 +43,11 @@
<field name="date_closed" string="Closure Date"/>
<field name="categ_id" string="Type" select="1"/>
<field name="state"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause"/>
<button name="case_close" string="Close" states="open,draft,pending" type="object" icon="gtk-close"/>
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
@ -188,24 +193,31 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Claims">
<filter icon="gtk-new" string="Current Claims"
<filter icon="gtk-new" string="Current"
domain="[('state','in',('draft', 'open'))]"
separator="1" help="Current Claims" default="1"
/>
<filter icon="gtk-execute"
string="In Progress Claims"
string="In Progress"
domain="[('state','=','open')]"
separator="1" help="In Progress Claims"
/>
<filter icon="gtk-media-pause"
string="Pending Claims"
string="Pending"
domain="[('state','=','pending')]"
separator="1" help="All pending Claims"
/>
<separator orientation="vertical"/>
<field name="name" select='1'/>
<field name="partner_id" select="1"/>
<field name="user_id" select="1" widget="selection"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]" help="My Claims"
default="1" />
<filter icon="terp-partner"
domain="[('user_id','=', False)]"
help="Unassigned Claims" />
</field>
<field name="section_id" select="1" widget="selection" string="Section" default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"

View File

@ -198,7 +198,9 @@
<filter icon="gtk-media-pause" domain="[('state','=','pending')]" help="Pending Funds"/>
</field>
<field name="name" select='1' string="Fund Description"/>
<field name="user_id" select="1" widget="selection"/>
<field name="user_id" select="1" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=', False)]" help="Unassigned" />
</field>
<field name="section_id" select="1" widget="selection" string="Section" default="context.get('section_id', False)">
<filter icon="terp-crm"
domain="[('section_id','=',context.get('section_id',False))]"

View File

@ -555,6 +555,44 @@
</field>
</field>
</record>
<record id="view_partners_form_crm1" model="ir.ui.view">
<field name="name">view.res.partner.form.crm.inherited1</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<field name="parent_id" position="after">
<field name="section_id" completion="1" widget="selection"/>
</field>
</field>
</record>
<record id="view_partners_form_crm2" model="ir.ui.view">
<field name="name">view.res.partner.form.crm.inherited2</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_tree"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<field name="lang" position="after">
<field name="section_id" completion="1" widget="selection"/>
</field>
</field>
</record>
<record id="view_partners_form_crm3" model="ir.ui.view">
<field name="name">view.res.partner.form.crm.inherited3</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field eval="18" name="priority"/>
<field name="arch" type="xml">
<field name="category_id" position="after">
<field name="section_id" completion="1" widget="selection"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -19,8 +19,13 @@
#
##############################################################################
import report_businessopp
#import report_businessopp
import crm_report
import crm_report_claim
import crm_report_lead
import crm_report_phonecall
import crm_report_fundraising
import crm_report_opportunity
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -20,8 +20,7 @@
##############################################################################
from osv import fields,osv
import tools.sql
import tools
AVAILABLE_STATES = [
('draft','Draft'),
@ -31,170 +30,106 @@ AVAILABLE_STATES = [
('pending','Pending')
]
class report_crm_case_section_categ2(osv.osv):
_name = "report.crm.case.section.categ2"
_description = "Cases by section and category2"
class report_crm_case(osv.osv):
_name = "report.crm.case"
_description = "Cases and section"
_auto = False
def _get_data(self, cr, uid, ids, field_name, arg, context={}):
res = {}
state_perc = 0.0
avg_ans = 0.0
for case in self.browse(cr, uid, ids, context):
if field_name != 'avg_answers':
state = field_name[5:]
cr.execute("select count(*) from crm_opportunity where section_id =%s and state='%s'"%(case.section_id.id,state))
state_cases = cr.fetchone()[0]
perc_state = (state_cases / float(case.nbr) ) * 100
res[case.id] = perc_state
else:
model_name = self._name.split('report.')
if len(model_name) < 2:
res[case.id] = 0.0
else:
model_name = model_name[1]
cr.execute("select count(*) from crm_case_log l, ir_model m where l.model_id=m.id and m.model = '%s'" , model_name)
logs = cr.fetchone()[0]
avg_ans = logs / case.nbr
res[case.id] = avg_ans
return res
_columns = {
'name': 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),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'category2_id':fields.many2one('crm.case.category2', 'Type', readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
'amount_revenue': fields.float('Est.Revenue', 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),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'category2_id, section_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_categ2")
cr.execute("""
create view report_crm_case_section_categ2 as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.category2_id,
c.stage_id,
c.section_id,
count(*) as nbr,
sum(planned_revenue) as amount_revenue,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_case c
where c.category2_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.category2_id, c.section_id)""")
report_crm_case_section_categ2()
class report_crm_case_section_stage(osv.osv):
_name = "report.crm.case.section.stage"
_description = "Cases by section and stage"
_auto = False
_columns = {
'name': fields.char('Year',size=64,required=False, 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"),
'perc_cancel': fields.function(_get_data,string='%Cancel', method=True,type="float"),
'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),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, section_id'
'company_id': fields.many2one('res.company','Company',readonly=True),
}
_order = 'name desc, user_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_stage")
tools.drop_view_if_exists(cr, 'report_crm_case')
cr.execute("""
create view report_crm_case_section_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.state,
c.stage_id,
c.section_id,
c.categ_id,
count(*) as nbr,
sum(planned_revenue) as amount_revenue,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_case c
where c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.user_id, c.state, c.stage_id, c.categ_id, c.section_id)""")
report_crm_case_section_stage()
class report_crm_case_section_categ_stage(osv.osv):
_name = "report.crm.case.section.categ.stage"
_description = "Cases by section, Category and stage"
_auto = False
_columns = {
'name': 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),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'stage_id, section_id, categ_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_categ_stage")
cr.execute("""
create view report_crm_case_section_categ_stage as (
select
min(c.id) as id,
to_char(c.create_date,'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.state,
c.stage_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_case c
where c.categ_id is not null AND c.stage_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.state, c.stage_id, c.section_id)""")
report_crm_case_section_categ_stage()
class report_crm_case_section_categ_categ2(osv.osv):
_name = "report.crm.case.section.categ.categ2"
_description = "Cases by section, Category and Category2"
_auto = False
_columns = {
'name': 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),
'user_id':fields.many2one('res.users', 'User', readonly=True),
'categ_id':fields.many2one('crm.case.categ', 'Category', readonly=True),
'category2_id':fields.many2one('crm.case.category2', 'Type', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', readonly=True),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'delay_close': fields.char('Delay Close', size=20, readonly=True),
}
_order = 'section_id, categ_id, category2_id'
def init(self, cr):
tools.sql.drop_view_if_exists(cr, "report_crm_case_section_categ_categ2")
cr.execute("""
create view report_crm_case_section_categ_categ2 as (
create or replace view report_crm_case as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.user_id,
c.categ_id,
c.category2_id,
c.state,
c.stage_id,
c.user_id,
c.section_id,
count(*) as nbr,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
c.company_id,
count(*) as nbr
from
crm_case c
where c.categ_id is not null AND c.category2_id is not null
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'),c.user_id, c.categ_id, c.category2_id, c.state, c.stage_id, c.section_id)""")
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.company_id
)""")
report_crm_case()
class report_crm_case_service_dashboard(osv.osv):
_name = "report.crm.case.service.dashboard"
_description = "Report of Closed and Open CRM Cases within past 15 days"
_auto = False
_columns = {
'date_deadline': fields.datetime('Deadline', readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'user_id': fields.many2one('res.users', 'Responsible', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'create_date' : fields.datetime('Create Date', readonly=True)
}
_order = 'create_date'
def init(self, cr):
cr.execute("""create or replace view report_crm_case_service_dashboard as (
select
cse.id as id, cse.date_deadline as date_deadline,
cse.name as name, cse.user_id as user_id,
cse.state as state,
cse.create_date as create_date
from
crm_case cse
where
(cse.state='done')
OR
((to_date(to_char(cse.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') <= CURRENT_DATE)
AND
(to_date(to_char(cse.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') > (CURRENT_DATE-15))
AND
cse.state='open')
)""")
report_crm_case_service_dashboard()
report_crm_case_section_categ_categ2()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -8,7 +8,9 @@ class report_crm_claim(osv.osv):
_columns = {
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]", readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]"),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.claim')]",readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_claim')
@ -22,6 +24,8 @@ class report_crm_claim(osv.osv):
c.user_id,
c.stage_id,
c.section_id,
c.partner_id,
c.company_id,
c.categ_id,
count(*) as nbr,
0 as avg_answers,
@ -30,7 +34,7 @@ class report_crm_claim(osv.osv):
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_claim c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id, c.stage_id,c.categ_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id, c.stage_id,c.categ_id,c.partner_id,c.company_id
)""")
report_crm_claim()

View File

@ -10,12 +10,14 @@
<tree string="Claims">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id" />
<field name="partner_id" />
<field name="nbr" string="#Claim"/>
<field name="delay_close"/>
<field name="state" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
</field>
@ -66,21 +68,21 @@
<field name="name">Claims</field>
<field name="res_model">report.crm.claim</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_crm_claim_graph"/>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_report_crm_claim_tree"/>
<field name="search_view_id" ref="view_crm_claim_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_claim_tree">
<field name="sequence" eval="2"/>
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_report_crm_claim_tree"/>
<field name="act_window_id" ref="action_report_crm_claim"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_claim_graph">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_claim_graph"/>
<field name="act_window_id" ref="action_report_crm_claim"/>

View File

@ -11,6 +11,8 @@ class report_crm_fundraising(osv.osv):
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner'),
'company_id': fields.many2one('res.company','Company'),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_fundraising')
@ -24,6 +26,8 @@ class report_crm_fundraising(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
c.company_id,
c.partner_id,
count(*) as nbr,
0 as avg_answers,
0.0 as perc_done,
@ -34,7 +38,7 @@ class report_crm_fundraising(osv.osv):
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_fundraising c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.categ_id,c.partner_id,c.company_id
)""")
report_crm_fundraising()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,14 +13,16 @@
<tree string="Fundraising">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id" />
<field name="partner_id" />
<field name="nbr" string="#Fundraising"/>
<field name="amount_revenue"/>
<field name="amount_revenue" sum="Total Revenue"/>
<field name="probability"/>
<field name="amount_revenue_prob"/>
<field name="delay_close"/>
<field name="state" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
</field>
@ -69,21 +71,21 @@
<field name="name">Fundraising</field>
<field name="res_model">report.crm.fundraising</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_crm_fundraising_graph"/>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_crm_fundraising_tree"/>
<field name="search_view_id" ref="view_crm_fundraising_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_fundrising_tree">
<field name="sequence" eval="2"/>
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_fundraising_tree"/>
<field name="act_window_id" ref="action_report_crm_fundraising"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_fundrising_graph">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_fundraising_graph"/>
<field name="act_window_id" ref="action_report_crm_fundraising"/>

View File

@ -7,8 +7,10 @@ class report_crm_lead(osv.osv):
_inherit = "report.crm.case"
_columns = {
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]"),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]" ,readonly=True),
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.lead')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner' ,readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_lead')
@ -21,8 +23,10 @@ class report_crm_lead(osv.osv):
c.state,
c.user_id,
c.stage_id,
c.company_id,
c.section_id,
c.categ_id,
c.partner_id,
count(*) as nbr,
0 as avg_answers,
0.0 as perc_done,
@ -30,7 +34,7 @@ class report_crm_lead(osv.osv):
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_lead c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.stage_id,categ_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.stage_id,categ_id,c.partner_id,c.company_id
)""")
report_crm_lead()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,11 +13,13 @@
<tree string="Leads">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id" />
<field name="partner_id" />
<field name="nbr" string="#Leads"/>
<field name="delay_close"/>
<field name="section_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
@ -66,21 +68,20 @@
<field name="name">Leads</field>
<field name="res_model">report.crm.lead</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_crm_lead_graph"/>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_lead_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_lead_tree">
<field name="sequence" eval="2"/>
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_lead_tree"/>
<field name="act_window_id" ref="action_report_crm_lead"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_lead_graph">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_lead_graph"/>
<field name="act_window_id" ref="action_report_crm_lead"/>

View File

@ -11,8 +11,10 @@ class report_crm_opportunity(osv.osv):
'amount_revenue': fields.float('Est.Revenue', readonly=True),
'amount_revenue_prob': fields.float('Est. Rev*Prob.', readonly=True),
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'stage_id':fields.many2one('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]", readonly=True),
'partner_id': fields.many2one('res.partner', 'Partner',readonly=True),
'company_id': fields.many2one('res.company', 'Company',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_opportunity')
@ -27,17 +29,19 @@ class report_crm_opportunity(osv.osv):
c.section_id,
c.categ_id,
c.stage_id,
c.partner_id,
c.company_id,
count(*) as nbr,
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
sum(planned_revenue) as amount_revenue,
sum(planned_revenue*probability)::decimal(16,2) as amount_revenue_prob,
sum((planned_revenue*probability)/100.0)::decimal(16,2) as amount_revenue_prob,
avg(probability)::decimal(16,2) as probability,
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_opportunity c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.stage_id,c.categ_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id,c.stage_id,c.categ_id,c.partner_id,company_id
)""")
report_crm_opportunity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,14 +13,16 @@
<tree string="Opportunities">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id"/>
<field name="partner_id"/>
<field name="nbr" string="#Opportunities"/>
<field name="amount_revenue"/>
<field name="probability"/>
<field name="amount_revenue" sum="Total Revenue"/>
<field name="probability" widget="progressbar"/>
<field name="amount_revenue_prob"/>
<field name="delay_close"/>
<field name="state" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="stage_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
@ -63,6 +65,8 @@
<field name="arch" type="xml">
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>
<filter string="Stage" icon="terp-sale" domain="[]" context="{'group_by':'stage_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
</xpath>
</field>
</record>
@ -71,18 +75,17 @@
<field name="name">Opportunities</field>
<field name="res_model">report.crm.opportunity</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_crm_opportunity_graph"/>
<field name="view_mode">tree,graph</field>
<field name="search_view_id" ref="view_crm_opportunity_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_tree">
<field name="sequence" eval="2"/>
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_opportunity_tree"/>
<field name="act_window_id" ref="action_report_crm_opportunity"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_graph">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_opportunity_graph"/>
<field name="act_window_id" ref="action_report_crm_opportunity"/>

View File

@ -9,6 +9,8 @@ class report_crm_phonecall(osv.osv):
_columns = {
'delay_close': fields.char('Delay to close', size=20, readonly=True),
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.phonecall')]"),
'partner_id': fields.many2one('res.partner', 'Partner' ,readonly=True),
'company_id': fields.many2one('res.company','Company',readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_phonecall')
@ -22,6 +24,8 @@ class report_crm_phonecall(osv.osv):
c.user_id,
c.section_id,
c.categ_id,
c.partner_id,
c.company_id,
count(*) as nbr,
0 as avg_answers,
0.0 as perc_done,
@ -29,7 +33,7 @@ class report_crm_phonecall(osv.osv):
to_char(avg(date_closed-c.create_date), 'DD"d" HH24:MI:SS') as delay_close
from
crm_phonecall c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id, c.categ_id
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id, c.categ_id,c.partner_id,c.company_id
)""")
report_crm_phonecall()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,11 +13,13 @@
<tree string="Phone calls">
<field name="name" />
<field name="month"/>
<field name="section_id" />
<field name="user_id" />
<field name="company_id"/>
<field name="partner_id" />
<field name="nbr" string="#Phone calls" />
<field name="delay_close"/>
<field name="state" invisible="1"/>
<field name="section_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="categ_id" invisible="1"/>
</tree>
</field>
@ -64,20 +66,20 @@
<field name="name">Phone Calls</field>
<field name="res_model">report.crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="view_id" ref="view_crm_phonecall_graph"/>
<field name="view_mode">tree,graph</field>
<field name="view_id" ref="view_crm_phonecall_tree"/>
<field name="search_view_id" ref="view_crm_phonecall_filter"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_phonecall_tree">
<field name="sequence" eval="2"/>
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_phonecall_tree"/>
<field name="act_window_id" ref="action_report_crm_phonecall"/>
</record>
<record model="ir.actions.act_window.view" id="action_report_crm_phonecall_graph">
<field name="sequence" eval="1"/>
<field name="sequence" eval="2"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="view_crm_phonecall_graph"/>
<field name="act_window_id" ref="action_report_crm_phonecall"/>

View File

@ -11,6 +11,7 @@
<field name="name" />
<field name="month"/>
<field name="user_id"/>
<field name="company_id"/>
<field name="section_id"/>
<field name="nbr"/>
<field name="state"/>
@ -53,8 +54,8 @@
<field name="arch" type="xml">
<search string="Search">
<group col="16" colspan="8">
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]"/>
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]"/>
<filter string="This Year" icon="terp-hr" domain="[('name','=',time.localtime()[0])]" default="1" />
<filter string="This Month" icon="terp-hr" domain="[('month','=',time.strftime('%%m'))]" default="1"/>
<separator orientation="vertical"/>
<filter string="Current" icon="terp-hr" domain="[('state','in',('open','draft'))]"/>
<filter string="Won" icon="terp-hr" domain="[('state','=','done')]"/>
@ -67,24 +68,21 @@
domain="[('section_id.user_id','=',uid)]"
help="My section"/>
</field>
<field name="user_id" widget="selection">
<filter icon="terp-partner"
domain="[('user_id','=',uid)]"
help="My " default="1"
/>
</field>
<field name="user_id" widget="selection"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="4" col="8">
<filter string="User" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="User" icon="terp-sale" domain="[]" context="{'group_by':'user_id'}" default="1" />
<filter string="Company" icon="terp-sale" domain="[]" context="{'group_by':'company_id'}"/>
<filter string="Section" icon="terp-sale" domain="[]" context="{'group_by':'section_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-sale" domain="[]" context="{'group_by':'state'}"/>
<filter string="Category" icon="terp-sale" domain="[]" context="{'group_by':'categ_id'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-sale" domain="[]" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-sale" domain="[]" context="{'group_by':'name'}"/>
<filter string="Category" icon="terp-sale" domain="[]" context="{'group_by':'categ_id'}"/>
</group>
</search>
</field>
</record>

View File

@ -154,16 +154,20 @@ class opportunity2meeting(wizard.interface):
partner_id = opportunity.partner_id and opportunity.partner_id.id or False
name = opportunity.name
email = opportunity.email_from
section_id = opportunity.section_id and opportunity.section_id.id or False
section_id = opportunity.section_id and opportunity.section_id.id or False
return {
'name': _('Meetings'),
'domain' : "[('user_id','=',%s)]"%(uid),
'context': {'default_partner_id': partner_id, 'default_section_id': section_id, 'default_email_from': email, 'default_state':'open', 'default_name':name},
'domain' : "[('user_id','=',%s), ('opportunity_id', '=', %s)]"%(uid, data['id']),
'context': {'default_partner_id': partner_id,
'default_opportunity_id': data['id'],
'default_section_id': section_id,
'default_email_from': email,
'default_state':'open', 'default_name':name},
'view_type': 'form',
'view_mode': 'calendar,form,tree',
'view_mode': 'tree,form,calendar',
'res_model': 'crm.meeting',
'view_id': False,
'views': [(id1,'calendar'),(id2,'form'),(id3,'tree')],
'views': [(id3, 'tree'), (id2, 'form'), (id1, 'calendar')],
'type': 'ir.actions.act_window',
'search_view_id': id['res_id']
}

View File

@ -30,7 +30,7 @@
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['crm','project','report_crm'],
'depends': ['crm','project'],
'init_xml': [
'crm_bugs_data.xml'
],

View File

@ -29,7 +29,7 @@
<record id="view_crm_project_bug_form" model="ir.ui.view">
<field name="name">report.crm.project.bug.form</field>
<field name="model">report.crm.project.bug</field>
<field name="inherit_id" ref="report_crm.view_crm_case_form"/>
<field name="inherit_id" ref="crm.view_crm_case_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="nbr" position="after">
@ -58,7 +58,7 @@
<record id="view_crm_project_bug_filter" model="ir.ui.view">
<field name="name">report.crm.project.bug.select</field>
<field name="model">report.crm.project.bug</field>
<field name="inherit_id" ref="report_crm.view_crm_case_filter"/>
<field name="inherit_id" ref="crm.view_crm_case_filter"/>
<field name="type">search</field>
<field name="arch" type="xml">
<xpath expr='//search[@string="Search"]/group[@string="Group By..."]/filter[@string="State"]' position='after'>

View File

@ -7,3 +7,7 @@
"access_document_directory_content_group_system","document.directory.content group system","model_document_directory_content","base.group_system",1,1,1,1
"access_document_directory_content_type_group_document_manager","document.directory.content.type document manager","model_document_directory_content_type","group_document_manager",1,1,1,1
"access_document_directory_content_type_group_system","document.directory.content.type group system","model_document_directory_content_type","base.group_user",1,0,0,0
"access_document_storage_group_document_manager","document.storage document manager","model_document_storage","group_document_manager",1,1,1,1
"access_document_storage_group_system","document.storage group system","model_document_storage","base.group_user",1,0,0,0
"access_document_directory_dctx_group_document_manager","document.directory.dctx document manager","model_document_directory_dctx","group_document_manager",1,1,1,1
"access_document_directory_dctx_group_system","document.directory.dctx group system","model_document_directory_dctx","base.group_system",1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
7 access_document_directory_content_group_system document.directory.content group system model_document_directory_content base.group_system 1 1 1 1
8 access_document_directory_content_type_group_document_manager document.directory.content.type document manager model_document_directory_content_type group_document_manager 1 1 1 1
9 access_document_directory_content_type_group_system document.directory.content.type group system model_document_directory_content_type base.group_user 1 0 0 0
10 access_document_storage_group_document_manager document.storage document manager model_document_storage group_document_manager 1 1 1 1
11 access_document_storage_group_system document.storage group system model_document_storage base.group_user 1 0 0 0
12 access_document_directory_dctx_group_document_manager document.directory.dctx document manager model_document_directory_dctx group_document_manager 1 1 1 1
13 access_document_directory_dctx_group_system document.directory.dctx group system model_document_directory_dctx base.group_system 1 1 1 1

View File

@ -5,3 +5,5 @@
"access_hr_employee_category_manager","hr.employee.category.manager","model_hr_employee_category","hr.group_hr_manager",1,1,1,1
"access_hr_department_manager","hr.department.manager","model_hr_department","hr.group_hr_manager",1,1,1,1
"access_hr_employee_marital_status","hr.employee.marital.status","model_hr_employee_marital_status","hr.group_hr_user",1,1,1,1
"access_hr_job","hr.job","model_hr_job","hr.group_hr_user",1,0,0,0
"access_hr_installer","hr.installer","model_hr_installer","hr.group_hr_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_hr_employee_category_manager hr.employee.category.manager model_hr_employee_category hr.group_hr_manager 1 1 1 1
6 access_hr_department_manager hr.department.manager model_hr_department hr.group_hr_manager 1 1 1 1
7 access_hr_employee_marital_status hr.employee.marital.status model_hr_employee_marital_status hr.group_hr_user 1 1 1 1
8 access_hr_job hr.job model_hr_job hr.group_hr_user 1 0 0 0
9 access_hr_installer hr.installer model_hr_installer hr.group_hr_user 1 0 0 0

View File

@ -1,4 +1,7 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_mail_gateway_server","mail.gateway.server","model_mail_gateway_server","base.group_user",1,0,0,0
"access_mail_gateway","mail.gateway","model_mail_gateway","base.group_user",1,0,0,0
"access_mail_gateway_history","mail.gateway.history","model_mail_gateway_history","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_mail_gateway_server mail.gateway.server model_mail_gateway_server base.group_user 1 0 0 0
3 access_mail_gateway mail.gateway model_mail_gateway base.group_user 1 0 0 0
4 access_mail_gateway_history mail.gateway.history model_mail_gateway_history base.group_user 1 0 0 0
5
6
7

View File

@ -1422,7 +1422,7 @@ StockPicking()
class spilt_in_production_lot(osv.osv_memory):
_inherit = "stock.move.spilt"
_inherit = "stock.move.split"
def split(self, cr, uid, ids, move_ids, context=None):
production_obj = self.pool.get('mrp.production')
move_obj = self.pool.get('stock.move')

View File

@ -30,3 +30,5 @@
"access_hr_timesheet_group_mrp_worker","resource.calendar mrp_worker","resource.model_resource_calendar","mrp.group_mrp_user",1,0,0,0
"access_mrp_procurement_stock_worker","mrp.procurement stock_worker","model_mrp_procurement","stock.group_stock_user",1,1,1,1
"access_mrp_production_stock_worker","mrp.production stock_worker","model_mrp_production","stock.group_stock_user",1,0,0,0
"access_mrp_installer","mrp.installer","model_mrp_installer","mrp.group_mrp_user",1,0,0,0
"access_mrp_product_produce","mrp.product.produce","model_mrp_product_produce","mrp.group_mrp_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
30 access_hr_timesheet_group_mrp_worker resource.calendar mrp_worker resource.model_resource_calendar mrp.group_mrp_user 1 0 0 0
31 access_mrp_procurement_stock_worker mrp.procurement stock_worker model_mrp_procurement stock.group_stock_user 1 1 1 1
32 access_mrp_production_stock_worker mrp.production stock_worker model_mrp_production stock.group_stock_user 1 0 0 0
33 access_mrp_installer mrp.installer model_mrp_installer mrp.group_mrp_user 1 0 0 0
34 access_mrp_product_produce mrp.product.produce model_mrp_product_produce mrp.group_mrp_user 1 0 0 0

View File

@ -11,3 +11,5 @@
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
"access_config_compute_remaining","project.config.compute.remaining","model_config_compute_remaining","project.group_project_user",1,1,1,1
"access_config_compute_remaining_manager","project.config.compute.remaining.manager","model_config_compute_remaining","project.group_project_manager",1,1,1,1
"access_project_message","project.message","model_project_message","project.group_project_user",1,0,0,0
"access_project_installer","project.installer","model_project_installer","project.group_project_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
11 access_project_task_work_manager project.task.work.manager model_project_task_work project.group_project_manager 1 1 1 1
12 access_config_compute_remaining project.config.compute.remaining model_config_compute_remaining project.group_project_user 1 1 1 1
13 access_config_compute_remaining_manager project.config.compute.remaining.manager model_config_compute_remaining project.group_project_manager 1 1 1 1
14 access_project_message project.message model_project_message project.group_project_user 1 0 0 0
15 access_project_installer project.installer model_project_installer project.group_project_user 1 0 0 0

View File

@ -1,2 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_report_analytic_account_close,report.analytic.account.close,model_report_analytic_account_close,account.group_account_manager,1,0,0,0
access_report_account_analytic_line_to_invoice,report.account.analytic.line.to.invoice,model_report_account_analytic_line_to_invoice,account.group_account_manager,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_report_analytic_account_close report.analytic.account.close model_report_analytic_account_close account.group_account_manager 1 0 0 0
3 access_report_account_analytic_line_to_invoice report.account.analytic.line.to.invoice model_report_account_analytic_line_to_invoice account.group_account_manager 1 0 0 0

View File

@ -1,30 +0,0 @@
# -*- 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 report_crm
import report_crm_lead
import report_crm_claim
import report_crm_opportunity
import report_crm_fundraising
import report_crm_phonecall
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,46 +0,0 @@
# -*- 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/>.
#
##############################################################################
{
'name': 'CRM Management - Reporting',
'version': '1.0',
'category': 'Generic Modules/CRM & SRM',
'description': """A module that adds new reports based on Leads, Opportunities, Phonecalls, Claims, FunRising.
""",
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['crm'],
'init_xml': [],
'update_xml': [#'security/ir.model.access.csv',
'report_crm_view.xml',
'report_crm_lead_view.xml',
'report_crm_claim_view.xml',
'report_crm_opportunity_view.xml',
'report_crm_phonecall_view.xml',
'report_crm_fundraising_view.xml'
],
'demo_xml': [],
'installable': True, #TODO : After fixed problems , set True
'active': False,
'certificate': '0030422968285',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,133 +0,0 @@
# -*- 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
import tools
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
('cancel', 'Cancelled'),
('done', 'Closed'),
('pending','Pending')
]
class report_crm_case(osv.osv):
_name = "report.crm.case"
_description = "Cases and section"
_auto = False
def _get_data(self, cr, uid, ids, field_name, arg, context={}):
res = {}
state_perc = 0.0
avg_ans = 0.0
for case in self.browse(cr, uid, ids, context):
if field_name != 'avg_answers':
state = field_name[5:]
cr.execute("select count(*) from crm_opportunity where section_id =%s and state='%s'"%(case.section_id.id,state))
state_cases = cr.fetchone()[0]
perc_state = (state_cases / float(case.nbr) ) * 100
res[case.id] = perc_state
else:
model_name = self._name.split('report.')
if len(model_name) < 2:
res[case.id] = 0.0
else:
model_name = model_name[1]
cr.execute("select count(*) from crm_case_log l, ir_model m where l.model_id=m.id and m.model = '%s'" , model_name)
logs = cr.fetchone()[0]
avg_ans = logs / case.nbr
res[case.id] = avg_ans
return res
_columns = {
'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"),
'perc_cancel': fields.function(_get_data,string='%Cancel', method=True,type="float"),
'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),
}
_order = 'name desc, user_id'
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_crm_case')
cr.execute("""
create or replace view report_crm_case as (
select
min(c.id) as id,
to_char(c.create_date, 'YYYY') as name,
to_char(c.create_date, 'MM') as month,
c.state,
c.user_id,
c.section_id,
count(*) as nbr
from
crm_case c
group by to_char(c.create_date, 'YYYY'), to_char(c.create_date, 'MM'), c.state, c.user_id,c.section_id
)""")
report_crm_case()
class report_crm_case_service_dashboard(osv.osv):
_name = "report.crm.case.service.dashboard"
_description = "Report of Closed and Open CRM Cases within past 15 days"
_auto = False
_columns = {
'date_deadline': fields.datetime('Deadline', readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'user_id': fields.many2one('res.users', 'Responsible', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'create_date' : fields.datetime('Create Date', readonly=True)
}
_order = 'create_date'
def init(self, cr):
cr.execute("""create or replace view report_crm_case_service_dashboard as (
select
cse.id as id, cse.date_deadline as date_deadline,
cse.name as name, cse.user_id as user_id,
cse.state as state,
cse.create_date as create_date
from
crm_case cse
where
(cse.state='done')
OR
((to_date(to_char(cse.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') <= CURRENT_DATE)
AND
(to_date(to_char(cse.create_date, 'YYYY-MM-dd'),'YYYY-MM-dd') > (CURRENT_DATE-15))
AND
cse.state='open')
)""")
report_crm_case_service_dashboard()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,37 +0,0 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_report_crm_case_user,report.crm.case.user,model_report_crm_case_user,crm.group_crm_manager,1,0,0,0
access_report_crm_case_categ,report.crm.case.categ,model_report_crm_case_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_case_section,report.crm.case.section,model_report_crm_case_section,crm.group_crm_manager,1,0,0,0
access_report_crm_case_service_dashboard,report.crm.case.service.dashboard,model_report_crm_case_service_dashboard,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_stage,report.crm.case.section.stage,model_report_crm_case_section_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_categ_stage,report.crm.case.section.categ.stage,model_report_crm_case_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_case_section_categ_type,report.crm.case.section.categ.type,model_report_crm_case_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_case_section_type,report.crm.case.section.type,model_report_crm_case_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_claim_user,report.crm.claim.user,model_report_crm_claim_user,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_categ,report.crm.claim.categ,model_report_crm_claim_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_claim_section,report.crm.claim.section,model_report_crm_claim_section,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_section_categ_stage,report.crm.claim.section.categ.stage,model_report_crm_claim_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_claim_section_categ_type,report.crm.claim.section.categ.type,model_report_crm_claim_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_claim_section_type,report.crm.claim.section.type,model_report_crm_claim_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_fundraising_user,report.crm.fundraising.user,model_report_crm_fundraising_user,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_categ,report.crm.fundraising.categ,model_report_crm_fundraising_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_fundraising_section,report.crm.fundraising.section,model_report_crm_fundraising_section,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_section_categ_stage,report.crm.fundraising.section.categ.stage,model_report_crm_fundraising_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_fundraising_section_categ_type,report.crm.fundraising.section.categ.type,model_report_crm_fundraising_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_fundraising_section_type,report.crm.fundraising.section.type,model_report_crm_fundraising_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_lead_user,report.crm.lead.user,model_report_crm_lead_user,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_categ,report.crm.lead.categ,model_report_crm_lead_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_lead_section,report.crm.lead.section,model_report_crm_lead_section,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_stage,report.crm.lead.section.stage,model_report_crm_lead_section_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_categ_stage,report.crm.lead.section.categ.stage,model_report_crm_lead_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_lead_section_categ_type,report.crm.lead.section.categ.type,model_report_crm_lead_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_lead_section_type,report.crm.lead.section.type,model_report_crm_lead_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_opportunity_user,report.crm.opportunity.user,model_report_crm_opportunity_user,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_categ,report.crm.opportunity.categ,model_report_crm_opportunity_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_opportunity_section,report.crm.opportunity.section,model_report_crm_opportunity_section,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_section_categ_stage,report.crm.opportunity.section.categ.stage,model_report_crm_opportunity_section_categ_stage,crm.group_crm_manager,1,0,0,0
access_report_crm_opportunity_section_categ_type,report.crm.opportunity.section.categ.type,model_report_crm_opportunity_section_categ_type,crm.group_crm_manager,1,0,0,
access_report_crm_opportunity_section_type,report.crm.opportunity.section.type,model_report_crm_opportunity_section_type,crm.group_crm_manager,1,0,0,
access_report_crm_phonecall_user,report.crm.phonecall.user,model_report_crm_phonecall_user,crm.group_crm_manager,1,0,0,0
access_report_crm_phonecall_categ,report.crm.phonecall.categ,model_report_crm_phonecall_categ,crm.group_crm_manager,1,0,0,0
access_repor_crm_phonecall_section,report.crm.phonecall.section,model_report_crm_phonecall_section,crm.group_crm_manager,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_report_crm_case_user report.crm.case.user model_report_crm_case_user crm.group_crm_manager 1 0 0 0
3 access_report_crm_case_categ report.crm.case.categ model_report_crm_case_categ crm.group_crm_manager 1 0 0 0
4 access_repor_crm_case_section report.crm.case.section model_report_crm_case_section crm.group_crm_manager 1 0 0 0
5 access_report_crm_case_service_dashboard report.crm.case.service.dashboard model_report_crm_case_service_dashboard crm.group_crm_manager 1 0 0 0
6 access_report_crm_case_section_stage report.crm.case.section.stage model_report_crm_case_section_stage crm.group_crm_manager 1 0 0 0
7 access_report_crm_case_section_categ_stage report.crm.case.section.categ.stage model_report_crm_case_section_categ_stage crm.group_crm_manager 1 0 0 0
8 access_report_crm_case_section_categ_type report.crm.case.section.categ.type model_report_crm_case_section_categ_type crm.group_crm_manager 1 0 0
9 access_report_crm_case_section_type report.crm.case.section.type model_report_crm_case_section_type crm.group_crm_manager 1 0 0
10 access_report_crm_claim_user report.crm.claim.user model_report_crm_claim_user crm.group_crm_manager 1 0 0 0
11 access_report_crm_claim_categ report.crm.claim.categ model_report_crm_claim_categ crm.group_crm_manager 1 0 0 0
12 access_repor_crm_claim_section report.crm.claim.section model_report_crm_claim_section crm.group_crm_manager 1 0 0 0
13 access_report_crm_claim_section_categ_stage report.crm.claim.section.categ.stage model_report_crm_claim_section_categ_stage crm.group_crm_manager 1 0 0 0
14 access_report_crm_claim_section_categ_type report.crm.claim.section.categ.type model_report_crm_claim_section_categ_type crm.group_crm_manager 1 0 0
15 access_report_crm_claim_section_type report.crm.claim.section.type model_report_crm_claim_section_type crm.group_crm_manager 1 0 0
16 access_report_crm_fundraising_user report.crm.fundraising.user model_report_crm_fundraising_user crm.group_crm_manager 1 0 0 0
17 access_report_crm_fundraising_categ report.crm.fundraising.categ model_report_crm_fundraising_categ crm.group_crm_manager 1 0 0 0
18 access_repor_crm_fundraising_section report.crm.fundraising.section model_report_crm_fundraising_section crm.group_crm_manager 1 0 0 0
19 access_report_crm_fundraising_section_categ_stage report.crm.fundraising.section.categ.stage model_report_crm_fundraising_section_categ_stage crm.group_crm_manager 1 0 0 0
20 access_report_crm_fundraising_section_categ_type report.crm.fundraising.section.categ.type model_report_crm_fundraising_section_categ_type crm.group_crm_manager 1 0 0
21 access_report_crm_fundraising_section_type report.crm.fundraising.section.type model_report_crm_fundraising_section_type crm.group_crm_manager 1 0 0
22 access_report_crm_lead_user report.crm.lead.user model_report_crm_lead_user crm.group_crm_manager 1 0 0 0
23 access_report_crm_lead_categ report.crm.lead.categ model_report_crm_lead_categ crm.group_crm_manager 1 0 0 0
24 access_repor_crm_lead_section report.crm.lead.section model_report_crm_lead_section crm.group_crm_manager 1 0 0 0
25 access_report_crm_lead_section_stage report.crm.lead.section.stage model_report_crm_lead_section_stage crm.group_crm_manager 1 0 0 0
26 access_report_crm_lead_section_categ_stage report.crm.lead.section.categ.stage model_report_crm_lead_section_categ_stage crm.group_crm_manager 1 0 0 0
27 access_report_crm_lead_section_categ_type report.crm.lead.section.categ.type model_report_crm_lead_section_categ_type crm.group_crm_manager 1 0 0
28 access_report_crm_lead_section_type report.crm.lead.section.type model_report_crm_lead_section_type crm.group_crm_manager 1 0 0
29 access_report_crm_opportunity_user report.crm.opportunity.user model_report_crm_opportunity_user crm.group_crm_manager 1 0 0 0
30 access_report_crm_opportunity_categ report.crm.opportunity.categ model_report_crm_opportunity_categ crm.group_crm_manager 1 0 0 0
31 access_repor_crm_opportunity_section report.crm.opportunity.section model_report_crm_opportunity_section crm.group_crm_manager 1 0 0 0
32 access_report_crm_opportunity_section_categ_stage report.crm.opportunity.section.categ.stage model_report_crm_opportunity_section_categ_stage crm.group_crm_manager 1 0 0 0
33 access_report_crm_opportunity_section_categ_type report.crm.opportunity.section.categ.type model_report_crm_opportunity_section_categ_type crm.group_crm_manager 1 0 0
34 access_report_crm_opportunity_section_type report.crm.opportunity.section.type model_report_crm_opportunity_section_type crm.group_crm_manager 1 0 0
35 access_report_crm_phonecall_user report.crm.phonecall.user model_report_crm_phonecall_user crm.group_crm_manager 1 0 0 0
36 access_report_crm_phonecall_categ report.crm.phonecall.categ model_report_crm_phonecall_categ crm.group_crm_manager 1 0 0 0
37 access_repor_crm_phonecall_section report.crm.phonecall.section model_report_crm_phonecall_section crm.group_crm_manager 1 0 0 0

View File

@ -37,7 +37,7 @@
'init_xml': [],
'update_xml': [
#'security/resource_security.xml',
# 'security/ir.model.access.csv',
'security/ir.model.access.csv',
'resource_view.xml',
],
'demo_xml': ['resource_demo.xml'

View File

@ -1,5 +1,5 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_timesheet_group","resource.calendar","model_resource_calendar","hr.group_hr_user",1,0,0,0
"access_hr_timesheet","hr.timesheet","model_hr_timesheet","hr.group_hr_user",1,1,1,1
"access_hr_timesheet_manager","hr.timesheet manager","model_hr_timesheet","hr.group_hr_manager",1,1,1,1
"access_hr_timesheet_group_manager","hr.timesheet.group.manager","model_hr_timesheet_group","hr.group_hr_manager",1,1,1,1
"access_resource_calendar","resource.calendar","model_resource_calendar","base.group_user",1,0,0,0
"access_resource_calendar_week","resource.calendar.week","model_resource_calendar_week","base.group_user",1,0,0,0
"access_resource_resource","resource.resource","model_resource_resource","base.group_user",1,0,0,0
"access_resource_calendar_leaves","resource.calendar.leaves","model_resource_calendar_leaves","base.group_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_timesheet_group access_resource_calendar resource.calendar model_resource_calendar hr.group_hr_user base.group_user 1 0 0 0
3 access_hr_timesheet access_resource_calendar_week hr.timesheet resource.calendar.week model_hr_timesheet model_resource_calendar_week hr.group_hr_user base.group_user 1 1 0 1 0 1 0
4 access_hr_timesheet_manager access_resource_resource hr.timesheet manager resource.resource model_hr_timesheet model_resource_resource hr.group_hr_manager base.group_user 1 1 0 1 0 1 0
5 access_hr_timesheet_group_manager access_resource_calendar_leaves hr.timesheet.group.manager resource.calendar.leaves model_hr_timesheet_group model_resource_calendar_leaves hr.group_hr_manager base.group_user 1 1 0 1 0 1 0

View File

@ -16,3 +16,10 @@
"access_stock_location_product_manager","stock.location product manager","model_stock_location","product.group_product_manager",1,0,0,0
"access_stock_lines_date","report.stock.lines.date all","model_report_stock_lines_date",,1,0,0,0
"access_stock_report_tracklots","stock.report.tracklots","model_stock_report_tracklots","stock.group_stock_user",1,1,1,1
"access_report_products_to_received_planned","report.products.to.received.planned","model_report_products_to_received_planned","stock.group_stock_user",1,0,0,0
"access_report_delivery_products_planned","report.delivery.products.planned","model_report_delivery_products_planned","stock.group_stock_user",1,0,0,0
"access_stock_move_track","stock.move.track","model_stock_move_track","stock.group_stock_user",1,0,0,0
"access_stock_move_consume","stock.move.consume","model_stock_move_consume","stock.group_stock_user",1,0,0,0
"access_stock_move_scrap","stock.move.scrap","model_stock_move_scrap","stock.group_stock_user",1,0,0,0
"access_stock_move_split","stock.move.split","model_stock_move_split","stock.group_stock_user",1,0,0,0
"access_stock_move_split_lines","stock.move.split.lines","model_stock_move_split_lines","stock.group_stock_user",1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
16 access_stock_location_product_manager stock.location product manager model_stock_location product.group_product_manager 1 0 0 0
17 access_stock_lines_date report.stock.lines.date all model_report_stock_lines_date 1 0 0 0
18 access_stock_report_tracklots stock.report.tracklots model_stock_report_tracklots stock.group_stock_user 1 1 1 1
19 access_report_products_to_received_planned report.products.to.received.planned model_report_products_to_received_planned stock.group_stock_user 1 0 0 0
20 access_report_delivery_products_planned report.delivery.products.planned model_report_delivery_products_planned stock.group_stock_user 1 0 0 0
21 access_stock_move_track stock.move.track model_stock_move_track stock.group_stock_user 1 0 0 0
22 access_stock_move_consume stock.move.consume model_stock_move_consume stock.group_stock_user 1 0 0 0
23 access_stock_move_scrap stock.move.scrap model_stock_move_scrap stock.group_stock_user 1 0 0 0
24 access_stock_move_split stock.move.split model_stock_move_split stock.group_stock_user 1 0 0 0
25 access_stock_move_split_lines stock.move.split.lines model_stock_move_split_lines stock.group_stock_user 1 0 0 0

View File

@ -110,13 +110,13 @@ class stock_move_scrap(osv.osv_memory):
stock_move_scrap()
class spilt_in_production_lot(osv.osv_memory):
_name = "stock.move.spilt"
class split_in_production_lot(osv.osv_memory):
_name = "stock.move.split"
_description = "Split in Production lots"
_columns = {
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
'line_ids': fields.one2many('stock.move.spilt.lines', 'lot_id', 'Lots Number')
'line_ids': fields.one2many('stock.move.split.lines', 'lot_id', 'Lots Number')
}
def _get_product_id(self, cr, uid, context):
@ -185,17 +185,17 @@ class spilt_in_production_lot(osv.osv_memory):
return new_move
spilt_in_production_lot()
split_in_production_lot()
class stock_move_spilt_lines(osv.osv_memory):
_name = "stock.move.spilt.lines"
class stock_move_split_lines(osv.osv_memory):
_name = "stock.move.split.lines"
_description = "Split lines"
_columns = {
'name': fields.char('Tracking serial', size=64),
'quantity': fields.integer('Quantity'),
'use_exist' : fields.boolean('Use Exist'),
'lot_id': fields.many2one('stock.move.spilt', 'Lot'),
'lot_id': fields.many2one('stock.move.split', 'Lot'),
'action': fields.selection([('split','Split'),('keepinone','Keep in one lot')],'Action'),
}
_defaults = {
@ -203,4 +203,4 @@ class stock_move_spilt_lines(osv.osv_memory):
'action' : lambda *x: 'split',
}
stock_move_spilt_lines()
stock_move_split_lines()

View File

@ -100,7 +100,7 @@
<record id="view_split_in_lots" model="ir.ui.view">
<field name="name">Split in lots</field>
<field name="model">stock.move.spilt</field>
<field name="model">stock.move.split</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Split in lots">
@ -131,7 +131,7 @@
<record id="track_line" model="ir.actions.act_window">
<field name="name">Split in lots</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.move.spilt</field>
<field name="res_model">stock.move.split</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>