commit
02213dea5b
|
@ -2684,6 +2684,15 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
'position_id' : new_fp,
|
||||
}
|
||||
obj_ac_fp.create(cr, uid, vals_acc)
|
||||
|
||||
#fially inactive the demo chart of accounts
|
||||
data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')])
|
||||
if data_id:
|
||||
data = data_pool.browse(cr, uid, data_id[0])
|
||||
account_id = data.res_id
|
||||
if account_id:
|
||||
cr.execute("update account_account set active='f' where id=%s" % (account_id))
|
||||
|
||||
wizard_multi_charts_accounts()
|
||||
|
||||
class account_bank_accounts_wizard(osv.osv_memory):
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="terp-gtk-stop"/>
|
||||
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
|
||||
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="terp-dolar"/>
|
||||
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='open,paid' icon="terp-dolar"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
|
|
|
@ -27,15 +27,19 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account Board">
|
||||
<hpaned>
|
||||
<vpaned>
|
||||
<child1>
|
||||
<action colspan="4" height="160" name="%(account.action_invoice_tree1)d" string="Draft Customer Invoices" domain="[('state','=','draft'),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" height="220" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<action colspan="4" name="%(action_aged_receivable)d" string="Aged receivables"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<action colspan="4" height="220" name="%(action_aged_income)d" string="Aged income"/>
|
||||
</group>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</vpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -38,10 +38,11 @@ class account_journal_select(osv.osv_memory):
|
|||
id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
|
||||
result = act_obj.read(cr, uid, [id])[0]
|
||||
cr.execute('select journal_id, period_id from account_journal_period where id=%s', (context['active_id'],))
|
||||
journal_id, period_id = cr.fetchone()
|
||||
|
||||
result['domain'] = str([('journal_id', '=', journal_id), ('period_id', '=', period_id)])
|
||||
result['context'] = str({'journal_id': journal_id, 'period_id': period_id})
|
||||
res = cr.fetchone()
|
||||
if res:
|
||||
journal_id, period_id = res
|
||||
result['domain'] = str([('journal_id', '=', journal_id), ('period_id', '=', period_id)])
|
||||
result['context'] = str({'journal_id': journal_id, 'period_id': period_id})
|
||||
return result
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class account_pl_report(osv.osv_memory):
|
|||
'fiscalyear' : False,
|
||||
'display_account': 'bal_all',
|
||||
'display_type': True,
|
||||
}
|
||||
}
|
||||
|
||||
def next_view(self, cr, uid, ids, context=None):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
|
|
|
@ -55,6 +55,8 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<label string="Select account chart to print profit and loss account report" colspan="4"/>
|
||||
<separator colspan="4"/>
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
|
|
|
@ -2,51 +2,51 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<!---->
|
||||
<!-- <record id="view_account_print_journal" model="ir.ui.view">-->
|
||||
<!-- <record id="view_account_print_journal" model="ir.ui.view">-->
|
||||
<!-- <field name="name">Account Print Journal</field>-->
|
||||
<!-- <field name="model">account.print.journal</field>-->
|
||||
<!-- <field name="type">form</field>-->
|
||||
<!-- <field name="arch" type="xml">-->
|
||||
<!-- <form string="Print Journal">-->
|
||||
<!-- <group col="4" colspan="6">-->
|
||||
<!-- <field name="journal_id"/>-->
|
||||
<!-- <field name="period_id"/>-->
|
||||
<!-- <newline/>-->
|
||||
<!-- <field name="sort_selection"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <separator colspan="4"/>-->
|
||||
<!-- <group col="2" colspan="4">-->
|
||||
<!-- <button special="cancel" string="Cancel" icon='gtk-cancel'/>-->
|
||||
<!-- <button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- </form>-->
|
||||
<!-- <form string="Print Journal">-->
|
||||
<!-- <group col="4" colspan="6">-->
|
||||
<!-- <field name="journal_id"/>-->
|
||||
<!-- <field name="period_id"/>-->
|
||||
<!-- <newline/>-->
|
||||
<!-- <field name="sort_selection"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- <separator colspan="4"/>-->
|
||||
<!-- <group col="2" colspan="4">-->
|
||||
<!-- <button special="cancel" string="Cancel" icon='gtk-cancel'/>-->
|
||||
<!-- <button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>-->
|
||||
<!-- </group>-->
|
||||
<!-- </form>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
|
||||
<record id="view_account_print_journal" model="ir.ui.view">
|
||||
<record id="view_account_print_journal" model="ir.ui.view">
|
||||
<field name="name">Account Print Journal</field>
|
||||
<field name="model">account.print.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Journal">
|
||||
<group height="400" width="400">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<field name="sort_selection"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print Journal">
|
||||
<group height="430" width="420">
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_id" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<field name="period_id" nolabel="1"/><newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<field name="sort_selection"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -59,12 +59,12 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_print_journal"
|
||||
id="menu_account_print_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
<menuitem
|
||||
name="Journals"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_print_journal"
|
||||
id="menu_account_print_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'base_contact_view.xml',
|
||||
# 'base_contact_installer_view.xml',
|
||||
'base_contact_installer_view.xml',
|
||||
'process/base_contact_process.xml'
|
||||
],
|
||||
'demo_xml': ['base_contact_demo.xml'],
|
||||
|
|
|
@ -83,8 +83,8 @@ Create dashboard for CRM that includes:
|
|||
'wizard/crm_opportunity_to_phonecall_view.xml',
|
||||
'wizard/crm_partner_to_opportunity_view.xml',
|
||||
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_send_email_view.xml',
|
||||
'wizard/crm_forward_to_partner_view.xml',
|
||||
'wizard/crm_custom_create_menu_view.xml',
|
||||
|
||||
'crm_view.xml',
|
||||
|
|
|
@ -21,9 +21,8 @@
|
|||
##############################################################################
|
||||
|
||||
import base64
|
||||
import itertools
|
||||
import time
|
||||
|
||||
import re
|
||||
from osv import osv, fields
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
@ -31,6 +30,7 @@ from tools.translate import _
|
|||
class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"""Forwards lead history"""
|
||||
_name = 'crm.lead.forward.to.partner'
|
||||
_inherit = "crm.send.mail"
|
||||
|
||||
_columns = {
|
||||
'name': fields.selection([('user', 'User'), ('partner', 'Partner'), \
|
||||
|
@ -38,19 +38,12 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
'user_id': fields.many2one('res.users', "User"),
|
||||
'partner_id' : fields.many2one('res.partner', 'Partner'),
|
||||
'address_id' : fields.many2one('res.partner.address', 'Address'),
|
||||
'email_from' : fields.char('From', required=True, size=128),
|
||||
'email_to' : fields.char('To', required=True, size=128),
|
||||
'subject' : fields.char('Subject', required=True, size=128),
|
||||
'message' : fields.text('Message', required=True),
|
||||
'history': fields.selection([('latest', 'Latest email'), ('whole', 'Whole Story'), ('info', 'Case Information')], 'Send history', required=True),
|
||||
'add_cc': fields.boolean('Add as CC', required=False, help="Check this box if you want this address to be added in the CC list"\
|
||||
" for this case, in order to receive all future conversations"),
|
||||
'history': fields.selection([('info', 'Case Information'), ('latest', 'Latest email'), ('whole', 'Whole Story')], 'Send history', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'name' : 'email',
|
||||
'history': 'info',
|
||||
'add_cc': True,
|
||||
'history': 'latest',
|
||||
'email_from': lambda self, cr, uid, *a: self.pool.get('res.users')._get_email_from(cr, uid, uid)[uid]
|
||||
}
|
||||
|
||||
|
@ -117,7 +110,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
res_id = context.get('active_id')
|
||||
msg_val = self._get_case_history(cr, uid, history_type, res_id, context=context)
|
||||
if msg_val:
|
||||
res = {'value': {'message' : '\n\n' + msg_val}}
|
||||
res = {'value': {'body' : '\n\n' + msg_val}}
|
||||
return res
|
||||
|
||||
def _get_case_history(self, cr, uid, history_type, res_id, context=None):
|
||||
|
@ -125,22 +118,23 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
return
|
||||
|
||||
msg_val = ''
|
||||
case_info = self.get_lead_details(cr, uid, res_id, context=context)
|
||||
model_pool = self.pool.get('crm.lead')
|
||||
|
||||
if history_type == 'info':
|
||||
msg_val = self.get_lead_details(cr, uid, res_id, context=context)
|
||||
msg_val = case_info
|
||||
|
||||
elif history_type == 'whole':
|
||||
log_ids = model_pool.browse(cr, uid, res_id, context=context).message_ids
|
||||
log_ids = [x.id for x in log_ids]
|
||||
if not log_ids:
|
||||
raise osv.except_osv('Warning!', 'There is no history to send')
|
||||
msg_val = self.get_whole_history(cr, uid, log_ids, context=context)
|
||||
msg_val = case_info + '\n\n' + self.get_whole_history(cr, uid, log_ids, context=context)
|
||||
|
||||
elif history_type == 'latest':
|
||||
log_ids = model_pool.browse(cr, uid, res_id, context=context).message_ids
|
||||
if not log_ids:
|
||||
raise osv.except_osv('Warning!', 'There is no history to send')
|
||||
msg_val = self.get_latest_history(cr, uid, log_ids[0].id, context=context)
|
||||
msg_val = case_info
|
||||
else:
|
||||
msg_val = case_info + '\n\n' + self.get_latest_history(cr, uid, log_ids[0].id, context=context)
|
||||
|
||||
return msg_val
|
||||
|
||||
|
@ -170,69 +164,40 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
email = self.pool.get('res.partner.address').browse(cr, uid, address_id).email
|
||||
return {'value': {'email_to' : email}}
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
return {'type' : 'ir.actions.act_window_close'}
|
||||
|
||||
def action_forward(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Forward the lead to a partner
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
res_id = context.get('active_id', False)
|
||||
|
||||
model = context.get('active_model', False)
|
||||
if not res_id or not model:
|
||||
return {}
|
||||
|
||||
|
||||
this = self.browse(cr, uid, ids[0], context=context)
|
||||
|
||||
case_pool = self.pool.get(model)
|
||||
case_pool = self.pool.get(context.get('active_model'))
|
||||
res_id = context and context.get('active_id', False) or False
|
||||
case = case_pool.browse(cr, uid, res_id, context=context)
|
||||
|
||||
emails = [this.email_to]
|
||||
body = case_pool.format_body(this.message)
|
||||
email_from = this.email_from or False
|
||||
context.update({'mail': 'forward'})
|
||||
super(crm_lead_forward_to_partner, self).action_send(cr, uid, ids, context=context)
|
||||
|
||||
# extract attachements from case and emails according to mode
|
||||
attachments = []
|
||||
attach_pool = self.pool.get('ir.attachment')
|
||||
direct_attachments = attach_pool.search(cr, uid, [('res_model', '=', 'crm.lead'), ('res_id', '=', res_id)], context=context)
|
||||
attachments += attach_pool.browse(cr, uid, direct_attachments, context=context)
|
||||
if this.history in ['latest', 'whole'] and case.message_ids:
|
||||
msgs = case.message_ids
|
||||
if this.history == 'latest':
|
||||
msgs = msgs[:1]
|
||||
attachments.extend(itertools.chain(*[m.attachment_ids for m in msgs]))
|
||||
attach = [(a.datas_fname or a.name, base64.decodestring(a.datas)) for a in attachments if a.datas]
|
||||
to_write = {'date_assign': time.strftime('%Y-%m-%d')}
|
||||
if (this.name == 'partner' and this.partner_id):
|
||||
to_write['partner_assigned_id'] = this.partner_id.id
|
||||
|
||||
result = tools.email_send(
|
||||
email_from,
|
||||
emails,
|
||||
this.subject,
|
||||
body,
|
||||
openobject_id=str(case.id),
|
||||
attach=attach,
|
||||
reply_to=case.section_id.reply_to,
|
||||
)
|
||||
|
||||
if result:
|
||||
case_pool.history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, subject=this.subject, details=body, email_from=email_from, attach=attach)
|
||||
to_write = {'date_assign': time.strftime('%Y-%m-%d')}
|
||||
if (this.name == 'partner' and this.partner_id):
|
||||
to_write['partner_assigned_id'] = this.partner_id.id
|
||||
case_pool.write(cr, uid, case.id, to_write)
|
||||
else:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
|
||||
if this.add_cc and (not case.email_cc or not this.email_to in case.email_cc):
|
||||
case_pool.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc + ', ' + this.email_to or this.email_to})
|
||||
if this.name == 'user':
|
||||
to_write.update({'user_id' : this.user_id.id})
|
||||
email_re = r'([^ ,<@]+@[^> ,]+)'
|
||||
email_cc = re.findall(email_re, case.email_cc or '')
|
||||
new_cc = ''
|
||||
for to in this.email_to.split(','):
|
||||
email_to = re.findall(email_re, to)
|
||||
email_to = email_to and email_to[0] or ''
|
||||
if email_to not in email_cc:
|
||||
new_cc += ', ' + to
|
||||
to_write.update({'email_cc' : case.email_cc and case.email_cc + new_cc})
|
||||
case_pool.write(cr, uid, case.id, to_write, context=context)
|
||||
|
||||
return {}
|
||||
|
||||
def get_lead_details(self, cr, uid, lead_id, context=None):
|
||||
message = []
|
||||
body = []
|
||||
lead_proxy = self.pool.get('crm.lead')
|
||||
lead = lead_proxy.browse(cr, uid, lead_id, context=context)
|
||||
if not lead.type or lead.type == 'lead':
|
||||
|
@ -258,10 +223,10 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
else:
|
||||
value = lead[field_name]
|
||||
|
||||
message.append("%s: %s" % (field_definition.string, value or ''))
|
||||
body.append("%s: %s" % (field_definition.string, value or ''))
|
||||
elif lead.type == 'opportunity':
|
||||
pa = lead.partner_address_id
|
||||
message = [
|
||||
body = [
|
||||
"Partner: %s" % (lead.partner_id.name_get()[0][1]),
|
||||
"Contact: %s" % (pa.name or ''),
|
||||
"Title: %s" % (pa.title or ''),
|
||||
|
@ -277,7 +242,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
"Fax: %s" % (pa.fax or ''),
|
||||
"Mobile: %s" % (pa.mobile or ''),
|
||||
]
|
||||
return "\n".join(message + ['---'])
|
||||
return "\n".join(body + ['---'])
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
|
@ -295,10 +260,10 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
|||
lead_proxy = self.pool.get('crm.lead')
|
||||
lead = lead_proxy.browse(cr, uid, active_id, context=context)
|
||||
|
||||
message = self._get_case_history(cr, uid, defaults.get('history', 'latest'), lead.id, context=context)
|
||||
body = self._get_case_history(cr, uid, defaults.get('history', 'latest'), lead.id, context=context)
|
||||
defaults.update({
|
||||
'subject' : '%s: %s' % (_('Fwd'), lead.name),
|
||||
'message' : message,
|
||||
'body' : body,
|
||||
})
|
||||
return defaults
|
||||
|
||||
|
|
|
@ -5,41 +5,45 @@
|
|||
<field name="name">crm_lead_forward_to_partner</field>
|
||||
<field name="model">crm.lead.forward.to.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm_send_new_mail_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Forward to Partner">
|
||||
<separator string="Sender" colspan="4" />
|
||||
<field name="email_from" colspan="2" />
|
||||
<field name="history" colspan="2" on_change="on_change_history(history, context)"/>
|
||||
<separator string="Recipient" colspan="4" />
|
||||
<field name="name" colspan="2" />
|
||||
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
|
||||
<field name="user_id"
|
||||
attrs="{ 'required' : [('name','=','user')]}"
|
||||
on_change="on_change_email(user_id)" />
|
||||
<field name="email_from" position="before">
|
||||
<separator string="Forward to Partner" colspan="4" />
|
||||
<group col="4" colspan="6">
|
||||
<field name="history" colspan="2" on_change="on_change_history(history, context)"/>
|
||||
<field name="name" colspan="2" />
|
||||
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
|
||||
<field name="user_id"
|
||||
attrs="{ 'required' : [('name','=','user')]}"
|
||||
on_change="on_change_email(user_id)" />
|
||||
</group>
|
||||
<group col="4" colspan="4" attrs="{'invisible' : [('name','!=','partner')]}">
|
||||
<field name="partner_id" attrs="{'required' : [('name','=','partner')]}" on_change="on_change_partner(partner_id)" colspan="2" />
|
||||
<field name="address_id" string="Contact" on_change="on_change_address(address_id)" colspan="2" />
|
||||
</group>
|
||||
</group>
|
||||
<group col="4" colspan="4" attrs="{'invisible' : [('name','!=','partner')]}">
|
||||
<field name="partner_id" attrs="{'required' : [('name','=','partner')]}" on_change="on_change_partner(partner_id)" colspan="2" />
|
||||
<field name="address_id" string="Contact" on_change="on_change_address(address_id)" colspan="2" />
|
||||
</group>
|
||||
<field colspan="2" name="email_to" attrs="{ 'required' : [('name','=','email')]}" />
|
||||
<field name="add_cc"/>
|
||||
<separator string="Message" colspan="4" />
|
||||
<field name="subject" colspan="4" />
|
||||
<field name="message" colspan="4" nolabel="1"/>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="2">
|
||||
<button name="action_cancel" special="cancel" string="Cancel" icon="gtk-cancel" type="object" />
|
||||
<button name="action_forward" string="Forward" icon="gtk-go-forward" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_lead_forward_to_partner_form1">
|
||||
<field name="name">crm_lead_forward_to_partner1</field>
|
||||
<field name="model">crm.lead.forward.to.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="crm_send_new_mail_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_send" position="replace">
|
||||
<button name="action_forward" string="Forward" icon="gtk-go-forward" type="object" />
|
||||
</button>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="crm_lead_forward_to_partner_act">
|
||||
<field name="name">Forward to Partner</field>
|
||||
<field name="res_model">crm.lead.forward.to.partner</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_lead_forward_to_partner_form1"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -20,11 +20,12 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from crm import crm
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
import base64
|
||||
import itertools
|
||||
import tools
|
||||
from crm import crm
|
||||
|
||||
class crm_send_new_email_attachment(osv.osv_memory):
|
||||
_name = 'crm.send.mail.attachment'
|
||||
|
@ -49,29 +50,23 @@ class crm_send_new_email(osv.osv_memory):
|
|||
'email_cc' : fields.char('CC', size=512, help="Carbon Copy: list of recipients that will receive"\
|
||||
" a copy of this mail, and future communication related to this case"),
|
||||
'subject': fields.char('Subject', size=512, required=True),
|
||||
'text': fields.text('Message', required=True),
|
||||
'body': fields.text('Message Body', required=True),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True),
|
||||
'attachment_ids' : fields.one2many('crm.send.mail.attachment', 'wizard_id'),
|
||||
}
|
||||
|
||||
def action_cancel(self, cr, uid, ids, context=None):
|
||||
""" Closes Phonecall to Opportunity form
|
||||
"""
|
||||
return {'type':'ir.actions.act_window_close'}
|
||||
|
||||
def action_send(self, cr, uid, ids, context=None):
|
||||
""" This sends an email to ALL the addresses of the selected partners.
|
||||
"""
|
||||
|
||||
hist_obj = self.pool.get('mailgate.message')
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
if not context.get('model'):
|
||||
if not context.get('active_model'):
|
||||
raise osv.except_osv(_('Error'), _('Can not send mail!'))
|
||||
|
||||
model = context.get('model')
|
||||
model = context.get('active_model')
|
||||
case_pool = self.pool.get(model)
|
||||
res_id = context and context.get('active_id', False) or False
|
||||
|
||||
|
@ -83,24 +78,38 @@ class crm_send_new_email(osv.osv_memory):
|
|||
message_id = None
|
||||
ref_id = None
|
||||
|
||||
case = case_pool.browse(cr, uid, res_id)
|
||||
case = case_pool.browse(cr, uid, res_id, context=context)
|
||||
if context.get('mail', 'new') == 'new':
|
||||
if case.message_ids:
|
||||
message_id = case.message_ids[0].message_id
|
||||
elif context.get('mail') == 'forward':
|
||||
# extract attachements from case and emails according to mode
|
||||
attachments = []
|
||||
attach_pool = self.pool.get('ir.attachment')
|
||||
direct_attachments = attach_pool.search(cr, uid, [('res_model', '=', 'crm.lead'), ('res_id', '=', res_id)], context=context)
|
||||
attachments += attach_pool.browse(cr, uid, direct_attachments, context=context)
|
||||
if obj.history in ['latest', 'whole'] and case.message_ids:
|
||||
msgs = case.message_ids
|
||||
if obj.history == 'latest':
|
||||
msgs = msgs[:1]
|
||||
attachments.extend(itertools.chain(*[m.attachment_ids for m in msgs]))
|
||||
attach_all = [(a.datas_fname or a.name, base64.decodestring(a.datas)) for a in attachments if a.datas]
|
||||
attach += attach_all
|
||||
|
||||
else:
|
||||
hist = hist_obj.browse(cr, uid, res_id)
|
||||
hist = hist_obj.browse(cr, uid, res_id, context=context)
|
||||
message_id = hist.message_id
|
||||
model = hist.model
|
||||
model_pool = self.pool.get(model)
|
||||
case_pool = self.pool.get(model)
|
||||
res_id = hist.res_id
|
||||
ref_id = hist.ref_id
|
||||
case = model_pool.browse(cr, uid, res_id)
|
||||
case = case_pool.browse(cr, uid, res_id, context=context)
|
||||
emails = [obj.email_to]
|
||||
email_cc = obj.email_cc and obj.email_cc.split(',') or ''
|
||||
emails = filter(None, emails)
|
||||
body = obj.text
|
||||
body = obj.body
|
||||
|
||||
body = case_pool.format_body(body)
|
||||
body = body and tools.ustr(body) or ''
|
||||
email_from = getattr(obj, 'email_from', False)
|
||||
x_headers = {}
|
||||
if message_id:
|
||||
|
@ -121,10 +130,11 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if not flag:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
|
||||
case_pool.history(cr, uid, [case], _('Send'), history=True, \
|
||||
msg_dict = {'new': 'Send', 'reply': 'Reply', 'forward': 'Forward'}
|
||||
case_pool.history(cr, uid, [case], _(msg_dict[context.get('mail', 'new')]), history=True, \
|
||||
email=obj.email_to, details=body, \
|
||||
subject=obj.subject, email_from=email_from, \
|
||||
email_cc=email_cc, message_id=message_id, \
|
||||
email_cc=', '.join(email_cc), message_id=message_id, \
|
||||
references=ref_id or message_id, attach=attach)
|
||||
if obj.state == 'unchanged':
|
||||
pass
|
||||
|
@ -145,7 +155,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if not context:
|
||||
context = {}
|
||||
|
||||
if not context.get('model'):
|
||||
if not context.get('active_model'):
|
||||
raise osv.except_osv(_('Error'), _('Can not send mail!'))
|
||||
|
||||
res = super(crm_send_new_email, self).default_get(cr, uid, fields, context=context)
|
||||
|
@ -154,7 +164,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
res.update(self.get_reply_defaults(cr, uid, fields, context=context))
|
||||
return res
|
||||
|
||||
model = context.get('model')
|
||||
model = context.get('active_model')
|
||||
mod_obj = self.pool.get(model)
|
||||
res_id = context and context.get('active_ids', []) or []
|
||||
|
||||
|
@ -172,8 +182,8 @@ class crm_send_new_email(osv.osv_memory):
|
|||
res.update({'subject': tools.ustr(context.get('subject', case.name) or '')})
|
||||
if 'email_cc' in fields:
|
||||
res.update({'email_cc': tools.ustr(case.email_cc or '')})
|
||||
if 'text' in fields:
|
||||
res.update({'text': u'\n'+(tools.ustr(case.user_id.signature or ''))})
|
||||
if 'body' in fields:
|
||||
res.update({'body': u'\n'+(tools.ustr(case.user_id.signature or ''))})
|
||||
if 'state' in fields:
|
||||
res.update({'state': u'pending'})
|
||||
|
||||
|
@ -209,7 +219,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
signature = u'\n' + (tools.ustr(case.user_id.signature or '')) + u'\n'
|
||||
original = [signature]
|
||||
|
||||
if include_original == True and 'text' in fields:
|
||||
if include_original == True and 'body' in fields:
|
||||
header = u'-------- Original Message --------'
|
||||
sender = u'From: %s' %(tools.ustr(hist.email_from or ''))
|
||||
to = u'To: %s' % (tools.ustr(hist.email_to or ''))
|
||||
|
@ -218,10 +228,14 @@ class crm_send_new_email(osv.osv_memory):
|
|||
|
||||
original = [signature, header, sender, to, sentdate, desc]
|
||||
|
||||
res['text']= u'\n' + u'\n'.join(original)
|
||||
res['body']= u'\n' + u'\n'.join(original)
|
||||
|
||||
if 'subject' in fields:
|
||||
res.update({u'subject': u'Re: %s' %(tools.ustr(hist.name or ''))})
|
||||
if 'email_cc' in fields:
|
||||
res.update({'email_cc': case.email_cc and tools.ustr(case.email_cc) or False})
|
||||
if 'reply_to' in fields:
|
||||
res.update({'reply_to': case.section_id.reply_to})
|
||||
if 'state' in fields:
|
||||
res['state'] = u'pending'
|
||||
return res
|
||||
|
@ -239,7 +253,7 @@ class crm_send_new_email(osv.osv_memory):
|
|||
if not context:
|
||||
context = {}
|
||||
|
||||
if not context.get('model'):
|
||||
if not context.get('active_model'):
|
||||
raise osv.except_osv(_('Error'), _('Can not send mail!'))
|
||||
return True
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<field name="model">crm.send.mail</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Send New Mail" col="4">
|
||||
<form string="Send Mail" col="4">
|
||||
<group colspan="4" col="2">
|
||||
<field name="email_from"/>
|
||||
<field name="reply_to"/>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</group>
|
||||
<notebook colspan="6">
|
||||
<page string="Message">
|
||||
<field name="text" nolabel="1" colspan="4" default_focus="1"/>
|
||||
<field name="body" nolabel="1" colspan="4" default_focus="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" nolabel="1">
|
||||
|
@ -36,7 +36,7 @@
|
|||
<separator string="" colspan="6"/>
|
||||
<group colspan="6" col="4" >
|
||||
<field name="state" />
|
||||
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
|
||||
<button string="_Cancel" icon="gtk-cancel" special="cancel" />
|
||||
<button name="action_send" type="object" string="_Send" icon="gtk-go-forward" />
|
||||
</group>
|
||||
</form>
|
||||
|
@ -46,7 +46,7 @@
|
|||
<!-- Send New Mail action -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_crm_send_mail">
|
||||
<field name="name">Send New Mail</field>
|
||||
<field name="name">Send Mail</field>
|
||||
<field name="res_model">crm.send.mail</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</tree>
|
||||
</field>
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="text" nolabel="1" colspan="4"/>
|
||||
<field name="body" nolabel="1" colspan="4"/>
|
||||
<separator string=" " colspan="4"/>
|
||||
<group colspan="4" col="3" >
|
||||
<label string=" " />
|
||||
|
|
|
@ -11,12 +11,19 @@
|
|||
<form position="attributes">
|
||||
<attribute name="string">Configure Calendars for CRM Sections</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0"
|
||||
string="OpenERP can create and pre-configure a series of integrated calendar for you."/>
|
||||
<separator string="Create Pre-Configured Calendars"
|
||||
colspan="4"/>
|
||||
<newline/>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string"
|
||||
>Create Pre-Configured Calendars</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">OpenERP can create and pre-configure a series of integrated calendar for you.</attribute>
|
||||
<attribute name="width">200</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='rowspan'>15</attribute>
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<field name="meeting"/>
|
||||
<field name="opportunity"/>
|
||||
<field name="phonecall"/>
|
||||
|
@ -27,8 +34,6 @@
|
|||
<field name="jobs"/>
|
||||
<field name="fund"/>
|
||||
</group>
|
||||
<xpath expr='//button[@name="action_skip"]'
|
||||
position='replace'/>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -43,7 +48,7 @@
|
|||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<!-- register configuration wizard -->
|
||||
register configuration wizard
|
||||
<record id="config_wizard_step_case_section_menu" model="ir.actions.todo">
|
||||
<field name="action_id" ref="action_view_document_ics_config_directories"/>
|
||||
</record>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<field name="state" colspan="2"/>
|
||||
<group colspan="2">
|
||||
<button string="Confirm" name="confirm" states="draft" type="workflow" icon="gtk-yes"/>
|
||||
<button string="To Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Approve" name="validate" states="confirm" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Approved" name="second_validate" states="validate1" type="workflow" icon="gtk-apply"/>
|
||||
<button string="Refuse" name="refuse" states="confirm,validate1" type="workflow" icon="gtk-no"/>
|
||||
<button string="Cancel" name="cancel" states="validate,refuse" type="workflow" icon="gtk-cancel"/>
|
||||
|
|
|
@ -76,7 +76,30 @@
|
|||
<field name="model">olap.parameters.config.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Parameters Configure">
|
||||
<form string="Parameters Configure wizard">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="3" width="180" height="250">
|
||||
<field name="config_logo" widget="image" width="200" height="100" nolabel="1" colspan="1"/>
|
||||
<newline/>
|
||||
<label align="0.0" string="This wizard will automatically configure the web client for Business Intelligence." width="200" colspan="2"/>
|
||||
</group>
|
||||
<separator string="" position="vertical" colspan="1" rowspan="12"/>
|
||||
<group colspan="4">
|
||||
<separator string=" Business Intelligence Web Client" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
<field name="host_port" colspan="4"/>
|
||||
</group>
|
||||
<group colspan="8" col="8">
|
||||
<separator string="" colspan="8"/>
|
||||
<group colspan="4" width="220">
|
||||
<field name="progress" widget="progressbar" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<!--form string="Parameters Configure">
|
||||
<separator string="BI Web Client." colspan="4"/>
|
||||
<label string="This wizard will automatically configure the web client for BI." align="0.0" colspan="4"/>
|
||||
<field name="host_name" colspan="4"/>
|
||||
|
@ -87,7 +110,7 @@
|
|||
<button special="cancel" string="Cancel" name="action_cancel" type="object" icon='gtk-cancel'/>
|
||||
<button name="action_config" string="Configure" icon='gtk-ok' type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</form-->
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -30,6 +30,9 @@ from osv import osv
|
|||
from osv import fields, osv
|
||||
import netsvc
|
||||
import cube
|
||||
import os
|
||||
import tools
|
||||
import base64
|
||||
from cube import levels
|
||||
|
||||
|
||||
|
@ -2128,16 +2131,34 @@ class olap_parameters_config_wizard(osv.osv_memory):
|
|||
Word(alphanums + "_" + " ").suppress()
|
||||
return s_p.parseString(aid.url)[1]
|
||||
|
||||
def _get_image(self, cr, uid, context=None):
|
||||
path = os.path.join('base','res','config_pixmaps/1.png')
|
||||
file_data = tools.file_open(path,'rb').read()
|
||||
return base64.encodestring(file_data)
|
||||
|
||||
def _progress(self, cr, uid, context=None):
|
||||
total = self.pool.get('ir.actions.todo')\
|
||||
.search_count(cr, uid, [], context)
|
||||
open = self.pool.get('ir.actions.todo')\
|
||||
.search_count(cr, uid, [('state','<>','open')], context)
|
||||
if total:
|
||||
return round(open*90./total)
|
||||
return 100.
|
||||
|
||||
_columns = {
|
||||
'host_name': fields.char('Server Name', size = 64, help = "Put here the server address or IP \
|
||||
Put localhost if its not clear.", required = True),
|
||||
'host_port': fields.char('Port', size = 4, help = "Put the port for the server. Put 8080 if \
|
||||
its not clear.", required = True),
|
||||
'config_logo': fields.binary('Image', readonly=True),
|
||||
'progress': fields.float('Configuration Progress', readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'host_name': _get_host,
|
||||
'host_port': _get_port,
|
||||
'progress': _progress,
|
||||
'config_logo': _get_image,
|
||||
}
|
||||
|
||||
def action_cancel(self, cr, uid, ids, conect = None):
|
||||
|
|
|
@ -17,13 +17,33 @@
|
|||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="planned_hours"/>
|
||||
<field name="effective_hours"/>
|
||||
<field name="priority"/>
|
||||
<field name="planned_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_delegated_task_tree" model="ir.ui.view">
|
||||
<field name="name">project.task.delegated.tree</field>
|
||||
<field name="model">project.task</field>
|
||||
<field name="type">tree</field>
|
||||
<field eval="99" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:date_deadline<current_date;blue:date_deadline==current_date;black:date_deadline>current_date" string="My Delegated Tasks">
|
||||
<field name="user_id"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="total_hours" widget="float_time"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="type_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Open Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
|
@ -38,8 +58,8 @@
|
|||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">['|',('parent_ids.user_id','=',uid),('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="project.view_task_tree2"/>
|
||||
<field name="domain">[('parent_ids.user_id','=',uid),('state', 'in', ('draft','open','pending'))]</field>
|
||||
<field name="view_id" ref="view_delegated_task_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
|
||||
|
|
|
@ -359,7 +359,7 @@ class task(osv.osv):
|
|||
'description': fields.text('Description'),
|
||||
'priority' : fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Urgent'), ('0','Very urgent')], 'Importance'),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of tasks."),
|
||||
'type': fields.many2one('project.task.type', 'Stage',),
|
||||
'type_id': fields.many2one('project.task.type', 'Stage',),
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
|
||||
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
|
||||
\n If the task is over, the states is set to \'Done\'.'),
|
||||
|
@ -549,25 +549,25 @@ class task(osv.osv):
|
|||
return True
|
||||
|
||||
def next_type(self, cr, uid, ids, *args):
|
||||
for typ in self.browse(cr, uid, ids):
|
||||
typeid = typ.type.id
|
||||
types = map(lambda x:x.id, typ.project_id.type_ids or [])
|
||||
for task in self.browse(cr, uid, ids):
|
||||
typeid = task.type_id.id
|
||||
types = map(lambda x:x.id, task.project_id.type_ids or [])
|
||||
if types:
|
||||
if not typeid:
|
||||
self.write(cr, uid, typ.id, {'type': types[0]})
|
||||
self.write(cr, uid, task.id, {'type_id': types[0]})
|
||||
elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
|
||||
index = types.index(typeid)
|
||||
self.write(cr, uid, typ.id, {'type': types[index+1]})
|
||||
self.write(cr, uid, task.id, {'type_id': types[index+1]})
|
||||
return True
|
||||
|
||||
def prev_type(self, cr, uid, ids, *args):
|
||||
for typ in self.browse(cr, uid, ids):
|
||||
typeid = typ.type.id
|
||||
types = map(lambda x:x.id, typ.project_id.type_ids)
|
||||
for task in self.browse(cr, uid, ids):
|
||||
typeid = task.type_id.id
|
||||
types = map(lambda x:x.id, task.project_id.type_ids)
|
||||
if types:
|
||||
if typeid and typeid in types:
|
||||
index = types.index(typeid)
|
||||
self.write(cr, uid, typ.id, {'type': index and types[index-1] or False})
|
||||
self.write(cr, uid, task.id, {'type_id': index and types[index-1] or False})
|
||||
return True
|
||||
|
||||
task()
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
<field name="partner_id"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company" widget="selection"/>
|
||||
<group col="4" colspan="2">
|
||||
<field name="type" widget="selection" readonly="1"/>
|
||||
<field name="type_id" widget="selection" readonly="1"/>
|
||||
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
|
||||
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
|
||||
</group>
|
||||
|
@ -354,7 +354,7 @@
|
|||
icon="gtk-go-forward"
|
||||
groups="base.group_extended"
|
||||
help="Change Type"/>
|
||||
<field name="type" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
|
||||
<field name="type_id" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
|
||||
<field name="date_start" invisible="1"/>
|
||||
<field name="date_end" invisible="1"/>
|
||||
<field name="progress" widget="progressbar" invisible="context.get('set_visible',False)"/>
|
||||
|
@ -441,7 +441,7 @@
|
|||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Users" name="group_user_id" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Project" name="group_project_id" icon="terp-folder-blue" domain="[]" context="{'group_by':'project_id'}"/>
|
||||
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Stage" name="group_stage_id" icon="terp-stage" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string="State" name="group_state" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Deadline" icon="terp-gnome-cpu-frequency-applet+" domain="[]" context="{'group_by':'date_deadline'}"/>
|
||||
|
@ -659,4 +659,4 @@
|
|||
<act_window domain="[('project_id', '=', active_id)]" id="act_project_messages" name="Messages" res_model="project.message" src_model="project.project"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
|
|
@ -83,7 +83,7 @@ class report_project_task_user(osv.osv):
|
|||
t.name as name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.type,
|
||||
t.type_id,
|
||||
remaining_hours as remaining_hours,
|
||||
total_hours as total_hours,
|
||||
t.delay_hours as hours_delay,
|
||||
|
@ -115,7 +115,7 @@ class report_project_task_user(osv.osv):
|
|||
name,
|
||||
t.company_id,
|
||||
t.partner_id,
|
||||
t.type
|
||||
t.type_id
|
||||
|
||||
""")
|
||||
|
||||
|
|
|
@ -39,18 +39,18 @@
|
|||
<field name="name">Long Term</field>
|
||||
<field name="icon">terp-project</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="project.project_task_116" model="project.task">
|
||||
<field name="planned_hours">38.0</field>
|
||||
<field name="remaining_hours">38.0</field>
|
||||
<field name="timebox_id" ref="timebox_daily"/>
|
||||
<field name="context_id" ref="context_office"/>
|
||||
<field name="type" ref="project.project_tt_development"/>
|
||||
<field name="type_id" ref="project.project_tt_development"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field name="name">Specific adaptation to MRP</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="project.project_task_201" model="project.task">
|
||||
<field name="sequence">40</field>
|
||||
<field name="planned_hours">32.0</field>
|
||||
|
@ -71,19 +71,19 @@
|
|||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field name="name">Validation + latest modifications.</field>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
|
||||
<record id="project.project_task_116" model="project.task">
|
||||
<field name="planned_hours">38.0</field>
|
||||
<field name="remaining_hours">38.0</field>
|
||||
<field name="timebox_id" ref="timebox_daily"/>
|
||||
<field name="context_id" ref="context_office"/>
|
||||
<field name="type" ref="project.project_tt_development"/>
|
||||
<field name="type_id" ref="project.project_tt_development"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field name="name">Specific adaptation to MRP</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="project.project_task_201" model="project.task">
|
||||
<field name="sequence">40</field>
|
||||
<field name="planned_hours">32.0</field>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="project_id" ref="project.project_project_22"/>
|
||||
<field name="name">Validation + latest modifications.</field>
|
||||
</record>
|
||||
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
|
@ -15,11 +15,11 @@
|
|||
# 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 scrum
|
||||
import project_scrum
|
||||
import report
|
||||
import wizard
|
||||
|
|
@ -51,15 +51,15 @@
|
|||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'security/ir.model.access.csv',
|
||||
'scrum_report.xml',
|
||||
'wizard/scrum_backlog_create_task_view.xml',
|
||||
'scrum_view.xml',
|
||||
'process/scrum_process.xml',
|
||||
'wizard/scrum_backlog_sprint_view.xml',
|
||||
'wizard/scrum_backlog_merger_view.xml',
|
||||
"board_scrum_view.xml",
|
||||
'project_scrum_report.xml',
|
||||
'wizard/project_scrum_backlog_create_task_view.xml',
|
||||
'project_scrum_view.xml',
|
||||
'process/project_scrum_process.xml',
|
||||
'wizard/project_scrum_backlog_sprint_view.xml',
|
||||
'wizard/project_scrum_backlog_merger_view.xml',
|
||||
"board_project_scrum_view.xml",
|
||||
],
|
||||
'demo_xml': ['scrum_demo.xml'],
|
||||
'demo_xml': ['project_scrum_demo.xml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0084121063261',
|
|
@ -2,8 +2,8 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<record id="view_scrum_sprint_dashboard_tree" model="ir.ui.view">
|
||||
<field name="name">scrum.sprint.dashboard.tree</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="name">project.scrum.sprint.dashboard.tree</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Scrum Sprint">
|
||||
|
@ -14,21 +14,21 @@
|
|||
<field name="date_start"/>
|
||||
<field name="progress" widget="progressbar"/>
|
||||
<field name="effective_hours" sum="Effective hours" widget="float_time"/>
|
||||
<field name="planned_hours" sum="Planned hours" widget="float_time"/>
|
||||
<!-- field name="planned_hours" sum="Planned hours" widget="float_time"/> -->
|
||||
<field name="expected_hours" sum="Expected hours" widget="float_time"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Pending" name="button_pending" states="open" icon="gtk-media-pause"/>
|
||||
<button type="object" string="Close" name="button_close" states="open,pending" icon="gtk-jump-to"/>
|
||||
<button type="object" string="Set to Draft" name="button_draft" states="cancel,done" icon="gtk-convert"/>
|
||||
<button name="%(scrum.report_scrum_sprint_burndown_chart)d" states="open,draft,close,cancel"
|
||||
<button name="%(project_scrum.report_scrum_sprint_burndown_chart)d" states="open,draft,close,cancel"
|
||||
string="Burndown Chart" type="action" icon="gtk-print"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_sprint_all_dashboard_tree" model="ir.actions.act_window">
|
||||
<field name="name">Sprint's List</field>
|
||||
<field name="res_model">scrum.sprint</field>
|
||||
<field name="res_model">project.scrum.sprint</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_scrum_sprint_dashboard_tree"/>
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--
|
||||
|
||||
<!--
|
||||
Process Node
|
||||
-->
|
||||
|
||||
|
||||
<record id="process_node_productbacklog0" model="process.node">
|
||||
<field name="menu_id" ref="scrum.menu_action_product_backlog_form"/>
|
||||
<field name="model_id" ref="scrum.model_scrum_product_backlog"/>
|
||||
<field name="menu_id" ref="menu_action_product_backlog_form"/>
|
||||
<field name="model_id" ref="model_project_scrum_product_backlog"/>
|
||||
<field eval=""""state"""" name="kind"/>
|
||||
<field eval=""""Product backlog"""" name="name"/>
|
||||
<field eval=""""Create task from backlogs"""" name="note"/>
|
||||
|
@ -16,11 +16,11 @@
|
|||
<field eval=""""object.state=='draft'"""" name="model_states"/>
|
||||
<field eval="1" name="flow_start"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
|
||||
<!--
|
||||
Process Transition
|
||||
-->
|
||||
|
||||
|
||||
<record id="process_transition_backlogtask0" model="process.transition">
|
||||
<field eval="[(6,0,[])]" name="role_ids"/>
|
||||
<field eval="[(6,0,[])]" name="transition_ids"/>
|
||||
|
@ -29,6 +29,6 @@
|
|||
<field model="process.node" name="target_node_id" ref="project.process_node_drafttask0"/>
|
||||
<field model="process.node" name="source_node_id" ref="process_node_productbacklog0"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
|
@ -27,7 +27,7 @@ import re
|
|||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
class scrum_project(osv.osv):
|
||||
class project_scrum_project(osv.osv):
|
||||
_inherit = 'project.project'
|
||||
_columns = {
|
||||
'product_owner_id': fields.many2one('res.users', 'Product Owner', help="The person who is responsible for the product"),
|
||||
|
@ -39,11 +39,11 @@ class scrum_project(osv.osv):
|
|||
'sprint_size': 15,
|
||||
'scrum': 1
|
||||
}
|
||||
scrum_project()
|
||||
project_scrum_project()
|
||||
|
||||
class scrum_sprint(osv.osv):
|
||||
_name = 'scrum.sprint'
|
||||
_description = 'Scrum Sprint'
|
||||
class project_scrum_sprint(osv.osv):
|
||||
_name = 'project.scrum.sprint'
|
||||
_description = 'Project Scrum Sprint'
|
||||
|
||||
def _calc_progress(self, cr, uid, ids, name, args, context):
|
||||
res = {}
|
||||
|
@ -115,10 +115,10 @@ class scrum_sprint(osv.osv):
|
|||
'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 Master', required=True,help="The person who is maintains the processes for the product"),
|
||||
'meeting_ids': fields.one2many('scrum.meeting', 'sprint_id', 'Daily Scrum'),
|
||||
'meeting_ids': fields.one2many('project.scrum.meeting', 'sprint_id', 'Daily Scrum'),
|
||||
'review': fields.text('Sprint Review'),
|
||||
'retrospective': fields.text('Sprint Retrospective'),
|
||||
'backlog_ids': fields.one2many('scrum.product.backlog', 'sprint_id', 'Sprint Backlog'),
|
||||
'backlog_ids': fields.one2many('project.scrum.product.backlog', 'sprint_id', 'Sprint Backlog'),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress (0-100)', help="Computed as: Time Spent / Total Time."),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Effective hours', help="Computed using the sum of the task work done."),
|
||||
'expected_hours': fields.function(_calc_expected, method=True, string='Planned Hours', help='Estimated time to do the task.'),
|
||||
|
@ -153,10 +153,10 @@ class scrum_sprint(osv.osv):
|
|||
v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
|
||||
return {'value':v}
|
||||
|
||||
scrum_sprint()
|
||||
project_scrum_sprint()
|
||||
|
||||
class scrum_product_backlog(osv.osv):
|
||||
_name = 'scrum.product.backlog'
|
||||
class project_scrum_product_backlog(osv.osv):
|
||||
_name = 'project.scrum.product.backlog'
|
||||
_description = 'Product Backlog'
|
||||
|
||||
def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
|
||||
|
@ -200,9 +200,10 @@ class scrum_product_backlog(osv.osv):
|
|||
return res
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
obj_project_task = self.pool.get('project.task')
|
||||
self.write(cr, uid, ids, {'state':'cancel'}, context=context)
|
||||
for backlog in self.browse(cr, uid, ids, context=context):
|
||||
self.pool.get('project.task').write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'cancelled'})
|
||||
obj_project_task.write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'cancelled'})
|
||||
return True
|
||||
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
|
@ -217,9 +218,10 @@ class scrum_product_backlog(osv.osv):
|
|||
return True
|
||||
|
||||
def button_close(self, cr, uid, ids, context={}):
|
||||
obj_project_task = self.pool.get('project.task')
|
||||
self.write(cr, uid, ids, {'state':'done'}, context=context)
|
||||
for backlog in self.browse(cr, uid, ids, context=context):
|
||||
self.pool.get('project.task').write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'done'})
|
||||
obj_project_task.write(cr, uid, [i.id for i in backlog.tasks_id], {'state': 'done'})
|
||||
message = _('Product Backlog ') + " '" + backlog.name + "' "+ _("is Closed.")
|
||||
self.log(cr, uid, backlog.id, message)
|
||||
return True
|
||||
|
@ -249,7 +251,7 @@ class scrum_product_backlog(osv.osv):
|
|||
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
|
||||
'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."),
|
||||
'user_id': fields.many2one('res.users', 'Author'),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint'),
|
||||
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
|
||||
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
|
||||
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
|
||||
|
@ -265,42 +267,42 @@ class scrum_product_backlog(osv.osv):
|
|||
'user_id': lambda self, cr, uid, context: uid,
|
||||
}
|
||||
_order = "sequence"
|
||||
scrum_product_backlog()
|
||||
project_scrum_product_backlog()
|
||||
|
||||
class scrum_task(osv.osv):
|
||||
class project_scrum_task(osv.osv):
|
||||
_name = 'project.task'
|
||||
_inherit = 'project.task'
|
||||
|
||||
def _get_task(self, cr, uid, ids, context={}):
|
||||
result = {}
|
||||
for line in self.pool.get('scrum.product.backlog').browse(cr, uid, ids, context=context):
|
||||
for line in self.pool.get('project.scrum.product.backlog').browse(cr, uid, ids, context=context):
|
||||
for task in line.tasks_id:
|
||||
result[task.id] = True
|
||||
return result.keys()
|
||||
_columns = {
|
||||
'product_backlog_id': fields.many2one('scrum.product.backlog', 'Product Backlog',help="Related product backlog that contains this task. Used in SCRUM methodology"),
|
||||
'sprint_id': fields.related('product_backlog_id','sprint_id', type='many2one', relation='scrum.sprint', string='Sprint',
|
||||
'product_backlog_id': fields.many2one('project.scrum.product.backlog', 'Product Backlog',help="Related product backlog that contains this task. Used in SCRUM methodology"),
|
||||
'sprint_id': fields.related('product_backlog_id','sprint_id', type='many2one', relation='project.scrum.sprint', string='Sprint',
|
||||
store={
|
||||
'project.task': (lambda self, cr, uid, ids, c={}: ids, ['product_backlog_id'], 10),
|
||||
'scrum.product.backlog': (_get_task, ['sprint_id'], 10)
|
||||
'project.scrum.product.backlog': (_get_task, ['sprint_id'], 10)
|
||||
}),
|
||||
}
|
||||
|
||||
def onchange_backlog_id(self, cr, uid, backlog_id):
|
||||
if not backlog_id:
|
||||
return {}
|
||||
project_id = self.pool.get('scrum.product.backlog').browse(cr, uid, backlog_id).project_id.id
|
||||
project_id = self.pool.get('project.scrum.product.backlog').browse(cr, uid, backlog_id).project_id.id
|
||||
return {'value': {'project_id': project_id}}
|
||||
scrum_task()
|
||||
project_scrum_task()
|
||||
|
||||
class scrum_meeting(osv.osv):
|
||||
_name = 'scrum.meeting'
|
||||
class project_scrum_meeting(osv.osv):
|
||||
_name = 'project.scrum.meeting'
|
||||
_description = 'Scrum Meeting'
|
||||
_order = 'date desc'
|
||||
_columns = {
|
||||
'name' : fields.char('Meeting Name', size=64),
|
||||
'date': fields.date('Meeting Date', required=True),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint', required=True),
|
||||
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint', required=True),
|
||||
'project_id': fields.many2one('project.project', 'Project'),
|
||||
'question_yesterday': fields.text('Tasks since yesterday'),
|
||||
'question_today': fields.text('Tasks for today'),
|
||||
|
@ -357,5 +359,5 @@ class scrum_meeting(osv.osv):
|
|||
return False
|
||||
return True
|
||||
|
||||
scrum_meeting()
|
||||
project_scrum_meeting()
|
||||
|
|
@ -13,9 +13,9 @@
|
|||
<field model="res.users" name="product_owner_id" search="[('login','=','demo')]"/>
|
||||
</record>
|
||||
|
||||
<!-- Resource: scrum.sprint -->
|
||||
<!-- Resource: project_scrum.sprint -->
|
||||
|
||||
<record id="scrum_sprint_0" model="scrum.sprint">
|
||||
<record id="scrum_sprint_0" model="project.scrum.sprint">
|
||||
<field name="date_stop">2005-12-20</field>
|
||||
<field name="name">Sprint for V3.2.0</field>
|
||||
<field model="res.users" name="scrum_master_id" search="[('login','=','demo')]"/>
|
||||
|
@ -26,7 +26,7 @@
|
|||
|
||||
<!-- Resource: project.product.backlog -->
|
||||
|
||||
<record id="scrum_product_backlog_0" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_0" model="project.scrum.product.backlog">
|
||||
<field name="priority">3</field>
|
||||
<field name="name">Automatic migration system</field>
|
||||
<field name="expected_hours">6.0</field>
|
||||
|
@ -35,54 +35,54 @@
|
|||
<field name="state">done</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_1" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_1" model="project.scrum.product.backlog">
|
||||
<field name="priority">3</field>
|
||||
<field name="name">New accounting module</field>
|
||||
<field name="expected_hours">111.0</field>
|
||||
<field name="note">The accounting module of Open ERP (financial accounting and management accounting) is being reshaped. New functionnalities will be added: intangible assets, a new way of presenting ledgers and bookings, new stock valuation calculation, and lots of predefined reports. </field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_2" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_2" model="project.scrum.product.backlog">
|
||||
<field name="priority">3</field>
|
||||
<field name="name">Automated Plugin System to install/uninstall modules</field>
|
||||
<field name="expected_hours">4.0</field>
|
||||
<field name="note">We have to develop a plug-in system which will enable to install/remove modules. The basic version of Open ERP will include only the required minimum, and you will select the modules thanks to the plug-in manager. This allows you to limit your system to your real needs: quality management, localisations, project and service management, marketing campaigns, and so on... </field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_3" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_3" model="project.scrum.product.backlog">
|
||||
<field name="name">Review all terms</field>
|
||||
<field name="expected_hours">8.0</field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="state">done</field>
|
||||
<field name="state">done</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_4" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_4" model="project.scrum.product.backlog">
|
||||
<field name="name">Bugfixes</field>
|
||||
<field name="expected_hours">6.0</field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_5" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_5" model="project.scrum.product.backlog">
|
||||
<field name="name">Test for 3.2.0 Publishing</field>
|
||||
<field name="expected_hours">5.0</field>
|
||||
<field name="note">Test Open ERP to release stable 3.2.0 version. (may be 3.2.0-pre1 ?)</field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_6" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_6" model="project.scrum.product.backlog">
|
||||
<field name="name">Reshape the complete menu</field>
|
||||
<field name="expected_hours">4.0</field>
|
||||
<field name="note">Restructure the Open ERP menu to be more like others ERP.</field>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
</record>
|
||||
<record id="scrum_product_backlog_7" model="scrum.product.backlog">
|
||||
<record id="scrum_product_backlog_7" model="project.scrum.product.backlog">
|
||||
<field name="name">Editable Trees</field>
|
||||
<field name="expected_hours">12.0</field>
|
||||
<field name="note">Editable trees in list and one2many_list widgets.</field>
|
||||
|
@ -98,7 +98,7 @@
|
|||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Review all English Terms</field>
|
||||
<field name="state">done</field>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
|
||||
</record>
|
||||
<record id="scrum_task_4" model="project.task">
|
||||
|
@ -107,7 +107,7 @@
|
|||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Review all french terms</field>
|
||||
<field name="state">done</field>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_3"/>
|
||||
</record>
|
||||
<record id="scrum_task_5" model="project.task">
|
||||
|
@ -116,7 +116,7 @@
|
|||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Analytic Accounting features</field>
|
||||
<field name="state">done</field>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_6" model="project.task">
|
||||
|
@ -149,7 +149,7 @@
|
|||
<field name="description">Cash book, general ledger, accounts list, aged trial balance</field>
|
||||
<field name="name">Accounting Report General</field>
|
||||
<field name="state">open</field>
|
||||
<field eval="[(6,0,[ref('scrum.scrum_task_8')])]" name="child_ids"/>
|
||||
<field eval="[(6,0,[ref('scrum_task_8')])]" name="child_ids"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_10" model="project.task">
|
||||
|
@ -164,7 +164,7 @@
|
|||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Accounting Report Analytic</field>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_1"/>
|
||||
</record>
|
||||
<record id="scrum_task_12" model="project.task">
|
||||
|
@ -173,7 +173,7 @@
|
|||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Bugfix - memory leak</field>
|
||||
<field name="state">done</field>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date_close"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
|
||||
</record>
|
||||
<record id="scrum_task_13" model="project.task">
|
||||
|
@ -181,8 +181,8 @@
|
|||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Bugfix - Translations</field>
|
||||
<field name="state">open</field>
|
||||
<field eval="[(6,0,[ref('scrum.scrum_task_12')])]" name="child_ids"/>
|
||||
<field name="state">open</field>
|
||||
<field eval="[(6,0,[ref('scrum_task_12')])]" name="child_ids"/>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_4"/>
|
||||
</record>
|
||||
<record id="scrum_task_14" model="project.task">
|
||||
|
@ -205,7 +205,7 @@
|
|||
<field model="res.users" name="user_id" search="[('login','=','demo')]"/>
|
||||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="name">Test 3.2.0 before releasing</field>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_5"/>
|
||||
</record>
|
||||
<record id="scrum_task_17" model="project.task">
|
||||
|
@ -214,10 +214,10 @@
|
|||
<field name="project_id" ref="scrum_project_1"/>
|
||||
<field name="description">default values, onchange, required, add on top or bottom and shortcuts (Ctrl S, Ctrl X, ...)</field>
|
||||
<field name="name">Editable trees</field>
|
||||
<field name="state">open</field>
|
||||
<field name="state">open</field>
|
||||
<field name="product_backlog_id" ref="scrum_product_backlog_7"/>
|
||||
</record>
|
||||
<record id="scrum_meeting_0" model="scrum.meeting">
|
||||
<record id="scrum_meeting_0" model="project.scrum.meeting">
|
||||
<field name="question_yesterday">
|
||||
Admin: Worked on the Automatic migration system
|
||||
Demo: Worked on the Test 3.2.0 before releasing
|
||||
|
@ -228,7 +228,7 @@ Demo: Work on Editable trees</field>
|
|||
<field name="question_blocks">
|
||||
Demo :Bugfix - memory leak
|
||||
</field>
|
||||
<field name="sprint_id" ref="scrum.scrum_sprint_0"/>
|
||||
<field name="sprint_id" ref="scrum_sprint_0"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
|
||||
</record>
|
||||
<record id="project_task_work_scrum_task1" model="project.task.work">
|
||||
|
@ -247,7 +247,7 @@ Demo :Bugfix - memory leak
|
|||
<field eval="5.0" name="hours"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="project_task_work_scrum_task2" model="project.task.work">
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="name">Create a script for migration and testing</field>
|
||||
|
@ -264,6 +264,6 @@ Demo :Bugfix - memory leak
|
|||
<field eval="10.0" name="hours"/>
|
||||
<field eval="time.strftime('%Y-%m-%d')" name="date"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<report auto="False" id="report_scrum_sprint_burndown_chart" model="scrum.sprint" name="scrum.sprint.burndown" string="Burndown Chart"/>
|
||||
<report auto="False" id="report_scrum_sprint_burndown_chart" model="project.scrum.sprint" name="scrum.sprint.burndown" string="Burndown Chart"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -29,8 +29,8 @@
|
|||
-->
|
||||
|
||||
<record id="view_scrum_product_backlog_tree" model="ir.ui.view">
|
||||
<field name="name">scrum.product.backlog.tree</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="name">project.scrum.product.backlog.tree</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="grey:state in ('cancel','done');blue:state in ('pending')" string="Product Backlog">
|
||||
|
@ -52,8 +52,8 @@
|
|||
</record>
|
||||
|
||||
<record id="view_scrum_product_backlog_form" model="ir.ui.view">
|
||||
<field name="name">scrum.product.backlog.form</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="name">project.scrum.product.backlog.form</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Product backlog">
|
||||
|
@ -124,8 +124,8 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_scrum_product_backlog_search">
|
||||
<field name="name">scrum.product.backlog.search</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="name">project.scrum.product.backlog.search</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Product Backlogs">
|
||||
|
@ -177,7 +177,7 @@
|
|||
|
||||
<record id="action_product_backlog_form" model="ir.actions.act_window">
|
||||
<field name="name">Product Backlogs</field>
|
||||
<field name="res_model">scrum.product.backlog</field>
|
||||
<field name="res_model">project.scrum.product.backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{'search_default_current': 1}</field>
|
||||
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
|
||||
|
@ -193,8 +193,8 @@
|
|||
-->
|
||||
|
||||
<record id="view_scrum_sprint_tree" model="ir.ui.view">
|
||||
<field name="name">scrum.sprint.tree</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="name">project.scrum.sprint.tree</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state in ('pending');grey:state in ('cancel','done')" string="Scrum Sprint">
|
||||
|
@ -215,8 +215,8 @@
|
|||
</field>
|
||||
</record>
|
||||
<record id="view_scrum_sprint_form" model="ir.ui.view">
|
||||
<field name="name">scrum.sprint.form</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="name">project.scrum.sprint.form</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Scrum Sprint">
|
||||
|
@ -265,8 +265,8 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_scrum_sprint_search">
|
||||
<field name="name">scrum.sprint.search</field>
|
||||
<field name="model">scrum.sprint</field>
|
||||
<field name="name">project.scrum.sprint.search</field>
|
||||
<field name="model">project.scrum.sprint</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Sprints">
|
||||
|
@ -296,7 +296,7 @@
|
|||
|
||||
<record id="action_sprint_all_tree" model="ir.actions.act_window">
|
||||
<field name="name">Sprints</field>
|
||||
<field name="res_model">scrum.sprint</field>
|
||||
<field name="res_model">project.scrum.sprint</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_scrum_sprint_tree"/>
|
||||
|
@ -312,8 +312,8 @@
|
|||
-->
|
||||
|
||||
<record id="view_scrum_meeting_tree" model="ir.ui.view">
|
||||
<field name="name">scrum.meeting.tree</field>
|
||||
<field name="model">scrum.meeting</field>
|
||||
<field name="name">project.scrum.meeting.tree</field>
|
||||
<field name="model">project.scrum.meeting</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Scrum Sprint">
|
||||
|
@ -324,7 +324,7 @@
|
|||
</record>
|
||||
<record id="view_scrum_meeting_form" model="ir.ui.view">
|
||||
<field name="name">Scrum Meeting</field>
|
||||
<field name="model">scrum.meeting</field>
|
||||
<field name="model">project.scrum.meeting</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Scrum Sprint">
|
||||
|
@ -358,8 +358,8 @@
|
|||
</record>
|
||||
|
||||
<record id="view_scrum_meeting_search" model="ir.ui.view">
|
||||
<field name="name">scrum.meeting.search</field>
|
||||
<field name="model">scrum.meeting</field>
|
||||
<field name="name">project_scrum.meeting.search</field>
|
||||
<field name="model">project.scrum.meeting</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Scrum Sprint">
|
||||
|
@ -383,7 +383,7 @@
|
|||
|
||||
<record id="action_meeting_form" model="ir.actions.act_window">
|
||||
<field name="name">Scrum Meetings</field>
|
||||
<field name="res_model">scrum.meeting</field>
|
||||
<field name="res_model">project.scrum.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_scrum_daily':1}</field>
|
||||
|
@ -405,14 +405,14 @@
|
|||
</record>
|
||||
<record id="ir_scrum_sprint_open_task" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'scrum.sprint'" name="model"/>
|
||||
<field eval="'project.scrum.sprint'" name="model"/>
|
||||
<field name="name">View sprint tasks</field>
|
||||
<field eval="'ir.actions.act_window,'+str(action_sprint_task_open)" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
</record>
|
||||
|
||||
<record id="action_sprint_backlog_open" model="ir.actions.act_window">
|
||||
<field name="res_model">scrum.product.backlog</field>
|
||||
<field name="res_model">project.scrum.product.backlog</field>
|
||||
<field name="name">View sprint backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -420,7 +420,7 @@
|
|||
</record>
|
||||
<record id="ir_scrum_sprint_open_sprint" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'scrum.sprint'" name="model"/>
|
||||
<field eval="'project.scrum.sprint'" name="model"/>
|
||||
<field name="name">View sprint backlog</field>
|
||||
<field eval="'ir.actions.act_window,'+str(action_sprint_backlog_open)" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
|
@ -431,7 +431,7 @@
|
|||
-->
|
||||
|
||||
<record id="dblc_proj" model="ir.actions.act_window">
|
||||
<field name="res_model">scrum.product.backlog</field>
|
||||
<field name="res_model">project.scrum.product.backlog</field>
|
||||
<field name="name">View project's backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
|
@ -439,7 +439,7 @@
|
|||
</record>
|
||||
<record id="ir_scrum_project_backlog" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'scrum.project'" name="model"/>
|
||||
<field eval="'project.scrum.project'" name="model"/>
|
||||
<field name="name">View project's backlog</field>
|
||||
<field eval="'ir.actions.act_window,'+str(dblc_proj)" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
|
@ -453,7 +453,7 @@
|
|||
</record>
|
||||
<record id="ir_scrum_project_task" model="ir.values">
|
||||
<field eval=" 'tree_but_open'" name="key2"/>
|
||||
<field eval="'scrum.project'" name="model"/>
|
||||
<field eval="'project.scrum.project'" name="model"/>
|
||||
<field name="name">View project's tasks</field>
|
||||
<field eval="'ir.actions.act_window,'+str(dblc_proj2)" name="value"/>
|
||||
<field eval="True" name="object"/>
|
||||
|
@ -509,6 +509,7 @@
|
|||
<field name="project_id" position="after">
|
||||
<field name="sprint_id" context="{'sprint_invisible':False}">
|
||||
<filter icon="terp-check" string="Current" context="{'sprint_invisible':False}" domain="[('sprint_id.state','in',('draft','open'))]" help="Current Sprints"/>
|
||||
<filter icon="terp-check" string="Current" context="{'sprint_invisible':False}" domain="[]" help="View Sprints"/>
|
||||
</field>
|
||||
</field>
|
||||
</field>
|
||||
|
@ -532,8 +533,8 @@
|
|||
domain="[('sprint_id', '=', active_id)]"
|
||||
id="act_scrum_sprint_2_product_backlog"
|
||||
name="Backlogs"
|
||||
res_model="scrum.product.backlog"
|
||||
src_model="scrum.sprint"
|
||||
res_model="project.scrum.product.backlog"
|
||||
src_model="project.scrum.sprint"
|
||||
view_mode="tree,form"
|
||||
view_type="form"/>
|
||||
|
||||
|
@ -542,7 +543,7 @@
|
|||
id="act_scrum_sprint_2_project_task"
|
||||
name="Tasks"
|
||||
res_model="project.task"
|
||||
src_model="scrum.sprint"
|
||||
src_model="project.scrum.sprint"
|
||||
view_mode="tree,form"
|
||||
view_type="form"/>
|
||||
|
|
@ -48,9 +48,9 @@ class report_tasks(report_int):
|
|||
canv = canvas.init(fname=io, format='pdf')
|
||||
canv.set_author("Open ERP")
|
||||
|
||||
cr.execute('select id,date_start,date_stop from scrum_sprint where id=%s', (datas['id'],))
|
||||
cr.execute('select id,date_start,date_stop from project_scrum_sprint where id=%s', (datas['id'],))
|
||||
for (id,date_start,date_stop) in cr.fetchall():
|
||||
cr.execute('select id from project_task where product_backlog_id in(select id from scrum_product_backlog where sprint_id=%s)', (id,))
|
||||
cr.execute('select id from project_task where product_backlog_id in(select id from project_scrum_product_backlog where sprint_id=%s)', (id,))
|
||||
|
||||
ids = map(lambda x: x[0], cr.fetchall())
|
||||
datas = _burndown.compute_burndown(cr, uid, ids, date_start, date_stop)
|
|
@ -0,0 +1,9 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_scrum_sprint","project_scrum.sprint","model_project_scrum_sprint","project.group_project_user",1,0,0,0
|
||||
"access_scrum_product_backlog","project_scrum.product.backlog","model_project_scrum_product_backlog","project.group_project_user",1,1,1,1
|
||||
"access_scrum_meeting","project_scrum.meeting","model_project_scrum_meeting","project.group_project_user",1,0,0,0
|
||||
"access_scrum_meeting_manager","project_scrum.meeting.manager","model_project_scrum_meeting","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_sprint_manager","project_scrum.sprint.manager","model_project_scrum_sprint","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_product_backlog_manager","project_scrum.product.backlog manager","model_project_scrum_product_backlog","project.group_project_manager",1,1,1,1
|
||||
"access_product_uom_project_manager","product.uom project manager","product.model_product_uom","project.group_project_manager",1,1,1,1
|
||||
"access_product_uom_project_user","product.uom project user","product.model_product_uom","project.group_project_user",1,0,0,0
|
|
|
@ -19,9 +19,9 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
import scrum_backlog_create_task
|
||||
import scrum_backlog_sprint
|
||||
import scrum_backlog_merger
|
||||
import project_scrum_backlog_create_task
|
||||
import project_scrum_backlog_sprint
|
||||
import project_scrum_backlog_merger
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
from osv import osv, fields
|
||||
|
||||
class backlog_create_task(osv.osv_memory):
|
||||
_name = 'backlog.create.task'
|
||||
_name = 'project.scrum.backlog.create.task'
|
||||
_description = 'Create Tasks from Product Backlogs'
|
||||
_columns = {
|
||||
'user_id': fields.many2one('res.users', 'Assign To')
|
||||
|
@ -30,7 +30,7 @@ class backlog_create_task(osv.osv_memory):
|
|||
def do_create(self, cr, uid, ids, context=None):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
task = self.pool.get('project.task')
|
||||
backlog_id = self.pool.get('scrum.product.backlog')
|
||||
backlog_id = self.pool.get('project.scrum.product.backlog')
|
||||
ids_task = []
|
||||
|
||||
if context is None:
|
|
@ -3,8 +3,8 @@
|
|||
<data>
|
||||
|
||||
<record id="view_scrum_backlog_to_task" model="ir.ui.view">
|
||||
<field name="name">backlog.create.task.form</field>
|
||||
<field name="model">backlog.create.task</field>
|
||||
<field name="name">project.scrum.backlog.create.task.form</field>
|
||||
<field name="model">project.scrum.backlog.create.task</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create Tasks">
|
||||
|
@ -23,21 +23,21 @@
|
|||
<record id="action_scrum_backlog_to_task" model="ir.actions.act_window">
|
||||
<field name="name">Create Tasks</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">backlog.create.task</field>
|
||||
<field name="res_model">project.scrum.backlog.create.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="scrum_backlog_to_task_values">
|
||||
<field name="model_id" ref="model_scrum_product_backlog" />
|
||||
<field name="model_id" ref="model_project_scrum_product_backlog" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Create Tasks</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_to_task'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
|
@ -21,15 +21,15 @@
|
|||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class scrum_backlog_merge(osv.osv_memory):
|
||||
_name = 'scrum.backlog.merge'
|
||||
class project_scrum_backlog_merge(osv.osv_memory):
|
||||
_name = 'project.scrum.backlog.merge'
|
||||
_description = 'Merge Product Backlogs'
|
||||
_columns = {
|
||||
'project_id': fields.many2one('project.project', 'Project', help="Select project for the new product backlog"),
|
||||
}
|
||||
|
||||
def check_backlogs(self, cr, uid, ids, context=None):
|
||||
backlog_obj = self.pool.get('scrum.product.backlog')
|
||||
backlog_obj = self.pool.get('project.scrum.product.backlog')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
p_list = []
|
||||
if context is None:
|
||||
|
@ -50,7 +50,7 @@ class scrum_backlog_merge(osv.osv_memory):
|
|||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'scrum.backlog.merge',
|
||||
'res_model': 'project.scrum.backlog.merge',
|
||||
'views': [(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
|
@ -58,7 +58,7 @@ class scrum_backlog_merge(osv.osv_memory):
|
|||
return self.do_merge(cr, uid, ids, context=context)
|
||||
|
||||
def do_merge(self, cr, uid, ids, context=None):
|
||||
backlog_obj = self.pool.get('scrum.product.backlog')
|
||||
backlog_obj = self.pool.get('project.scrum.product.backlog')
|
||||
task_obj = self.pool.get('project.task')
|
||||
task_lines = []
|
||||
new_exp_hour = []
|
||||
|
@ -99,5 +99,5 @@ class scrum_backlog_merge(osv.osv_memory):
|
|||
backlog_obj.unlink(cr, uid, context['active_ids'], context=context)
|
||||
return {}
|
||||
|
||||
scrum_backlog_merge()
|
||||
project_scrum_backlog_merge()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -3,7 +3,7 @@
|
|||
<data>
|
||||
<record id="scrum_backlog_merge_view" model="ir.ui.view">
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="model">scrum.backlog.merge</field>
|
||||
<field name="model">project.scrum.backlog.merge</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Merge Backlogs">
|
||||
|
@ -19,7 +19,7 @@
|
|||
<record id="action_scrum_backlog_merge" model="ir.actions.act_window">
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">scrum.backlog.merge</field>
|
||||
<field name="res_model">project.scrum.backlog.merge</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
|
@ -27,18 +27,18 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.values" id="scrum_backlog_merge_values">
|
||||
<field name="model_id" ref="model_scrum_product_backlog" />
|
||||
<field name="model_id" ref="model_project_scrum_product_backlog" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_merge'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
</record>
|
||||
|
||||
<record id="scrum_merge_project_id_view" model="ir.ui.view">
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="model">scrum.backlog.merge</field>
|
||||
<field name="model">project.scrum.backlog.merge</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Merge Backlogs">
|
|
@ -22,10 +22,10 @@ from osv import osv, fields
|
|||
from tools.translate import _
|
||||
|
||||
class backlog_sprint_assign(osv.osv_memory):
|
||||
_name = 'backlog.assign.sprint'
|
||||
_name = 'project.scrum.backlog.assign.sprint'
|
||||
_description = 'Assign sprint to backlogs'
|
||||
_columns = {
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint Name', required=True),
|
||||
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint Name', required=True),
|
||||
'state_open': fields.boolean('Set Open', help="Change the state of product backlogs to open if its in draft state"),
|
||||
'convert_to_task': fields.boolean('Convert To Task', help="Create Task for Product Backlog")
|
||||
}
|
||||
|
@ -35,8 +35,8 @@ class backlog_sprint_assign(osv.osv_memory):
|
|||
}
|
||||
|
||||
def assign_sprint(self, cr, uid, ids, context=None):
|
||||
backlog_obj = self.pool.get('scrum.product.backlog')
|
||||
sprint_obj = self.pool.get('scrum.sprint')
|
||||
backlog_obj = self.pool.get('project.scrum.product.backlog')
|
||||
sprint_obj = self.pool.get('project.scrum.sprint')
|
||||
task = self.pool.get('project.task')
|
||||
backlog_ids = []
|
||||
if context is None:
|
|
@ -3,8 +3,8 @@
|
|||
<data>
|
||||
|
||||
<record id="view_scrum_backlog_to_sprint" model="ir.ui.view">
|
||||
<field name="name">backlog.assign.sprint.form</field>
|
||||
<field name="model">backlog.assign.sprint</field>
|
||||
<field name="name">project.scrum.backlog.assign.sprint.form</field>
|
||||
<field name="model">project.scrum.backlog.assign.sprint</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Assign Sprint">
|
||||
|
@ -30,20 +30,20 @@
|
|||
<record id="action_scrum_backlog_to_sprint" model="ir.actions.act_window">
|
||||
<field name="name">Assign Sprint</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">backlog.assign.sprint</field>
|
||||
<field name="res_model">project.scrum.backlog.assign.sprint</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="scrum_backlog_to_sprint_values">
|
||||
<field name="model_id" ref="model_scrum_product_backlog" />
|
||||
<field name="model_id" ref="model_project_scrum_product_backlog" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Assign Sprint</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_to_sprint'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
<field name="model">project.scrum.product.backlog</field>
|
||||
</record>
|
||||
|
||||
</data>
|
|
@ -1,9 +0,0 @@
|
|||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_scrum_sprint","scrum.sprint","model_scrum_sprint","project.group_project_user",1,0,0,0
|
||||
"access_scrum_product_backlog","scrum.product.backlog","model_scrum_product_backlog","project.group_project_user",1,1,1,1
|
||||
"access_scrum_meeting","scrum.meeting","model_scrum_meeting","project.group_project_user",1,0,0,0
|
||||
"access_scrum_meeting_manager","scrum.meeting.manager","model_scrum_meeting","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_sprint_manager","scrum.sprint.manager","model_scrum_sprint","project.group_project_manager",1,1,1,1
|
||||
"access_scrum_product_backlog_manager","scrum.product.backlog manager","model_scrum_product_backlog","project.group_project_manager",1,1,1,1
|
||||
"access_product_uom_project_manager","product.uom project manager","product.model_product_uom","project.group_project_manager",1,1,1,1
|
||||
"access_product_uom_project_user","product.uom project user","product.model_product_uom","project.group_project_user",1,0,0,0
|
|
Binary file not shown.
Loading…
Reference in New Issue