[MERGE] merge with trunk
bzr revid: mra@mra-laptop-20100710043515-x3wzswmpbsrzc11t
This commit is contained in:
commit
dd538fb1cd
|
@ -7,13 +7,13 @@ msgstr ""
|
|||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-07-07 09:59+0000\n"
|
||||
"PO-Revision-Date: 2010-07-09 06:46+0000\n"
|
||||
"Last-Translator: Bojan Markovic <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-08 03:50+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-10 04:02+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_report
|
||||
|
@ -26,17 +26,17 @@ msgstr ""
|
|||
#. module: account_report
|
||||
#: wizard_field:print.indicators.pdf,init,file:0
|
||||
msgid "Select a PDF File"
|
||||
msgstr ""
|
||||
msgstr "Odaberi PDF datoteku"
|
||||
|
||||
#. module: account_report
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Neispravan naziv modela u definiciji zadatka."
|
||||
|
||||
#. module: account_report
|
||||
#: view:account.report.report:0
|
||||
msgid "Operators:"
|
||||
msgstr ""
|
||||
msgstr "Operatori:"
|
||||
|
||||
#. module: account_report
|
||||
#: field:account.report.report,parent_id:0
|
||||
|
@ -46,12 +46,12 @@ msgstr "Sintetika"
|
|||
#. module: account_report
|
||||
#: field:account.report.report,disp_graph:0
|
||||
msgid "Display As Graph"
|
||||
msgstr ""
|
||||
msgstr "Prikaži kao grafikon"
|
||||
|
||||
#. module: account_report
|
||||
#: view:account.report.report:0
|
||||
msgid "Account Debit:"
|
||||
msgstr ""
|
||||
msgstr "Dugovanje konta:"
|
||||
|
||||
#. module: account_report
|
||||
#: selection:account.report.report,type:0
|
||||
|
@ -66,12 +66,12 @@ msgstr ""
|
|||
#. module: account_report
|
||||
#: rml:print.indicators:0
|
||||
msgid "Tabular Summary"
|
||||
msgstr ""
|
||||
msgstr "Tablični sažetak"
|
||||
|
||||
#. module: account_report
|
||||
#: view:account.report.report:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
msgstr "Bilješke"
|
||||
|
||||
#. module: account_report
|
||||
#: view:account.report.report:0
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
from datetime import datetime
|
||||
from osv import fields, osv, orm
|
||||
from tools.translate import _
|
||||
import mx.DateTime
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
import pooler
|
||||
import re
|
||||
import time
|
||||
|
@ -105,7 +106,9 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
|
||||
help="Email-id of the persons whom mail is to be sent"),
|
||||
'act_mail_body': fields.text('Mail body', help="Content of mail"),
|
||||
'regex_name': fields.char('Regular Expression on Model Name', size=128),
|
||||
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for mathching name of the resource\
|
||||
\ne.g.: urgent.* will search for records having name starting with urgent\
|
||||
\nNote: This is case sensitive search."),
|
||||
'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
|
||||
'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
|
||||
'domain':fields.char('Domain', size=124, required=False, readonly=False),
|
||||
|
@ -352,23 +355,23 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
|||
|
||||
base = False
|
||||
if hasattr(obj, 'create_date') and action.trg_date_type=='create':
|
||||
base = mx.DateTime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'create_date') and action.trg_date_type=='action_last':
|
||||
if hasattr(obj, 'date_action_last') and obj.date_action_last:
|
||||
base = mx.DateTime.strptime(obj.date_action_last, '%Y-%m-%d %H:%M:%S')
|
||||
base = datetime.strptime(obj.date_action_last, '%Y-%m-%d %H:%M:%S')
|
||||
else:
|
||||
base = mx.DateTime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
base = datetime.strptime(obj.create_date[:19], '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'date_deadline') and action.trg_date_type=='deadline' \
|
||||
and obj.date_deadline:
|
||||
base = mx.DateTime.strptime(obj.date_deadline, '%Y-%m-%d %H:%M:%S')
|
||||
base = datetime.strptime(obj.date_deadline, '%Y-%m-%d %H:%M:%S')
|
||||
elif hasattr(obj, 'date') and action.trg_date_type=='date' and obj.date:
|
||||
base = mx.DateTime.strptime(obj.date, '%Y-%m-%d %H:%M:%S')
|
||||
base = datetime.strptime(obj.date, '%Y-%m-%d %H:%M:%S')
|
||||
if base:
|
||||
fnct = {
|
||||
'minutes': lambda interval: mx.DateTime.RelativeDateTime(minutes=interval),
|
||||
'day': lambda interval: mx.DateTime.RelativeDateTime(days=interval),
|
||||
'hour': lambda interval: mx.DateTime.RelativeDateTime(hours=interval),
|
||||
'month': lambda interval: mx.DateTime.RelativeDateTime(months=interval),
|
||||
'minutes': lambda interval: timedelta(minutes=interval),
|
||||
'day': lambda interval: timedelta(days=interval),
|
||||
'hour': lambda interval: timedelta(hours=interval),
|
||||
'month': lambda interval: timedelta(months=interval),
|
||||
}
|
||||
d = base + fnct[action.trg_date_range_type](action.trg_date_range)
|
||||
dt = d.strftime('%Y-%m-%d %H:%M:%S')
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<page string="Conditions">
|
||||
<group col="2" colspan="2" name="model">
|
||||
<separator colspan="4" string="Conditions on Model Fields"/>
|
||||
<field name="regex_name" string="Regex on Model Name" colspan="2"/>
|
||||
<field name="regex_name" colspan="2"/>
|
||||
<field name="trg_user_id"/>
|
||||
</group>
|
||||
<group col="2" colspan="2" name="partner">
|
||||
|
|
|
@ -379,6 +379,9 @@ property or property parameter."),
|
|||
_defaults = {
|
||||
'state': 'needs-action',
|
||||
'user_id': lambda self, cr, uid, ctx: uid,
|
||||
'role': 'req-participant',
|
||||
'rsvp': True,
|
||||
'cutype': 'individual',
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
|
@ -543,13 +546,13 @@ property or property parameter."),
|
|||
context = {}
|
||||
|
||||
for vals in self.browse(cr, uid, ids, context=context):
|
||||
user = vals.user_id
|
||||
if user:
|
||||
mod_obj = self.pool.get(vals.ref._name)
|
||||
if vals.ref:
|
||||
if vals.ref.user_id.id != user.id:
|
||||
defaults = {'user_id': user.id}
|
||||
new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||
#user = vals.user_id
|
||||
#if user:
|
||||
# mod_obj = self.pool.get(vals.ref._name)
|
||||
# if vals.ref:
|
||||
# if vals.ref.user_id.id != user.id:
|
||||
# defaults = {'user_id': user.id}
|
||||
# new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
|
||||
|
||||
return True
|
||||
|
@ -1417,6 +1420,8 @@ true, it will allow you to hide the event alarm information without removing it.
|
|||
until_date = arg[2]
|
||||
res = super(calendar_event, self).search(cr, uid, args_without_date, \
|
||||
offset, limit, order, context, count)
|
||||
#Search Event ID which are invitted
|
||||
|
||||
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
|
||||
|
||||
|
||||
|
|
|
@ -76,13 +76,26 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Invitation details">
|
||||
<field name="email" string="Invitation To"/>
|
||||
<field name="user_id" string="Internal User" />
|
||||
<field name="partner_address_id" string="Contact" />
|
||||
<field name="role" />
|
||||
<field name="sent_by_uid" string="Invitation From" />
|
||||
<field name="role" string="My Role"/>
|
||||
<field name="cutype" string="Invitation type"/>
|
||||
<field name="state" />
|
||||
<field name="cutype" invisible="1"/>
|
||||
<field name="rsvp" invisible="1"/>
|
||||
<field name="rsvp" string="Required to Join"/>
|
||||
<button name="do_tentative" states="needs-action,declined,accepted"
|
||||
string="Uncertain" type="object"
|
||||
icon="terp-crm" />
|
||||
<button name="do_accept" string="Accept"
|
||||
states="needs-action,tentative,declined"
|
||||
type="object" icon="gtk-apply" />
|
||||
<button name="do_decline" string="Decline"
|
||||
states="needs-action,tentative,accepted"
|
||||
type="object" icon="gtk-cancel" />
|
||||
<button
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
string="Delegate" type="action"
|
||||
icon="gtk-sort-descending"
|
||||
states="needs-action,tentative,declined,accepted"
|
||||
context="{'model' : 'calendar.attendee', 'attendee_field' : 'child_ids'}" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -75,7 +75,8 @@ send an Email to Invited Person')
|
|||
obj = self.pool.get(model)
|
||||
res_obj = obj.browse(cr, uid, context_id)
|
||||
att_obj = self.pool.get('calendar.attendee')
|
||||
|
||||
user_obj = self.pool.get('res.users')
|
||||
current_user = user_obj.browse(cr, uid, uid, context=context)
|
||||
for datas in self.read(cr, uid, ids, context=context):
|
||||
type = datas.get('type')
|
||||
vals = []
|
||||
|
@ -89,7 +90,7 @@ send an Email to Invited Person')
|
|||
else:
|
||||
return {}
|
||||
if type == 'internal':
|
||||
user_obj = self.pool.get('res.users')
|
||||
|
||||
if not datas.get('user_ids'):
|
||||
raise osv.except_osv(_('Error!'), ("Please select any User"))
|
||||
for user_id in datas.get('user_ids'):
|
||||
|
@ -139,7 +140,7 @@ send an Email to Invited Person')
|
|||
self._columns['type'].selection))
|
||||
raise osv.except_osv(_('Error!'), ("%s must have an email Address to send mail") %(name[0]))
|
||||
att_obj._send_mail(cr, uid, attendees, mail_to, \
|
||||
email_from= tools.config.get('email_from', False))
|
||||
email_from = current_user.user_email or tools.config.get('email_from', False))
|
||||
|
||||
return {}
|
||||
|
||||
|
|
|
@ -4,53 +4,69 @@
|
|||
<!--
|
||||
Board for statistical view of the sections
|
||||
-->
|
||||
<record model="ir.ui.view" id="view_crm_lead_stage_graph1">
|
||||
<field name="name">Leads By Stage - Graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Leads By Stage" type="pie">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_categ_graph">
|
||||
<field name="name">report.crm.opportunity.categ.graph</field>
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_categ_graph">
|
||||
<field name="name">Opportunities By Categories - Graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunity by Sales Team and Categories" type="bar" orientation="horizontal">
|
||||
<graph string="Opportunity by Categories" type="bar" orientation="horizontal">
|
||||
<field name="categ_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Opportunities By Categories"
|
||||
domain="[('state','!=','done'),('state','!=','cancel')]"
|
||||
res_model="crm.lead.report"
|
||||
view_type="form"
|
||||
view_mode="graph,tree,form"
|
||||
view_id="view_crm_opportunity_categ_graph"
|
||||
id="act_oppor_categ"/>
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_stage_graph">
|
||||
<field name="name">Opportunities By Stage - Graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities By Stage" type="pie">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_user_stage_graph">
|
||||
<field name="name">Opportunities By Stage Per User - Graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities By Stage" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_leads_state">
|
||||
<record model="ir.actions.act_window" id="act_oppor_categ">
|
||||
<field name="res_model">Opportunities By Categories</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_lead_stage_graph1"/>
|
||||
<field name="view_id" ref="view_crm_opportunity_categ_graph"/>
|
||||
<field name="domain">[('state','!=','done'),('state','!=','cancel')]</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Leads Of The Month By User"
|
||||
domain="[('month','=',time.strftime('%%m')),('state','!=','cancel')]"
|
||||
res_model="crm.lead.report"
|
||||
view_type="form"
|
||||
view_mode="graph,tree,form"
|
||||
view_id="view_crm_lead_stage_graph1"
|
||||
id="act_leads_month_user"/>
|
||||
<record model="ir.actions.act_window" id="act_opportunity_stage">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_stage_graph"/>
|
||||
<field name="domain">[('state','!=','done'),('state','!=','cancel')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_oppor_stage_user">
|
||||
<field name="res_model">Number of Opportunities by stage</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_stage_graph"/>
|
||||
<field name="domain">[('state','!=','cancel')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_crm_statistical_form">
|
||||
<field name="name">CRM - Statistical Dashboard Form</field>
|
||||
|
@ -68,8 +84,8 @@
|
|||
width="250"/>
|
||||
|
||||
<action
|
||||
string="Leads By Stage"
|
||||
name="%(act_leads_state)d"
|
||||
string="Opportunities By Stage"
|
||||
name="%(act_opportunity_stage)d"
|
||||
height="200"
|
||||
colspan="4"/>
|
||||
|
||||
|
@ -77,8 +93,8 @@
|
|||
<child2>
|
||||
|
||||
<action
|
||||
string="Leads Of The Month By User"
|
||||
name="%(act_leads_month_user)d"
|
||||
string="Number of Opportunities by Stage and User"
|
||||
name="%(act_oppor_stage_user)d"
|
||||
colspan="4"/>
|
||||
|
||||
</child2>
|
||||
|
|
|
@ -4,23 +4,38 @@
|
|||
<record model="board.note.type" id="note_crm_type">
|
||||
<field name="name">CRM Configuration</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crm_opportunity_user_graph1">
|
||||
<field name="name">crm.opportunity.user.graph1</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Opportunities by User and Section" type="pie">
|
||||
<field name="state"/>
|
||||
<graph string="Opportunities by User and Section" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<field name="user_id" group="True"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="act_my_leads">
|
||||
|
||||
<record id="view_report_crm_oppor_graph" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.graph</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="vertical" string="Opportunity Analysis" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="planned_revenue" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor">
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open'), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
|
@ -31,12 +46,12 @@
|
|||
<field name="domain">[('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_leads_stage">
|
||||
<record model="ir.actions.act_window" id="act_my_oppor_stage">
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_report_crm_lead_graph"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="view_id" ref="view_report_crm_oppor_graph"/>
|
||||
<field name="domain">['&', ('user_id','=',uid), '!' , '&', ('state', '=', 'done'), ('date_closed','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%Y-%m-%d'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_sales_pipeline">
|
||||
|
@ -44,7 +59,7 @@
|
|||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel'),('type', '=', 'opportunity')]</field>
|
||||
<field name="domain">['&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_crm_form">
|
||||
|
@ -56,8 +71,8 @@
|
|||
<hpaned>
|
||||
<child1>
|
||||
<action
|
||||
string="My Opportunities"
|
||||
name="%(act_my_leads)d"
|
||||
string="My Open Opportunities"
|
||||
name="%(act_my_oppor)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
|
@ -70,10 +85,10 @@
|
|||
<child2>
|
||||
<action
|
||||
string="Revenues by stage"
|
||||
name="%(act_my_leads_stage)d"
|
||||
name="%(act_my_oppor_stage)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My Sales Pipeline"
|
||||
string="Win/Lost Ratio for the last Year"
|
||||
name="%(act_sales_pipeline)d"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
|
|
|
@ -24,7 +24,6 @@ import re
|
|||
import os
|
||||
import base64
|
||||
import tools
|
||||
import mx.DateTime
|
||||
|
||||
from tools.translate import _
|
||||
from osv import fields
|
||||
|
@ -80,6 +79,26 @@ this if you want the rule to send an email to the partner."),
|
|||
if hasattr(obj, 'categ_id'):
|
||||
ok = ok and (not action.trg_categ_id or action.trg_categ_id.id==obj.categ_id.id)
|
||||
|
||||
#Cheking for history
|
||||
regex = action.regex_history
|
||||
result_history = True
|
||||
if regex:
|
||||
res = False
|
||||
ptrn = re.compile(str(regex))
|
||||
for history in obj.message_ids:
|
||||
_result = ptrn.search(str(history.name))
|
||||
if _result:
|
||||
res = True
|
||||
break
|
||||
result_history = res
|
||||
ok = ok and (not regex or result_history)
|
||||
|
||||
res_count = True
|
||||
if action.trg_max_history:
|
||||
res_count = False
|
||||
if len(obj.message_ids) >= action.trg_max_history:
|
||||
res_count = True
|
||||
ok = ok and res_count
|
||||
return ok
|
||||
|
||||
def do_action(self, cr, uid, action, model_obj, obj, context={}):
|
||||
|
|
|
@ -342,20 +342,7 @@
|
|||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Calendar Attendee Tree View -->
|
||||
|
||||
<record id="attendee_tree_view_inherit" model="ir.ui.view">
|
||||
<field name="name">calendar.attendee.tree.inherit</field>
|
||||
<field name="model">calendar.attendee</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="role" position="after">
|
||||
<field name="categ_id" string="Event Type"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -31,7 +31,15 @@ class procurement_order(osv.osv):
|
|||
|
||||
def _procure_confirm(self, cr, uid, ids=None, use_new_cursor=False, context=None):
|
||||
'''
|
||||
use_new_cursor: False or the dbname
|
||||
Call the scheduler to check the procurement order
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param uid: The current user ID for security checks
|
||||
@param ids: List of selected IDs
|
||||
@param use_new_cursor: False or the dbname
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of values
|
||||
'''
|
||||
if not context:
|
||||
context = {}
|
||||
|
@ -126,6 +134,15 @@ class procurement_order(osv.osv):
|
|||
return {}
|
||||
|
||||
def create_automatic_op(self, cr, uid, context=None):
|
||||
"""
|
||||
Create procurement of virtual stock < 0
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param uid: The current user ID for security checks
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of values
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
product_obj = self.pool.get('product.product')
|
||||
|
@ -167,7 +184,16 @@ class procurement_order(osv.osv):
|
|||
def _procure_orderpoint_confirm(self, cr, uid, automatic=False,\
|
||||
use_new_cursor=False, context=None, user_id=False):
|
||||
'''
|
||||
Create procurement based on Orderpoint
|
||||
use_new_cursor: False or the dbname
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: The current row, from the database cursor,
|
||||
@param user_id: The current user ID for security checks
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param param: False or the dbname
|
||||
@return: Dictionary of values
|
||||
"""
|
||||
'''
|
||||
if not context:
|
||||
context = {}
|
||||
|
|
|
@ -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 xmlrpclib
|
||||
|
||||
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/wizard')
|
||||
wiz_id = sock.create('trunk', 1, 'admin', 'procurement.order.compute.all')
|
||||
sock.execute('trunk', 1, 'admin', wiz_id, {'form': {'po_cycle': 1.0, 'po_lead': 1.0, 'user_id': 3, 'schedule_cycle': 1.0, 'picking_lead': 1.0, 'security_lead': 50.0, 'automatic': False}, 'ids': [], 'report_type': 'pdf', 'model': 'ir.ui.menu', 'id': False}, 'compute', {})
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
@ -39,13 +39,13 @@
|
|||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="uom_hour" model="product.uom">
|
||||
<field name="name">hour</field>
|
||||
<field name="name">Hour</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="8.0"/>
|
||||
<field name="uom_type">smaller</field>
|
||||
</record>
|
||||
<record id="uom_day" model="product.uom">
|
||||
<field name="name">day</field>
|
||||
<field name="name">Day</field>
|
||||
<field eval="uom_categ_wtime" name="category_id"/>
|
||||
<field name="factor" eval="1.0"/>
|
||||
</record>
|
||||
|
|
|
@ -254,18 +254,19 @@
|
|||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Information">
|
||||
<group col="2" colspan="2">
|
||||
<field
|
||||
name="planned_hours"
|
||||
widget="float_time"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
</group>
|
||||
<group col="3" colspan="2">
|
||||
<field
|
||||
name="planned_hours"
|
||||
widget="float_time"
|
||||
attrs="{'readonly':[('state','!=','draft')]}"
|
||||
on_change="onchange_planned(planned_hours, effective_hours)"/>
|
||||
<field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>
|
||||
<button name="%(action_config_compute_remaining)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<field name="delay_hours" widget="float_time"/>
|
||||
<field name="effective_hours" widget="float_time"/>
|
||||
|
||||
<field name="delay_hours" widget="float_time"/>
|
||||
</group>
|
||||
|
||||
<field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}" widget="text_wiki"/>
|
||||
|
|
|
@ -154,9 +154,9 @@
|
|||
<tree string="Issue Tracker Tree" colors="red:state=='open';blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="id"/>
|
||||
<field name="create_date"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="project_id" />
|
||||
<field name="priority" string="Severity"/>
|
||||
<field name="stage_id" string="Resolution"/>
|
||||
<button icon="gtk-go-back" string="" name="stage_previous" type="object"
|
||||
|
|
|
@ -52,7 +52,7 @@ class project_issue_report(osv.osv):
|
|||
_columns = {
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
|
||||
'user_id2':fields.many2one('res.users', 'Assigned To', readonly=True),
|
||||
'user_id2':fields.many2one('res.users', 'Assignee', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', 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"),
|
||||
|
@ -66,17 +66,17 @@ class project_issue_report(osv.osv):
|
|||
('11', 'November'), ('12', 'December')], 'Month', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
'opening_date': fields.date('Date of Opening', readonly=True),
|
||||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
'date_closed': fields.date('Closed Date', readonly=True),
|
||||
'date_closed': fields.date('Date of Closing', readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'project.issue')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('object_id.model', '=', 'project.issue')]"),
|
||||
'nbr': fields.integer('# of Issues', readonly=True),
|
||||
'working_hours_open': fields.float('# Working Open Hours', readonly=True),
|
||||
'working_hours_close': fields.float('# Working Closing Hours', readonly=True),
|
||||
'delay_open': fields.float('Avg opening Delay', digits=(16,2), readonly=True, group_operator="avg",
|
||||
'working_hours_open': fields.float('Avg. Working Hours to Open', readonly=True),
|
||||
'working_hours_close': fields.float('Avg. Working Hours to Close', readonly=True),
|
||||
'delay_open': fields.float('Avg. Delay to Open', digits=(16,2), readonly=True, group_operator="avg",
|
||||
help="Number of Days to close the project issue"),
|
||||
'delay_close': fields.float('Avg Closing Delay', digits=(16,2), readonly=True, group_operator="avg",
|
||||
'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
|
||||
help="Number of Days to close the project issue"),
|
||||
'company_id' : fields.many2one('res.company', 'Company'),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
|
|
|
@ -425,6 +425,7 @@ class purchase_order(osv.osv):
|
|||
'invoice_state': istate,
|
||||
'purchase_id': order.id,
|
||||
'company_id': order.company_id.id,
|
||||
'move_lines' : [],
|
||||
})
|
||||
todo_moves = []
|
||||
for order_line in order.order_line:
|
||||
|
@ -800,4 +801,4 @@ class procurement_order(osv.osv):
|
|||
|
||||
procurement_order()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -129,10 +129,14 @@ class purchase_order(osv.osv):
|
|||
}
|
||||
def wkf_confirm_order(self, cr, uid, ids, context={}):
|
||||
res = super(purchase_order, self).wkf_confirm_order(cr, uid, ids, context)
|
||||
proc_obj=self.pool.get('procurement.order')
|
||||
for po in self.browse(cr, uid, ids, context):
|
||||
if po.requisition_id and (po.requisition_id.exclusive=='exclusive'):
|
||||
for order in po.requisition_id.purchase_ids:
|
||||
if order.id<>po.id:
|
||||
proc_ids = proc_obj.search(cr, uid, [('purchase_id', '=', order.id)])
|
||||
if proc_ids and po.state=='confirmed':
|
||||
proc_obj.wirte(cr,uid,proc_ids,{'purchase_id':po.id})
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
wf_service.trg_validate(uid, 'purchase.order', order.id, 'purchase_cancel', cr)
|
||||
self.pool.get('purchase.requisition').write(cr, uid, [po.requisition_id.id], {'state':'done','date_end':time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
|
|
|
@ -254,7 +254,7 @@ class scrum_product_backlog(osv.osv):
|
|||
'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),
|
||||
'progress': fields.function(_calc_progress, method=True, string='Progress', 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 (Time spent on tasks)"),
|
||||
'effective_hours': fields.function(_calc_effective, method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks"),
|
||||
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
|
||||
'create_date': fields.datetime("Creation Date", readonly=True),
|
||||
'task_hours': fields.function(_calc_task, method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')
|
||||
|
|
Loading…
Reference in New Issue