|
- Net Total:
+ Net Total:
|
[[ formatLang(o.amount_untaxed) ]]
@@ -418,7 +418,7 @@
|
- Taxes:
+ Taxes:
|
[[ formatLang(o.amount_tax) ]]
diff --git a/addons/account/wizard/account_chart.py b/addons/account/wizard/account_chart.py
index 440dbd407ec..c9cc5ff7bd5 100644
--- a/addons/account/wizard/account_chart.py
+++ b/addons/account/wizard/account_chart.py
@@ -33,7 +33,7 @@ class account_chart(osv.osv_memory):
help = 'Keep empty for all open fiscal years'),
'target_move': fields.selection([('all', 'All Entries'),
('posted', 'All Posted Entries')], 'Target Moves', required = True),
- }
+ }
def _get_fiscalyear(self, cr, uid, context=None):
"""Return default Fiscalyear value"""
diff --git a/addons/account/wizard/account_chart_view.xml b/addons/account/wizard/account_chart_view.xml
index b621019dbe6..d29bffb833d 100644
--- a/addons/account/wizard/account_chart_view.xml
+++ b/addons/account/wizard/account_chart_view.xml
@@ -1,36 +1,34 @@
-
-
+
account.chart.form
account.chart
form
-
+
Chart of Accounts
account.chart
form
tree,form
-
- new
+
+ new
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index db5aa168bbb..0b672721ba3 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -64,9 +64,15 @@ class crm_opportunity(osv.osv):
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
- self.write(cr, uid, ids, {'probability' : 100.0, 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
+ stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 100)]})
+ if not stage_id:
+ raise osv.except_osv(_('Warning !'), _('There is no stage for won oppportunities defined for this Sale Team.'))
+ value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
+ value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
+
+ self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Opportunity ') + " '" + name + "' "+ _("is Won.")
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
self.log(cr, uid, id, message)
return res
@@ -78,9 +84,16 @@ class crm_opportunity(osv.osv):
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
- res = self.write(cr, uid, ids, {'probability' : 0.0, 'state': 'done'})
+ res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
+ stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 0)]})
+ if not stage_id:
+ raise osv.except_osv(_('Warning !'), _('There is no stage for lost oppportunities defined for this Sale Team.'))
+ value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
+ value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
+
+ res = self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
- message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.")
+ message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
self.log(cr, uid, id, message)
return res
@@ -95,9 +108,22 @@ class crm_opportunity(osv.osv):
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
return res
-
+
+ def case_reset(self, cr, uid, ids, *args):
+ """Overrides reset as draft in order to set the stage field as empty
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of case Ids
+ @param *args: Tuple Value for additional Params
+ """
+ res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
+ self.write(cr, uid, ids, {'stage_id': False})
+ return True
+
+
def case_open(self, cr, uid, ids, *args):
- """Overrides cancel for crm_case for setting Open Date
+ """Overrides open for crm_case for setting Open Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index 5c3f3ffa8e1..5bbe4feed35 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -14,8 +14,7 @@
+ domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py
index bcdcc2e9bf6..05413ddcd8f 100644
--- a/addons/crm/crm_phonecall.py
+++ b/addons/crm/crm_phonecall.py
@@ -24,6 +24,7 @@ from osv import fields, osv
from tools.translate import _
import crm
import time
+from datetime import datetime, timedelta
class crm_phonecall(osv.osv, crm_case):
""" Phonecall Cases """
@@ -65,7 +66,7 @@ class crm_phonecall(osv.osv, crm_case):
('object_id.model', '=', 'crm.phonecall')]"),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields
- 'duration': fields.float('Duration'),
+ 'duration': fields.float('Duration', help="Duration in Minutes"),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.phonecall')]"),
@@ -113,10 +114,29 @@ class crm_phonecall(osv.osv, crm_case):
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
- res = super(crm_phonecall, self).case_close(cr, uid, ids, args)
- self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
+ for phone in self.browse(cr, uid, ids):
+ phone_id= phone.id
+ data = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
+ if phone.duration <=0:
+ duration = datetime.now() - datetime.strptime(phone.date, '%Y-%m-%d %H:%M:%S')
+ data.update({'duration': duration.seconds/float(60)})
+ res = super(crm_phonecall, self).case_close(cr, uid, [phone_id], args)
+ self.write(cr, uid, ids, data)
return res
+ def case_reset(self, cr, uid, ids, *args):
+ """Resets case as draft
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of case Ids
+ @param *args: Tuple Value for additional Params
+ """
+ res = super(crm_phonecall, self).case_reset(cr, uid, ids, args)
+ self.write(cr, uid, ids, {'duration': 0.0})
+ return res
+
+
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 61da1ab6cc9..daf4b118a58 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -374,7 +374,8 @@
+ context="{'user_prefence':True}"
+ readonly="0"/>
diff --git a/addons/crm/report/crm_lead_report_view.xml b/addons/crm/report/crm_lead_report_view.xml
index 4086a04ee9d..bf679c4cdaa 100644
--- a/addons/crm/report/crm_lead_report_view.xml
+++ b/addons/crm/report/crm_lead_report_view.xml
@@ -133,7 +133,7 @@
-
+
diff --git a/addons/crm_caldav/crm_caldav_data.xml b/addons/crm_caldav/crm_caldav_data.xml
index 0f160bfd85d..3b74eef123c 100644
--- a/addons/crm_caldav/crm_caldav_data.xml
+++ b/addons/crm_caldav/crm_caldav_data.xml
@@ -1,6 +1,6 @@
-
+
@@ -22,13 +22,20 @@
-
+
attendee
-
+
+
+
+
+
+ field
+
+
@@ -42,7 +49,7 @@
field
-
+
@@ -55,7 +62,7 @@
field
-
+
@@ -154,7 +161,7 @@
field
-
+
@@ -313,7 +320,7 @@
field
-
+
diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py
index 8ccd8acd0a4..85dfc8b9dd0 100644
--- a/addons/crm_claim/crm_claim.py
+++ b/addons/crm_claim/crm_claim.py
@@ -79,9 +79,7 @@ class crm_claim(osv.osv, crm.crm_case):
'partner_name': fields.char("Employee's Name", size=64),
'partner_mobile': fields.char('Mobile', size=32),
'partner_phone': fields.char('Phone', size=32),
- 'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
- domain="[('section_id','=',section_id),\
- ('object_id.model', '=', 'crm.claim')]"),
+ 'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
'probability': fields.float('Probability (%)'),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
diff --git a/addons/crm_claim/crm_claim_view.xml b/addons/crm_claim/crm_claim_view.xml
index 75defcf3d88..a0a8a93f247 100644
--- a/addons/crm_claim/crm_claim_view.xml
+++ b/addons/crm_claim/crm_claim_view.xml
@@ -47,7 +47,7 @@
@@ -125,7 +125,9 @@
-
+
diff --git a/addons/document/__openerp__.py b/addons/document/__openerp__.py
index a260a083d74..f8a489a941c 100644
--- a/addons/document/__openerp__.py
+++ b/addons/document/__openerp__.py
@@ -46,7 +46,7 @@
'security/document_security.xml',
'document_view.xml',
'document_data.xml',
- 'wizard/document_configuration_view.xml',
+# 'wizard/document_configuration_view.xml',
'security/ir.model.access.csv',
'report/document_report_view.xml',
'board_document_view.xml',
diff --git a/addons/document/test/document_test.yml b/addons/document/test/document_test.yml
index fe3008d35da..5864a223033 100644
--- a/addons/document/test/document_test.yml
+++ b/addons/document/test/document_test.yml
@@ -45,8 +45,9 @@
-
Attach a pdf file in "My document"
-
- !python {model: ir.attachment}: |
+ !python {model: 'ir.attachment'}: |
import tools
import base64
- file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
- id = self.write(cr, uid, [ref("document_1")], {'datas' : base64.encodestring(file.read())}, context)
+ pdf_file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
+ self.write(cr, uid, [ref("document_1")], {'datas_fname': 'partner.pdf', 'datas' : base64.encodestring(pdf_file.read())}, context)
+
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index c72cc60dcef..9caaae6e722 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -53,21 +53,22 @@
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/hr/board_hr_view.xml b/addons/hr/board_hr_view.xml
index 873032a4067..3b64c362340 100644
--- a/addons/hr/board_hr_view.xml
+++ b/addons/hr/board_hr_view.xml
@@ -7,7 +7,7 @@
name="Human Resources"
parent="base.dashboard"/>
-
+
board.hr.form
board.board
diff --git a/addons/hr/hr_demo.xml b/addons/hr/hr_demo.xml
index 36a2703717f..572eb3c1060 100644
--- a/addons/hr/hr_demo.xml
+++ b/addons/hr/hr_demo.xml
@@ -2,6 +2,43 @@
+
+
+
+ CEO
+
+
+
+ CTO
+
+
+
+
+ Managers(Tech. Heads)
+
+
+
+
+ Project Managers
+
+
+
+
+ Sr. Executives(Team Leads)
+
+
+
+
+ Jr. Executives(Developers)
+
+
+
+
+ Trainee(Intership)
+
+
+
+
@@ -9,6 +46,7 @@
+
diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml
index c0b2e3c53c7..85ffbe0fc2f 100644
--- a/addons/hr/hr_department_view.xml
+++ b/addons/hr/hr_department_view.xml
@@ -101,7 +101,7 @@
form
-
+
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 402df16939e..1b72561ed9c 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -62,7 +62,7 @@
-
+
@@ -88,6 +88,7 @@
+
@@ -102,7 +103,9 @@
-
+
+
+
diff --git a/addons/hr/i18n/tr.po b/addons/hr/i18n/tr.po
index cc217e0d47e..ef1028853a1 100644
--- a/addons/hr/i18n/tr.po
+++ b/addons/hr/i18n/tr.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-05-10 13:18+0000\n"
-"Last-Translator: Angel Spy \n"
+"PO-Revision-Date: 2010-07-12 11:46+0000\n"
+"Last-Translator: adsiz_1029@hotmail.com \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-06-22 04:15+0000\n"
+"X-Launchpad-Export-Date: 2010-07-13 03:49+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
diff --git a/addons/hr_attendance/hr_attendance.py b/addons/hr_attendance/hr_attendance.py
index b8892837310..d5667051ae1 100644
--- a/addons/hr_attendance/hr_attendance.py
+++ b/addons/hr_attendance/hr_attendance.py
@@ -60,7 +60,7 @@ class hr_attendance(osv.osv):
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
}
_defaults = {
- 'name': time.strftime('%Y-%m-%d %H:%M:%S'),
+ 'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #Don't remove the lambda, if you remove it then the current time will not change
'employee_id': _employee_get,
}
@@ -119,6 +119,7 @@ class hr_employee(osv.osv):
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
id = False
warning_sign = 'sign'
+ res = {}
#Special case when button calls this method :type=context
if isinstance(type, dict):
@@ -127,7 +128,6 @@ class hr_employee(osv.osv):
warning_sign = "Sign In"
elif type == 'sign_out':
warning_sign = "Sign Out"
-
for emp in self.read(cr, uid, ids, ['id'], context=context):
if not self._action_check(cr, uid, emp['id'], dt, context):
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
diff --git a/addons/hr_attendance/report/__init__.py b/addons/hr_attendance/report/__init__.py
index 9b27aeb24ae..faa57ad2e95 100644
--- a/addons/hr_attendance/report/__init__.py
+++ b/addons/hr_attendance/report/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL ().
#
@@ -15,12 +15,12 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
import attendance_errors
-import bymonth
+import attendance_by_month
import timesheet
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_attendance/report/bymonth.py b/addons/hr_attendance/report/attendance_by_month.py
similarity index 96%
rename from addons/hr_attendance/report/bymonth.py
rename to addons/hr_attendance/report/attendance_by_month.py
index fc646e089ac..0710d30faaf 100644
--- a/addons/hr_attendance/report/bymonth.py
+++ b/addons/hr_attendance/report/attendance_by_month.py
@@ -40,12 +40,13 @@ def hour2str(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
if context is None:
context = {}
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
user_xml = ['%s' % month2name[month.month], '%s' % month.year]
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['name'])[0]
stop, days_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/report/timesheet.py b/addons/hr_attendance/report/timesheet.py
index 8b5bbdff5e7..94dc1edcbbd 100644
--- a/addons/hr_attendance/report/timesheet.py
+++ b/addons/hr_attendance/report/timesheet.py
@@ -37,6 +37,7 @@ def to_hour(h):
class report_custom(report_rml):
def create_xml(self, cr, uid, ids, datas, context=None):
+ obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
@@ -47,7 +48,7 @@ class report_custom(report_rml):
user_xml = []
for employee_id in ids:
- emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
+ emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
monday, n_monday = first_monday, first_monday + one_week
stop, week_xml = False, []
user_repr = '''
diff --git a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
index 6518202ac36..b7a9a8afab5 100644
--- a/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_bymonth_view.xml
@@ -23,7 +23,7 @@
- Print Timesheet by month
+ Print Attendance by month
ir.actions.act_window
hr.attendance.month
form
@@ -34,7 +34,7 @@
- Print Timesheet by month
+ Print Attendance by month
client_print_multi
action
diff --git a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
index 1e536334675..ed7ff7a8bc7 100644
--- a/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
+++ b/addons/hr_attendance/wizard/hr_attendance_byweek_view.xml
@@ -2,7 +2,7 @@
-
+
diff --git a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
index b895ace8a60..98c48e3e124 100644
--- a/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
+++ b/addons/hr_timesheet/wizard/hr_timesheet_print_employee_view.xml
@@ -69,10 +69,10 @@
new
-
+ groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/-->
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index 2eb352974d7..65b842bb592 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -718,9 +718,9 @@ class res_company(osv.osv):
_inherit = 'res.company'
_columns = {
'timesheet_range': fields.selection(
- [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timeshet range'),
- 'timesheet_max_difference': fields.float('Timesheet allowed difference',
- help="Allowed difference between the sign in/out and the timesheet " \
+ [('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timesheet range'),
+ 'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
+ help="Allowed difference in hours between the sign in/out and the timesheet " \
"computation for one sheet. Set this to 0 if you do not want any control."),
}
_defaults = {
diff --git a/addons/knowledge/knowledge_installer.xml b/addons/knowledge/knowledge_installer.xml
index e1da251fb9a..fb5d14e6e75 100644
--- a/addons/knowledge/knowledge_installer.xml
+++ b/addons/knowledge/knowledge_installer.xml
@@ -20,7 +20,7 @@
- From this screen, you can select various OpenERP applications which will help employees store information, distribute it and share it with one another.
+ You can select various OpenERP applications which will help you and your employees to store and share information.
diff --git a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
index dbef21389bf..a0e080def06 100644
--- a/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
+++ b/addons/l10n_ch_chart_c2c_pcg/wizard/config.py
@@ -62,14 +62,12 @@ class Tax_template(osv.osv_memory):
}
def _on_change(self, cr, uid, id, tax, vals):
- if account:
- self.pool.get('account.tax.template').write(
- cr, uid, tax, vals=vals)
+ if tax:
+ self.pool.get('account.tax.template').write(cr, uid, tax, vals=vals)
return {}
- def on_change_collected(self, cr, uid, id, tax, account):
- return self._on_change(
- cr, uid, ids, tax, vals={'account_collected_id': account})
+ def on_change_collected(self, cr, uid, ids, tax, account):
+ return self._on_change(cr, uid, ids, tax, vals={'account_collected_id': account})
def on_change_paid(self, cr, uid, id, tax, account):
return self._on_change(
diff --git a/addons/mrp/mrp_installer.xml b/addons/mrp/mrp_installer.xml
index c3929df10af..73fc81af73d 100644
--- a/addons/mrp/mrp_installer.xml
+++ b/addons/mrp/mrp_installer.xml
@@ -16,7 +16,7 @@
- After having installed the core manufacturing application, you can extend it with a few more depending on the needs of your organization
+ After having installed the core manufacturing application, you can extend it depending on the needs of your MRP's organization
diff --git a/addons/project/board_project_view.xml b/addons/project/board_project_view.xml
index 6258c85f689..5c216e1eaad 100644
--- a/addons/project/board_project_view.xml
+++ b/addons/project/board_project_view.xml
@@ -23,7 +23,7 @@
-
+
My Open Tasks
project.task
@@ -32,16 +32,16 @@
[('user_id','=',uid),('state','=','open')]
-
-
- My Pending Tasks
+
+
+ My Delegated Tasks
project.task
form
tree,form
- [('user_id','=',uid),('state','=','pending')]
-
+ ['|',('parent_ids.user_id','=',uid),('user_id','=',uid)]
+
-
+
My Task's Deadlines
project.task
@@ -87,7 +87,7 @@
-
+
@@ -95,7 +95,7 @@
-
+
@@ -112,20 +112,20 @@
menu
-
+
-
+
-
+
diff --git a/addons/project/project_installer.xml b/addons/project/project_installer.xml
index c989ab50aab..6c760bc65d1 100644
--- a/addons/project/project_installer.xml
+++ b/addons/project/project_installer.xml
@@ -1,6 +1,6 @@
-
+
project.installer.view
project.installer
@@ -18,7 +18,7 @@
- Various OpenERP applications are available to bring your project management to the next levels of control and flexibility.
+ Various OpenERP applications are available to manage your projects with different level of control and flexibility.
Configure
@@ -65,6 +65,6 @@
-
+
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 0c9b2f671ce..45d0e1e18bf 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -571,7 +571,7 @@
-
+
diff --git a/addons/project/report/project_report.py b/addons/project/report/project_report.py
index a3ecf0f4ba1..e217619358c 100644
--- a/addons/project/report/project_report.py
+++ b/addons/project/report/project_report.py
@@ -122,27 +122,31 @@ class report_project_task_user(osv.osv):
report_project_task_user()
#This class is generated for project deshboard purpose
-class project_vs_remaining_hours(osv.osv):
- _name = "project.vs.remaining.hours"
- _description = " Project vs Remaining hours"
+class project_vs_hours(osv.osv):
+ _name = "project.vs.hours"
+ _description = " Project vs hours"
_auto = False
_columns = {
'project': fields.char('Project', size=128, required=True),
'remaining_hours': fields.float('Remaining Hours', readonly=True),
+ 'planned_hours': fields.float('Planned Hours', readonly=True),
+ 'total_hours': fields.float('Total Hours', readonly=True),
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True, readonly=True)
}
_order = 'project desc'
def init(self, cr):
- tools.sql.drop_view_if_exists(cr, 'project_vs_remaining_hours')
+ tools.sql.drop_view_if_exists(cr, 'project_vs_hours')
cr.execute("""
- CREATE or REPLACE view project_vs_remaining_hours as (
+ CREATE or REPLACE view project_vs_hours as (
select
min(pt.id) as id,
aaa.user_id as uid,
aaa.name as project,
aaa.state,
- sum(pt.remaining_hours) as remaining_hours
+ sum(pt.remaining_hours) as remaining_hours,
+ sum(pt.planned_hours) as planned_hours,
+ sum(pt.total_hours) as total_hours
FROM project_project as pp,
account_analytic_account as aaa,
project_task as pt
@@ -154,7 +158,9 @@ class project_vs_remaining_hours(osv.osv):
pur.uid as uid,
aaa.name as project,
aaa.state,
- sum(pt.remaining_hours) as remaining_hours
+ sum(pt.remaining_hours) as remaining_hours,
+ sum(pt.planned_hours) as planned_hours,
+ sum(pt.total_hours) as total_hours
FROM project_project as pp,
project_user_rel as pur,
account_analytic_account as aaa,
@@ -164,7 +170,7 @@ class project_vs_remaining_hours(osv.osv):
)
""")
-project_vs_remaining_hours()
+project_vs_hours()
class task_by_days(osv.osv):
_name = "task.by.days"
diff --git a/addons/project/report/project_report_view.xml b/addons/project/report/project_report_view.xml
index f22875cee4d..09e63f43b88 100644
--- a/addons/project/report/project_report_view.xml
+++ b/addons/project/report/project_report_view.xml
@@ -1,7 +1,7 @@
-
+
@@ -91,7 +91,7 @@
+ help="My Projects" domain="[('project_id','=',uid)]"/>
@@ -151,7 +151,7 @@
project.vs.remaining.hour.tree
- project.vs.remaining.hours
+ project.vs.hours
tree
@@ -164,7 +164,7 @@
project.vs.remaining.hour.graph
- project.vs.remaining.hours
+ project.vs.hours
graph
@@ -177,13 +177,25 @@
Project and remaining hours
- project.vs.remaining.hours
+ project.vs.hours
form
graph,tree
- [('uid','=',uid)]
+ [('uid','=',uid),('state','=','open')]
+
+
+ tree
+
+
+
+
+
+ graph
+
+
+
task.by.days.tree
@@ -222,38 +234,51 @@
-
- task.by.days.vs.planned.hours.tree
- report.project.task.user
+
+ project.vs.planned.total.hour.tree
+ project.vs.hours
tree
-
-
-
+
+
+
+
-
- task.by.days.vs.planned.hours.graph
- report.project.task.user
+
+ project.vs.planned.total.hour.graph
+ project.vs.hours
graph
-
-
-
-
+
+
+
+
-
- Task By Days vs Planned Hours
- report.project.task.user
+
+ My projects: Planned Vs Total hours
+ project.vs.hours
form
graph,tree
-
+
+
+
+ tree
+
+
+
+
+
+ graph
+
+
+
diff --git a/addons/project/security/ir.model.access.csv b/addons/project/security/ir.model.access.csv
index 99ff1ea3629..b418b0a0dbf 100644
--- a/addons/project/security/ir.model.access.csv
+++ b/addons/project/security/ir.model.access.csv
@@ -11,7 +11,7 @@
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
"access_project_message","project.message","model_project_message","project.group_project_user",1,1,1,1
"access_report_project_task_user","report.project.task.user","model_report_project_task_user","project.group_project_manager",1,0,0,0
-"access_project_vs_remaining_hours","project.vs.remaining.hours","model_project_vs_remaining_hours","project.group_project_user",1,1,1,1
+"access_project_vs_hours","project.vs.hours","model_project_vs_hours","project.group_project_user",1,1,1,1
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml
index 6071e644f34..8afe7de090c 100644
--- a/addons/project/security/project_security.xml
+++ b/addons/project/security/project_security.xml
@@ -36,7 +36,7 @@
Tasks According to User and Project
- ['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','=',user.id),('project_id.user_id','=',user.id)]
+ ['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','in', [user.id]),('project_id.user_id','=',user.id)]
diff --git a/addons/project_caldav/project_caldav.py b/addons/project_caldav/project_caldav.py
index b6a87516194..65e61c6e4cd 100644
--- a/addons/project_caldav/project_caldav.py
+++ b/addons/project_caldav/project_caldav.py
@@ -30,7 +30,13 @@ class project_task(osv.osv):
'create_date': fields.datetime('Create Date'),
'attendee_ids': fields.many2many('calendar.attendee', \
'task_attendee_rel', 'task_id', 'attendee_id', 'Attendees'),
- }
+ '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\'.'),
+ }
+ _defaults = {
+ 'state': 'draft',
+ }
def import_cal(self, cr, uid, data, data_id=None, context=None):
todo_obj = self.pool.get('basic.calendar.todo')
@@ -43,7 +49,7 @@ class project_task(osv.osv):
ids = []
for val in vals:
obj_tm = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.project_time_mode_id
- if not val.has_key('planned_hours'):
+ if not val.get('planned_hours', False):
# 'Computes duration' in days
plan = 0.0
if val.get('date') and val.get('date_deadline'):
diff --git a/addons/project_caldav/project_caldav_data.xml b/addons/project_caldav/project_caldav_data.xml
index a6b7ef870f4..e5e2ce0578d 100644
--- a/addons/project_caldav/project_caldav_data.xml
+++ b/addons/project_caldav/project_caldav_data.xml
@@ -3,7 +3,7 @@
- Todo
+ Tasks
vtodo
diff --git a/addons/project_caldav/project_caldav_view.xml b/addons/project_caldav/project_caldav_view.xml
index 3055fee85bc..01133108b6d 100644
--- a/addons/project_caldav/project_caldav_view.xml
+++ b/addons/project_caldav/project_caldav_view.xml
@@ -17,7 +17,9 @@
-
+
+
+
diff --git a/addons/project_gtd/project_gtd.py b/addons/project_gtd/project_gtd.py
index c2222fdb5d6..002b2af4e1b 100644
--- a/addons/project_gtd/project_gtd.py
+++ b/addons/project_gtd/project_gtd.py
@@ -174,7 +174,7 @@ class project_task(osv.osv):
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
search_extended ='''''' % (len(tt)+7,_('Getting Things Done'))
search_extended += '''''' % (_('Inbox'),)
- search_extended += '''''' % (_('All'),)
+ search_extended += '''''' % (_('Editable'),)
search_extended += ''''''
for time in tt:
if time.icon:
diff --git a/addons/purchase/wizard/purchase_installer.py b/addons/purchase/wizard/purchase_installer.py
index 3e195935f3a..2c0a24d0f65 100644
--- a/addons/purchase/wizard/purchase_installer.py
+++ b/addons/purchase/wizard/purchase_installer.py
@@ -26,6 +26,7 @@ class purchase_installer(osv.osv_memory):
_columns = {
'purchase_requisition':fields.boolean('Purchase Requisition',help="Manages your Purchase Requisition and allow you to easily keep track and manage all your purchase orders."),
+ 'purchase_analytic_plans': fields.boolean('Purchase Analytic Plans',help="Manages analytic distribution and purchase orders.")
}
purchase_installer()
diff --git a/addons/purchase/wizard/purchase_installer.xml b/addons/purchase/wizard/purchase_installer.xml
index 635297d0f21..dc10beacd98 100644
--- a/addons/purchase/wizard/purchase_installer.xml
+++ b/addons/purchase/wizard/purchase_installer.xml
@@ -20,13 +20,14 @@
- After having installed the core purchase application, you can extend it with more modules on needs of your organization
+ In this page, you can extend your purchase system with purchase requisition facility and analytic distribution of purchase orders.
Configure
+
diff --git a/addons/report_designer/installer.py b/addons/report_designer/installer.py
index 2eb061d1344..1dd9797a68b 100644
--- a/addons/report_designer/installer.py
+++ b/addons/report_designer/installer.py
@@ -26,9 +26,17 @@ class report_designer_installer(osv.osv_memory):
_columns = {
# Reporting
- 'base_report_designer':fields.boolean('OpenOffice Report Designer'),
- 'base_report_creator':fields.boolean('Query Builder'),
- 'olap':fields.boolean('Business Intelligence Report'),
+ 'base_report_designer':fields.boolean('OpenOffice Report Designer',help="This module adds wizards to import/export .SXW report that "
+ "you can modify in OpenOffice.Once you have modified it you can "
+ "upload the report using the same wizard."),
+ 'base_report_creator':fields.boolean('Query Builder',help="his module allows you to create any statistic "
+ "reports on several objects. It's a SQL query builder and browser for and users. "
+ "After installation, it adds a menu to define custom report in the Dashboard menu."),
+ 'olap':fields.boolean('Business Intelligence Report',help="Olap module is used to install BI module in client. Olap provides Online "
+ "Analytical Process with the mdx query. BI provides Cube Browsing and Cube Designing. "
+ "After installation you will get Cube Browser and Cube Desinger in Reporting Menu. "
+ "Cube Browser is used to generate the reports with table view (mdx view) of mdx query "
+ "and Cube designer is used to make cubes in BI."),
}
report_designer_installer()
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index e93bcdd34ad..172fe1226ef 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -233,7 +233,7 @@ class sale_order(osv.osv):
'incoterm': fields.selection(_incoterm_get, 'Incoterm', size=3, help="Incoterm which stands for 'International Commercial terms' implies its a series of sales terms which are used in the commercial transaction"),
'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')],
- 'Picking Policy', required=True, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
+ 'Picking Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
'order_policy': fields.selection([
('prepaid', 'Payment Before Delivery'),
('manual', 'Shipping & Manual Invoice'),
@@ -785,8 +785,8 @@ class sale_order_line(osv.osv):
res = {}
context = context or {}
for line in self.browse(cr, uid, ids, context=context):
- price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.0)
- taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty)
+ price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
+ taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id)
cur = line.order_id.pricelist_id.currency_id
res[line.id] = cur_obj.round(cr, uid, cur, taxes['total'])
return res
@@ -828,7 +828,7 @@ class sale_order_line(osv.osv):
'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'),
'notes': fields.text('Notes'),
- 'th_weight': fields.float('Weight'),
+ 'th_weight': fields.float('Weight', readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True,
help=' * The \'Draft\' state is set automatically when sale order in draft state. \
\n* The \'Confirmed\' state is set automatically when sale order in confirm state. \
@@ -837,7 +837,7 @@ class sale_order_line(osv.osv):
\n* The \'Cancelled\' state is set automatically when user cancel sale order.'),
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),
- 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
+ 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
}
_order = 'sequence, id'
_defaults = {
@@ -852,9 +852,17 @@ class sale_order_line(osv.osv):
'product_packaging': False
}
+ def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ context.update({'active_ids' : ids,'active_id' : ids})
+ self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
+ return True
+
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None:
context = {}
+
def _get_line_qty(line):
if (line.order_id.invoice_quantity=='order') or not line.procurement_id:
if line.product_uos:
@@ -919,7 +927,6 @@ class sale_order_line(osv.osv):
sales[line.order_id.id] = True
create_ids.append(inv_id)
-
# Trigger workflow events
wf_service = netsvc.LocalService("workflow")
for sid in sales.keys():
@@ -932,6 +939,10 @@ class sale_order_line(osv.osv):
for line in self.browse(cr, uid, ids, context=context):
if line.invoiced:
raise osv.except_osv(_('Invalid action !'), _('You cannot cancel a sale order line that has already been invoiced !'))
+# if line.order_id.picking_ids:
+# raise osv.except_osv(
+# _('Could not cancel sale order line!'),
+# _('You must first cancel stock move attached to this sale order line.'))
message = _('Sale order line') + " '" + line.name + "' "+_("is cancelled")
self.log(cr, uid, id, message)
return self.write(cr, uid, ids, {'state': 'cancel'})
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 14aa80659f9..54474a81633 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -165,10 +165,10 @@
@@ -396,20 +396,24 @@
-
-
+
+
+
-
+ icon="gtk-jump-to"
+ attrs="{'invisible': [('invoiced', '=', 0)]}"/>
@@ -492,6 +496,7 @@
form
tree,form,graph
+ {"search_default_uninvoiced":1}
diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml
index 9884aa1f021..b3f121b8c40 100644
--- a/addons/sale/wizard/sale_make_invoice.xml
+++ b/addons/sale/wizard/sale_make_invoice.xml
@@ -1,30 +1,39 @@
-
+
Create invoices
sale.make.invoice
form
-
+
-
+
-
+ Make Invoices
+ ir.actions.act_window
+ sale.make.invoice
+ form
+ form
+ new
+
+
+
+ id="action_view_sale_order_make_invoice"/>
diff --git a/addons/sale_crm/wizard/crm_make_sale.py b/addons/sale_crm/wizard/crm_make_sale.py
index e54d5d2a374..683d050b454 100644
--- a/addons/sale_crm/wizard/crm_make_sale.py
+++ b/addons/sale_crm/wizard/crm_make_sale.py
@@ -22,6 +22,8 @@
from osv import fields, osv
from tools.translate import _
from mx.DateTime import now
+import time
+import decimal_precision as dp
class crm_make_sale(osv.osv_memory):
""" Make sale order for crm """
@@ -100,7 +102,6 @@ class crm_make_sale(osv.osv_memory):
vals = {
'origin': 'Opportunity:%s' % str(case.id),
'section_id': case.section_id and case.section_id.id or False,
- 'picking_policy': make.picking_policy,
'shop_id': make.shop_id.id,
'partner_id': partner_id,
'pricelist_id': pricelist,
@@ -119,14 +120,16 @@ class crm_make_sale(osv.osv_memory):
if make.analytic_account.id:
vals['project_id'] = make.analytic_account.id
new_id = sale_obj.create(cr, uid, vals)
- for product_id in make.product_ids:
+ for line in make.sale_order_line:
value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
- product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
- value['product_id'] = product_id.id
+ line.product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
+ value['product_id'] =line.product_id.id
value['order_id'] = new_id
- value['tax_id'] = [(6,0,value['tax_id'])]
+ value['tax_id'] = [(6,0,line['tax_id'])]
+ value['product_uom_qty']=line.product_uom_qty
+ value['discount']=line.discount
+ value['product_uom']=line.product_uom.id
sale_line_obj.create(cr, uid, value)
-
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
new_ids.append(new_id)
message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Sales Quotation.")
@@ -163,10 +166,7 @@ class crm_make_sale(osv.osv_memory):
_columns = {
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
'partner_id': fields.many2one('res.partner', 'Customer', required=True, help='Use this partner if there is no partner on the Opportunity'),
- 'picking_policy': fields.selection([('direct','Partial Delivery'),
- ('one','Complete Delivery')], 'Picking Policy', required=True),
- 'product_ids': fields.many2many('product.product', 'product_sale_rel',\
- 'sale_id', 'product_id', 'Products'),
+ 'sale_order_line': fields.one2many('sale.order.make.line', 'order_line', 'Product Line', readonly=True, states={'draft': [('readonly', False)]}),
'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
'close': fields.boolean('Close Case', help='Check this to close the case after having created the sale order.'),
}
@@ -174,6 +174,160 @@ class crm_make_sale(osv.osv_memory):
'partner_id': _selectPartner,
'close': 1
}
+
crm_make_sale()
+
+class sale_order_make_line(osv.osv_memory):
+
+
+ def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
+ uom=False, qty_uos=0, uos=False, name='', partner_id=False,
+ lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
+ if not partner_id:
+ raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
+ warning = {}
+ product_uom_obj = self.pool.get('product.uom')
+ partner_obj = self.pool.get('res.partner')
+ product_obj = self.pool.get('product.product')
+ if partner_id:
+ lang = partner_obj.browse(cr, uid, partner_id).lang
+ context = {'lang': lang, 'partner_id': partner_id}
+
+ if not product:
+ return {'value': {'th_weight': 0, 'product_packaging': False,
+ 'product_uos_qty': qty}, 'domain': {'product_uom': [],
+ 'product_uos': []}}
+
+ if not date_order:
+ date_order = time.strftime('%Y-%m-%d')
+
+ result = {}
+ product_obj = product_obj.browse(cr, uid, product, context=context)
+ if not packaging and product_obj.packaging:
+ packaging = product_obj.packaging[0].id
+ result['product_packaging'] = packaging
+
+ if packaging:
+ default_uom = product_obj.uom_id and product_obj.uom_id.id
+ pack = self.pool.get('product.packaging').browse(cr, uid, packaging, context=context)
+ q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom)
+# qty = qty - qty % q + q
+ if qty and (q and not (qty % q) == 0):
+ ean = pack.ean
+ qty_pack = pack.qty
+ type_ul = pack.ul
+ warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
+ warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
+ warning = {
+ 'title': _('Picking Information !'),
+ 'message': warn_msg
+ }
+ result['product_uom_qty'] = qty
+
+ uom2 = False
+ if uom:
+ uom2 = product_uom_obj.browse(cr, uid, uom)
+ if product_obj.uom_id.category_id.id != uom2.category_id.id:
+ uom = False
+
+ if uos:
+ if product_obj.uos_id:
+ uos2 = product_uom_obj.browse(cr, uid, uos)
+ if product_obj.uos_id.category_id.id != uos2.category_id.id:
+ uos = False
+ else:
+ uos = False
+ if product_obj.description_sale:
+ result['notes'] = product_obj.description_sale
+ fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
+ if update_tax: #The quantity only have changed
+ result['delay'] = (product_obj.sale_delay or 0.0)
+ partner = partner_obj.browse(cr, uid, partner_id)
+ result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
+ result.update({'type': product_obj.procure_method})
+
+ if not flag:
+ result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]
+ domain = {}
+ if (not uom) and (not uos):
+ result['product_uom'] = product_obj.uom_id.id
+ if product_obj.uos_id:
+ result['product_uos'] = product_obj.uos_id.id
+ result['product_uos_qty'] = qty * product_obj.uos_coeff
+ uos_category_id = product_obj.uos_id.category_id.id
+ else:
+ result['product_uos'] = False
+ result['product_uos_qty'] = qty
+ uos_category_id = False
+ domain = {'product_uom':
+ [('category_id', '=', product_obj.uom_id.category_id.id)],
+ 'product_uos':
+ [('category_id', '=', uos_category_id)]}
+
+ elif uos and not uom: # only happens if uom is False
+ result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id
+ result['product_uom_qty'] = qty_uos / product_obj.uos_coeff
+ elif uom: # whether uos is set or not
+ default_uom = product_obj.uom_id and product_obj.uom_id.id
+ q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
+ if product_obj.uos_id:
+ result['product_uos'] = product_obj.uos_id.id
+ result['product_uos_qty'] = qty * product_obj.uos_coeff
+ else:
+ result['product_uos'] = False
+ result['product_uos_qty'] = qty
+
+ if not uom2:
+ uom2 = product_obj.uom_id
+ return {'value': result, 'domain': domain, 'warning': warning}
+
+ def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
+ uom=False, qty_uos=0, uos=False, name='', partner_id=False,
+ lang=False, update_tax=True, date_order=False):
+ res = self.product_id_change(cursor, user, ids, pricelist, product,
+ qty=qty, uom=uom, qty_uos=qty_uos, uos=uos, name=name,
+ partner_id=partner_id, lang=lang, update_tax=update_tax,
+ date_order=date_order)
+ if 'product_uom' in res['value']:
+ del res['value']['product_uom']
+ if not uom:
+ res['value']['price_unit'] = 0.0
+ return res
+
+ _name = 'sale.order.make.line'
+ _description = 'Sale Order Line'
+ _columns = {
+ 'order_line': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
+ 'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
+ 'name': fields.char('Description', size=256, required=True, select=True, readonly=True, ),
+ 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
+ 'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, ),
+ 'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
+ 'procurement_id': fields.many2one('procurement.order', 'Procurement'),
+ 'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, ),
+ 'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft':[('readonly',False)]}),
+ 'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft':[('readonly',False)]}),
+ 'product_uos': fields.many2one('product.uom', 'Product UoS'),
+ 'product_packaging': fields.many2one('product.packaging', 'Packaging'),
+ 'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
+ 'notes': fields.text('Notes'),
+ }
+ _order = 'sequence, id'
+ _defaults = {
+ 'discount': 0.0,
+ 'delay': 0.0,
+ 'product_uom_qty': 1,
+ 'product_uos_qty': 1,
+ 'type': 'make_to_stock',
+ 'product_packaging': False
+ }
+
+sale_order_make_line()
+
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/wizard/crm_make_sale_view.xml b/addons/sale_crm/wizard/crm_make_sale_view.xml
index a1da3ed1fec..17e743987f0 100644
--- a/addons/sale_crm/wizard/crm_make_sale_view.xml
+++ b/addons/sale_crm/wizard/crm_make_sale_view.xml
@@ -9,21 +9,66 @@
form
diff --git a/addons/scrum/scrum.py b/addons/scrum/scrum.py
index 673c47850d6..0eb23916bc1 100644
--- a/addons/scrum/scrum.py
+++ b/addons/scrum/scrum.py
@@ -248,7 +248,7 @@ class scrum_product_backlog(osv.osv):
'note' : fields.text('Note'),
'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', 'Responsible'),
+ 'user_id': fields.many2one('res.users', 'Author'),
'sprint_id': fields.many2one('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'),
diff --git a/addons/scrum/scrum_view.xml b/addons/scrum/scrum_view.xml
index db4d5d7af81..86f92981fed 100644
--- a/addons/scrum/scrum_view.xml
+++ b/addons/scrum/scrum_view.xml
@@ -134,7 +134,7 @@
icon="terp-check"
string="Current"
name="current"
- domain="['|','&',('sprint_id.date_start','<=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','>=',time.strftime('%%Y-%%m-%%d')), ('state','in',['draft','open'])]"
+ domain="['|','&',('sprint_id.date_start','<=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','>=',time.strftime('%%Y-%%m-%%d')), ('state','in',['draft','open','pending'])]"
help="Current Backlogs"/>
@@ -156,7 +156,8 @@
+ domain="[('user_id','=',uid)]"
+ help="My Backlogs"/>
@@ -178,7 +179,7 @@
Product Backlogs
scrum.product.backlog
form
- {"search_default_user_id":uid, 'search_default_current': 1}
+ {'search_default_current': 1}
| |