diff options
| author | Mustufa Rangwala <mra@mra-laptop> | 2010-07-10 10:05:15 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@mra-laptop> | 2010-07-10 10:05:15 +0530 |
| commit | dd538fb1cd32edbdef91645b762f4d13d0481bb3 (patch) | |
| tree | 19a3ee31cbf9697260c344e37ef203d3ca34d833 | |
| parent | 4f61f9c3e517dd18a69ad4b7802ef8d82e4f91d7 (diff) | |
| parent | a72027f8c9b92bc40261722ba4f8d1da27fec4cc (diff) | |
[MERGE] merge with trunk
bzr revid: mra@mra-laptop-20100710043515-x3wzswmpbsrzc11t
| -rw-r--r-- | addons/account_report/i18n/bs.po | 18 | ||||
| -rw-r--r-- | addons/base_action_rule/base_action_rule.py | 25 | ||||
| -rw-r--r-- | addons/base_action_rule/base_action_rule_view.xml | 2 | ||||
| -rw-r--r-- | addons/base_calendar/base_calendar.py | 19 | ||||
| -rw-r--r-- | addons/base_calendar/base_calendar_view.xml | 25 | ||||
| -rw-r--r-- | addons/base_calendar/wizard/base_calendar_invite_attendee.py | 7 | ||||
| -rw-r--r-- | addons/crm/board_crm_statistical_view.xml | 72 | ||||
| -rw-r--r-- | addons/crm/board_crm_view.xml | 39 | ||||
| -rw-r--r-- | addons/crm/crm_action_rule.py | 21 | ||||
| -rw-r--r-- | addons/crm/crm_meeting_view.xml | 15 | ||||
| -rw-r--r-- | addons/procurement/schedulers.py | 28 | ||||
| -rw-r--r-- | addons/procurement/scripts/scheduler.py | 30 | ||||
| -rw-r--r-- | addons/product/product_data.xml | 4 | ||||
| -rw-r--r-- | addons/project/project_view.xml | 19 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_view.xml | 2 | ||||
| -rw-r--r-- | addons/project_issue/report/project_issue_report.py | 14 | ||||
| -rw-r--r-- | addons/purchase/purchase.py | 3 | ||||
| -rw-r--r-- | addons/purchase_requisition/purchase_requisition.py | 4 | ||||
| -rw-r--r-- | addons/scrum/scrum.py | 2 |
19 files changed, 205 insertions, 144 deletions
diff --git a/addons/account_report/i18n/bs.po b/addons/account_report/i18n/bs.po index 3fd898408ff..bd0c14775ad 100644 --- a/addons/account_report/i18n/bs.po +++ b/addons/account_report/i18n/bs.po @@ -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 diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py index be1a53046a7..79b883c0236 100644 --- a/addons/base_action_rule/base_action_rule.py +++ b/addons/base_action_rule/base_action_rule.py @@ -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') diff --git a/addons/base_action_rule/base_action_rule_view.xml b/addons/base_action_rule/base_action_rule_view.xml index c9164962439..36140e62649 100644 --- a/addons/base_action_rule/base_action_rule_view.xml +++ b/addons/base_action_rule/base_action_rule_view.xml @@ -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"> diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index 9458e3e01a6..85ec16bda8d 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -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) diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml index bb0412a2247..cb2ca806afa 100644 --- a/addons/base_calendar/base_calendar_view.xml +++ b/addons/base_calendar/base_calendar_view.xml @@ -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> diff --git a/addons/base_calendar/wizard/base_calendar_invite_attendee.py b/addons/base_calendar/wizard/base_calendar_invite_attendee.py index ebbfe6c48d2..15763da202d 100644 --- a/addons/base_calendar/wizard/base_calendar_invite_attendee.py +++ b/addons/base_calendar/wizard/base_calendar_invite_attendee.py @@ -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 {} diff --git a/addons/crm/board_crm_statistical_view.xml b/addons/crm/board_crm_statistical_view.xml index 1baf673990d..b23fdeac1cd 100644 --- a/addons/crm/board_crm_statistical_view.xml +++ b/addons/crm/board_crm_statistical_view.xml @@ -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> + + <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="Leads By Stage" type="pie"> - <field name="stage_id"/> + <graph string="Opportunity by Categories" type="bar" orientation="horizontal"> + <field name="categ_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_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="Opportunity by Sales Team and Categories" type="bar" orientation="horizontal"> - <field name="categ_id"/> + <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> - <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.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_opportunity_categ_graph"/> + <field name="domain">[('state','!=','done'),('state','!=','cancel')]</field> + </record> - <record model="ir.actions.act_window" id="act_leads_state"> + <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_lead_stage_graph1"/> + <field name="view_id" ref="view_crm_opportunity_stage_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_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> diff --git a/addons/crm/board_crm_view.xml b/addons/crm/board_crm_view.xml index c90ecb28e03..ed6044a6fd6 100644 --- a/addons/crm/board_crm_view.xml +++ b/addons/crm/board_crm_view.xml @@ -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> diff --git a/addons/crm/crm_action_rule.py b/addons/crm/crm_action_rule.py index 1f11f2c4c0c..1ca37a426a2 100644 --- a/addons/crm/crm_action_rule.py +++ b/addons/crm/crm_action_rule.py @@ -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={}): diff --git a/addons/crm/crm_meeting_view.xml b/addons/crm/crm_meeting_view.xml index e635a1d26bc..6cc8059b1a6 100644 --- a/addons/crm/crm_meeting_view.xml +++ b/addons/crm/crm_meeting_view.xml @@ -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> diff --git a/addons/procurement/schedulers.py b/addons/procurement/schedulers.py index dc66d9e3e8b..c0cc0f736b6 100644 --- a/addons/procurement/schedulers.py +++ b/addons/procurement/schedulers.py @@ -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 = {} diff --git a/addons/procurement/scripts/scheduler.py b/addons/procurement/scripts/scheduler.py deleted file mode 100644 index 648da5cdddc..00000000000 --- a/addons/procurement/scripts/scheduler.py +++ /dev/null @@ -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: - diff --git a/addons/product/product_data.xml b/addons/product/product_data.xml index 4fada46aeef..05a57126402 100644 --- a/addons/product/product_data.xml +++ b/addons/product/product_data.xml @@ -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> diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index e4b40e27ea1..0c9b2f671ce 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -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"/> diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 0bdee911cee..cbf24b18f76 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -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" diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index 833a792c34d..c79ac3eae64 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -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'), diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index d70ea13d39b..dfdf85080fe 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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:
\ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index 7f7c10a0c8a..532c9918b60 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -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')}) diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py index d4434968c51..673c47850d6 100644 --- a/addons/scrum/scrum.py +++ b/addons/scrum/scrum.py @@ -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') |
