From ecbc6996e7428c7f570cb3c06ef5ee85bdd05965 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 22 Feb 2012 18:36:38 +0530
Subject: [PATCH 001/126] [IMP]hr_holidays: Improved button name and state and
redonly in confirm and draft
bzr revid: mma@tinyerp.com-20120222130638-buhl4qhdto4gpm3j
---
addons/hr_holidays/hr_holidays.py | 18 +++++++++---------
addons/hr_holidays/hr_holidays_view.xml | 22 +++++++++++-----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 3bb7a8e4982..3dc8ae0467c 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -111,25 +111,25 @@ class hr_holidays(osv.osv):
_columns = {
'name': fields.char('Description', required=True, size=64),
- 'state': fields.selection([('draft', 'New'), ('confirm', 'Waiting Approval'), ('refuse', 'Refused'),
- ('validate1', 'Waiting Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
+ 'state': fields.selection([('draft', 'New'), ('confirm', 'To Approve'), ('refuse', 'Refused'),
+ ('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
\nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\
\nThe state is \'Refused\', when holiday request is refused by manager.\
\nThe state is \'Approved\', when holiday request is approved by manager.'),
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
- 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}, select=True),
- 'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}),
- 'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
- 'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
+ 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, select=True),
+ 'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
+ 'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
+ 'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'),
#'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
#'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}),
'manager_id': fields.many2one('hr.employee', 'First Approval', invisible=False, readonly=True, help='This area is automatically filled by the user who validate the leave'),
- 'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)]}),
- 'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)]}),
+ 'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
+ 'number_of_days_temp': fields.float('Number of Days', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
'case_id': fields.many2one('crm.meeting', 'Meeting'),
- 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
+ 'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 22d4d6e567d..302ca4fe6ee 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -65,9 +65,9 @@
@@ -316,7 +316,11 @@
-
+
+
+
+
+
@@ -338,6 +342,8 @@
+
+
From fc28796980955b346e3f8deed09350647b6e827f Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Thu, 23 Feb 2012 18:42:52 +0530
Subject: [PATCH 003/126] [IMP] account, account_voucher : Improvedworkflow
state name, button name and also the position.
bzr revid: mdi@tinyerp.com-20120223131252-b3x0zsbpczkadurz
---
addons/account/account_invoice.py | 2 +-
addons/account/account_invoice_view.xml | 4 ++--
addons/account_voucher/account_voucher_pay_invoice.xml | 2 +-
addons/account_voucher/account_voucher_view.xml | 2 +-
addons/account_voucher/voucher_payment_receipt_view.xml | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 5e5ac5f482b..63191795ea3 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -202,7 +202,7 @@ class account_invoice(osv.osv):
('draft','Draft'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
- ('open','Open'),
+ ('open','Validate'),
('paid','Paid'),
('cancel','Cancelled')
],'State', select=True, readonly=True,
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 59977c252f9..ccaa033bea3 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -207,11 +207,11 @@
+
+
-
-
diff --git a/addons/account_voucher/account_voucher_pay_invoice.xml b/addons/account_voucher/account_voucher_pay_invoice.xml
index 345241cb4ee..7a6aad55516 100644
--- a/addons/account_voucher/account_voucher_pay_invoice.xml
+++ b/addons/account_voucher/account_voucher_pay_invoice.xml
@@ -19,7 +19,7 @@
diff --git a/addons/account_voucher/account_voucher_view.xml b/addons/account_voucher/account_voucher_view.xml
index 53fdaef8c1f..c0061f15cd3 100644
--- a/addons/account_voucher/account_voucher_view.xml
+++ b/addons/account_voucher/account_voucher_view.xml
@@ -103,9 +103,9 @@
+
-
diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml
index 1a8d3680f5f..e7c9f4f4616 100644
--- a/addons/account_voucher/voucher_payment_receipt_view.xml
+++ b/addons/account_voucher/voucher_payment_receipt_view.xml
@@ -251,10 +251,10 @@
-
-
-
+
+
+
From 71e4d0a81ec28c8545ddc07a398e4aff5a0abcad Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Fri, 24 Feb 2012 11:23:51 +0530
Subject: [PATCH 004/126] [IMP]hr_evaluation: Addded Button in search view
which display next month deadline record of draft state
bzr revid: mma@tinyerp.com-20120224055351-jse9ui8rr72lr321
---
addons/hr_evaluation/hr_evaluation_view.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index a0ac133d495..8a2aebcacdc 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -259,6 +259,9 @@
+
@@ -282,6 +285,7 @@
form
tree,form,graph
+ {"search_default_next_month":1}
Each employee may be assigned an Appraisal Plan. Such a plan defines the frequency and the way you manage your periodic personnel evaluation. You will be able to define steps and attach interviews to each step. OpenERP manages all kind of evaluations: bottom-up, top-down, self-evaluation and final evaluation by the manager.
From 16afc71f02b352f1c2ae817cf33c3ddb6c4558ae Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 27 Feb 2012 14:12:25 +0530
Subject: [PATCH 005/126] [IMP]hr_evaluation: Removed print & set to draft
button, Removed progress bar field, give access right, hide a group and
notebook and removed a demo data
bzr revid: mma@tinyerp.com-20120227084225-8buhhzz5lg7zftv4
---
addons/hr_evaluation/hr_evaluation.py | 6 ---
addons/hr_evaluation/hr_evaluation_data.xml | 43 +------------------
addons/hr_evaluation/hr_evaluation_view.xml | 12 ++----
.../report/hr_evaluation_report.py | 3 --
.../report/hr_evaluation_report_view.xml | 1 -
.../security/ir.model.access.csv | 2 +-
6 files changed, 7 insertions(+), 60 deletions(-)
diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py
index 6e1983d7a11..27b36341284 100644
--- a/addons/hr_evaluation/hr_evaluation.py
+++ b/addons/hr_evaluation/hr_evaluation.py
@@ -167,7 +167,6 @@ class hr_evaluation(osv.osv):
('cancel','Cancelled'),
], 'State', required=True, readonly=True),
'date_close': fields.date('Ending Date', select=True),
- 'progress': fields.float("Progress"),
}
_defaults = {
'date': lambda *a: (parser.parse(datetime.now().strftime('%Y-%m-%d')) + relativedelta(months =+ 1)).strftime('%Y-%m-%d'),
@@ -245,7 +244,6 @@ class hr_evaluation(osv.osv):
return True
def button_done(self,cr, uid, ids, context=None):
- self.write(cr, uid, ids,{'progress': 1 * 100}, context=context)
self.write(cr, uid, ids,{'state':'done', 'date_close': time.strftime('%Y-%m-%d')}, context=context)
return True
@@ -312,7 +310,6 @@ class hr_evaluation_interview(osv.osv):
for id in self.browse(cr, uid, ids, context=context):
flag = False
wating_id = 0
- tot_done_req = 1
if not id.evaluation_id.id:
raise osv.except_osv(_('Warning !'),_("You cannot start evaluation without Appraisal."))
records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
@@ -322,11 +319,8 @@ class hr_evaluation_interview(osv.osv):
continue
if child.state != "done":
flag = True
- else:
- tot_done_req += 1
if not flag and wating_id:
self.survey_req_waiting_answer(cr, uid, [wating_id], context=context)
- hr_eval_obj.write(cr, uid, [id.evaluation_id.id], {'progress': tot_done_req * 100 / len(records)}, context=context)
self.write(cr, uid, ids, { 'state': 'done'}, context=context)
return True
diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml
index ec4b46f8a62..bf482d2fcd7 100644
--- a/addons/hr_evaluation/hr_evaluation_data.xml
+++ b/addons/hr_evaluation/hr_evaluation_data.xml
@@ -2,7 +2,7 @@
- Employee Appraisal
+ Self Appraisal
20
@@ -1157,37 +1157,11 @@ Once the form had been filled, the employee send it to his supervisor.
-
-
- Send to Subordinates
-
-
-
- bottom-up
-
-
-
-
-
-
-
-
- Send to Managers
-
-
-
- top-down
-
-
-
-
-
-
Send to Employee
-
+
self
@@ -1196,19 +1170,6 @@ Once the form had been filled, the employee send it to his supervisor.
-
-
- Final Interview With Manager
-
-
-
- final
-
-
-
-
-
-
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 8a2aebcacdc..e1dd5e0b96f 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -160,15 +160,14 @@
-
-
+
-
+
-
+
-
+
@@ -303,7 +302,6 @@
-
@@ -324,7 +322,6 @@
-
@@ -342,7 +339,6 @@
-
diff --git a/addons/hr_evaluation/report/hr_evaluation_report.py b/addons/hr_evaluation/report/hr_evaluation_report.py
index bd9e5874d10..8e931b9f041 100644
--- a/addons/hr_evaluation/report/hr_evaluation_report.py
+++ b/addons/hr_evaluation/report/hr_evaluation_report.py
@@ -31,7 +31,6 @@ class hr_evaluation_report(osv.osv):
'create_date': fields.date('Create Date', readonly=True),
'delay_date':fields.float('Delay to Start', digits=(16,2),readonly=True),
'overpass_delay':fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
- 'progress_bar' : fields.float("Progress"),
'day': fields.char('Day', size=128, readonly=True),
'deadline': fields.date("Deadline", readonly=True),
'request_id': fields.many2one('survey.request', 'Request_id', readonly=True),
@@ -77,7 +76,6 @@ class hr_evaluation_report(osv.osv):
to_char(s.create_date, 'MM') as month,
count(l.*) as nbr,
s.state,
- s.progress as progress_bar,
avg(extract('epoch' from age(s.create_date,CURRENT_DATE)))/(3600*24) as delay_date,
avg(extract('epoch' from age(s.date,CURRENT_DATE)))/(3600*24) as overpass_delay
from
@@ -96,7 +94,6 @@ class hr_evaluation_report(osv.osv):
s.date_close,
l.request_id,
s.rating,
- s.progress,
s.plan_id
)
""")
diff --git a/addons/hr_evaluation/report/hr_evaluation_report_view.xml b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
index c70c1d27923..2950d704e89 100644
--- a/addons/hr_evaluation/report/hr_evaluation_report_view.xml
+++ b/addons/hr_evaluation/report/hr_evaluation_report_view.xml
@@ -20,7 +20,6 @@
-
diff --git a/addons/hr_evaluation/security/ir.model.access.csv b/addons/hr_evaluation/security/ir.model.access.csv
index e3a79b55a45..f9b8897eb01 100644
--- a/addons/hr_evaluation/security/ir.model.access.csv
+++ b/addons/hr_evaluation/security/ir.model.access.csv
@@ -25,7 +25,7 @@ access_survey_page_hr_user,survey.page.hr.user,survey.model_survey_page,base.gro
access_survey_response_hr_user,survey.response.hr.user,survey.model_survey_response,base.group_hr_user,1,1,1,0
access_survey_history_hr_user,survey.history.hr.user,survey.model_survey_history,base.group_hr_user,1,1,1,0
access_survey_request_hr_user,survey.request.hr.user,survey.model_survey_request,base.group_hr_user,1,1,1,0
-access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_question_column_heading,base.group_hr_user,1,0,0,0
+access_survey_question_column_heading_hr_user,survey.question.column.heading.hr.user,survey.model_survey_question_column_heading,base.group_hr_user,1,1,1,0
access_survey_response_line_hr_user,survey.response.line.hr.user,survey.model_survey_response_line,base.group_hr_user,1,1,1,0
access_survey_tbl_column_heading_hr_user,survey.tbl.column.heading.hr.user,survey.model_survey_tbl_column_heading,base.group_hr_user,1,1,1,0
access_base_calendar_attendee_survey_user,base.calendar.calendar.attendee.survey.user,base_calendar.model_calendar_attendee,base.group_survey_user,1,1,1,0
From a57180173fecfe6c24965da6dcdf58258c06f0c2 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 27 Feb 2012 14:23:07 +0530
Subject: [PATCH 006/126] [IMP]hr_holidays: Set a unconfirmed instead of new.
bzr revid: mma@tinyerp.com-20120227085307-yxthcol3lwegltgz
---
addons/hr_holidays/hr_holidays.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 3dc8ae0467c..287558e5280 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -111,7 +111,7 @@ class hr_holidays(osv.osv):
_columns = {
'name': fields.char('Description', required=True, size=64),
- 'state': fields.selection([('draft', 'New'), ('confirm', 'To Approve'), ('refuse', 'Refused'),
+ 'state': fields.selection([('draft', 'Unconfirmed'), ('confirm', 'To Approve'), ('refuse', 'Refused'),
('validate1', 'Second Approval'), ('validate', 'Approved'), ('cancel', 'Cancelled')],
'State', readonly=True, help='The state is set to \'Draft\', when a holiday request is created.\
\nThe state is \'Waiting Approval\', when holiday request is confirmed by user.\
From 7f74731083ea8e3f6fbcec5aa7d3edef5803b1d7 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 27 Feb 2012 18:45:57 +0530
Subject: [PATCH 007/126] [IMP]purchase: Fix Error of email template, added
send button in workflow, change some state label name and its button position
bzr revid: mma@tinyerp.com-20120227131557-dl1ut04uypafpzwf
---
addons/email_template/email_template.py | 2 ++
addons/purchase/purchase.py | 23 +++++++++++++++++++++--
addons/purchase/purchase_view.xml | 13 +++++++------
addons/purchase/purchase_workflow.xml | 22 ++++++++++++++++++++++
4 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 6c1571c5630..a6a2f9f2c82 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -56,6 +56,8 @@ class email_template(osv.osv):
:param str model: model name of the document record this mail is related to.
:param int res_id: id of the document record this mail is related to.
"""
+ if context is None:
+ context = {}
if not template: return u""
try:
template = tools.ustr(template)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 3d909c1085e..d342b7b1169 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -142,10 +142,11 @@ class purchase_order(osv.osv):
return res
STATE_SELECTION = [
- ('draft', 'Request for Quotation'),
+ ('draft', 'Draft PO'),
('wait', 'Waiting'),
+ ('send', 'RFQ Sent'),
('confirmed', 'Waiting Approval'),
- ('approved', 'Approved'),
+ ('approved', 'Purchase Order'),
('except_picking', 'Shipping Exception'),
('except_invoice', 'Invoice Exception'),
('done', 'Done'),
@@ -277,6 +278,24 @@ class purchase_order(osv.osv):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
+ def wkf_send_rfq(self, cr, uid, ids, context=None):
+
+ mod_obj = self.pool.get('ir.model.data')
+ template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')])
+ model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')])
+ resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
+ self.write(cr, uid, ids, {'state' : 'send'})
+
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'mail.compose.message',
+ 'views': [(resource_id,'form')],
+ 'view_id': resource_id,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context': {'active_model': 'purchase.order', 'mail.compose.message.mode':'mass_mail', 'mail.compose.template_id' :template_id},
+ }
#TODO: implement messages system
def wkf_confirm_order(self, cr, uid, ids, context=None):
todo = []
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 1c936055aff..ccdc9858125 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -194,17 +194,18 @@
-
+
-
-
-
+
+
-
+
-
+
+
+
diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml
index c978712c0a1..a7d67dd87a1 100644
--- a/addons/purchase/purchase_workflow.xml
+++ b/addons/purchase/purchase_workflow.xml
@@ -13,6 +13,12 @@
True
draft
+
+
+ send
+ function
+ wkf_send_rfq()
+
confirmed
@@ -90,6 +96,22 @@
purchase_confirm
+
+
+
+ send_rfq
+
+
+
+
+ purchase_confirm
+
+
+
+
+ purchase_cancel
+
+
From 3e9fbd83ca03bc76ba62ca9a2fc3cc4888152ccc Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Tue, 28 Feb 2012 17:29:49 +0530
Subject: [PATCH 008/126] [IMP]purchase: Added a button receive invoice &
receive product, improve view and related code, change label done to paid
bzr revid: mma@tinyerp.com-20120228115949-03tbq9mqcr0bwrt2
---
addons/purchase/purchase.py | 63 +++++++++++++++++++++++++++----
addons/purchase/purchase_view.xml | 7 ++--
2 files changed, 60 insertions(+), 10 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index d342b7b1169..b3bd23b392d 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -149,7 +149,7 @@ class purchase_order(osv.osv):
('approved', 'Purchase Order'),
('except_picking', 'Shipping Exception'),
('except_invoice', 'Invoice Exception'),
- ('done', 'Done'),
+ ('done', 'Paid'),
('cancel', 'Cancelled')
]
@@ -274,28 +274,77 @@ class purchase_order(osv.osv):
fiscal_position = supplier.property_account_position and supplier.property_account_position.id or False
return {'value':{'partner_address_id': supplier_address['default'], 'pricelist_id': pricelist, 'fiscal_position': fiscal_position}}
+ def view_invoice(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ inv_ids = []
+ for po in self.browse(cr, uid, ids, context=context):
+ if po.invoice_method == 'manual':
+ if not po.invoice_ids:
+ raise osv.except_osv(_('Warring !'),
+ _('You have configure Invoice Control is: "%s", You must first Create all invoices related to this purchase order: "%s"') % (self._columns['invoice_method'].selection[0][1], po.name))
+ inv_ids+= [invoice.id for invoice in po.invoice_ids]
+
+ res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
+ res_id = res and res[1] or False
+
+ return {
+ 'name': _('Supplier Invoices'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': [res_id],
+ 'res_model': 'account.invoice',
+ 'context': "{'type':'in_invoice', 'journal_type': 'purchase'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': inv_ids and inv_ids[0] or False,
+ }
+
+ def view_picking(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ pick_ids = []
+ for po in self.browse(cr, uid, ids, context=context):
+ pick_ids += [picking.id for picking in po.picking_ids]
+
+ res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_in_form')
+ res_id = res and res[1] or False
+
+ return {
+ 'name': _('Receptions'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': [res_id],
+ 'res_model': 'stock.picking',
+ 'context': "{'contact_display': 'partner'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': pick_ids and pick_ids[0] or False,
+ }
+
def wkf_approve_order(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
def wkf_send_rfq(self, cr, uid, ids, context=None):
-
mod_obj = self.pool.get('ir.model.data')
template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')])
- model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')])
- resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
self.write(cr, uid, ids, {'state' : 'send'})
+ res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
+ res_id = res and res[1] or False
+
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
- 'views': [(resource_id,'form')],
- 'view_id': resource_id,
+ 'views': [(res_id,'form')],
+ 'view_id': res_id,
'type': 'ir.actions.act_window',
'target': 'new',
- 'context': {'active_model': 'purchase.order', 'mail.compose.message.mode':'mass_mail', 'mail.compose.template_id' :template_id},
+ 'context': {'active_model': 'purchase.order','mail.compose.template_id' :template_id},
}
+
#TODO: implement messages system
def wkf_confirm_order(self, cr, uid, ids, context=None):
todo = []
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index ccdc9858125..be0b8d17eed 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -194,16 +194,17 @@
-
+
-
+
-
+
+
From 06b32aedf47be98eb803c85211f49116110ec20e Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 11:39:31 +0530
Subject: [PATCH 009/126] [IMP]purchase: Improve warning message and set a
button attrs
bzr revid: mma@tinyerp.com-20120229060931-gsgg20m9mut5p10y
---
addons/purchase/purchase.py | 4 ++--
addons/purchase/purchase_view.xml | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index b3bd23b392d..1ac38b05001 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -280,8 +280,8 @@ class purchase_order(osv.osv):
for po in self.browse(cr, uid, ids, context=context):
if po.invoice_method == 'manual':
if not po.invoice_ids:
- raise osv.except_osv(_('Warring !'),
- _('You have configure Invoice Control is: "%s", You must first Create all invoices related to this purchase order: "%s"') % (self._columns['invoice_method'].selection[0][1], po.name))
+ raise osv.except_osv(_('warning !'),
+ _('Your Invoicing Control is based on order lines, so please create invoice from Purchase order lines.'))
inv_ids+= [invoice.id for invoice in po.invoice_ids]
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index be0b8d17eed..6090bca78df 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -203,8 +203,8 @@
-
-
+
+
From 66eba554e45fd6797fdef07311bb44578f571209 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 11:43:32 +0530
Subject: [PATCH 010/126] [IMP]purchase:Added a Print Button in New state
bzr revid: mma@tinyerp.com-20120229061332-gagzxe9tf5pywhju
---
addons/purchase/purchase.py | 18 ++++++++++++++++++
addons/purchase/purchase_view.xml | 1 +
2 files changed, 19 insertions(+)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 1ac38b05001..f3ec32f2208 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -322,6 +322,24 @@ class purchase_order(osv.osv):
'res_id': pick_ids and pick_ids[0] or False,
}
+ def view_report(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ self.write(cr, uid, ids, {'state' : 'send'})
+
+ data = self.read(cr, uid, ids, [], context=context)[0]
+ datas = {
+ 'ids': [],
+ 'model': 'purchase.order',
+ 'form': data
+ }
+ return {
+ 'type': 'ir.actions.report.xml',
+ 'report_name': 'purchase.quotation',
+ 'nodestroy': True,
+ 'datas': datas,
+ }
+
def wkf_approve_order(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 6090bca78df..2a17c9bc58d 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -197,6 +197,7 @@
+
From 5f50bd32e7cf7b87f769ded93bf69bce6ebf6dac Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 11:49:13 +0530
Subject: [PATCH 011/126] [IMP]purchase:Improve code state change by workflow
bzr revid: mma@tinyerp.com-20120229061913-oj8djiwaps5mdi1r
---
addons/purchase/purchase.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index f3ec32f2208..793d7e76fb1 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -323,9 +323,11 @@ class purchase_order(osv.osv):
}
def view_report(self, cr, uid, ids, context=None):
+ wf_service = netsvc.LocalService("workflow")
if context is None:
context = {}
- self.write(cr, uid, ids, {'state' : 'send'})
+ for id in ids:
+ wf_service.trg_validate(uid, 'purchase.order', id, 'send_rfq', cr)
data = self.read(cr, uid, ids, [], context=context)[0]
datas = {
From 8082c6e4a3a41111c27d6362e7278b1d026fce2a Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 29 Feb 2012 12:17:05 +0530
Subject: [PATCH 012/126] [IMP] account, account_voucher : Improved workflow
state name, button name and also the position,Open payment in new window (and
close voucher when paid), added 'sent' state and its related changes.
bzr revid: mdi@tinyerp.com-20120229064705-x1j7ll1yst2ez5mf
---
addons/account/account_invoice.py | 24 +++++++++++++-
addons/account/account_invoice_view.xml | 13 ++++----
addons/account/account_invoice_workflow.xml | 32 ++++++++++++++++++-
addons/account_voucher/account_voucher.py | 2 +-
.../account_voucher_pay_invoice.xml | 2 +-
addons/account_voucher/invoice.py | 2 +-
.../voucher_payment_receipt_view.xml | 2 +-
addons/email_template/email_template.py | 2 ++
8 files changed, 67 insertions(+), 12 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 5e5ac5f482b..98379f67240 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -202,7 +202,8 @@ class account_invoice(osv.osv):
('draft','Draft'),
('proforma','Pro-forma'),
('proforma2','Pro-forma'),
- ('open','Open'),
+ ('open','Validated'),
+ ('sent','Sent'),
('paid','Paid'),
('cancel','Cancelled')
],'State', select=True, readonly=True,
@@ -370,6 +371,27 @@ class account_invoice(osv.osv):
_('There is no Accounting Journal of type Sale/Purchase defined!'))
else:
raise orm.except_orm(_('Unknown Error'), str(e))
+
+ def invoice_sent(self, cr, uid, ids, *args):
+ email_template_obj = self.pool.get('email.template')
+ mod_obj = self.pool.get('ir.model.data')
+
+ template_id = email_template_obj.search(cr, uid, [('name', '=', 'Automated Invoice Notification Mail')])[0]
+ template = email_template_obj.browse(cr, uid, template_id)
+ model_data_id = mod_obj._get_id(cr, uid, 'mail', 'email_compose_message_wizard_form')
+ res_id = mod_obj.browse(cr, uid, model_data_id).res_id
+
+ self.write(cr, uid, ids, {'state' : 'sent'})
+
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'mail.compose.message',
+ 'views': [(res_id, 'form')],
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context':{'active_model':'account.invoice', 'mail.compose.template_id': template.id},
+ }
def confirm_paid(self, cr, uid, ids, context=None):
if context is None:
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 59977c252f9..0aa7e48b6fc 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -299,16 +299,17 @@
-
+
-
+
+
+
+
+
+
-
-
-
-
diff --git a/addons/account/account_invoice_workflow.xml b/addons/account/account_invoice_workflow.xml
index 2af1e192a9b..58c4150a736 100644
--- a/addons/account/account_invoice_workflow.xml
+++ b/addons/account/account_invoice_workflow.xml
@@ -30,6 +30,14 @@ action_number()
write({'state':'open'})
function
+
+
+
+ sent
+ invoice_sent()
+ function
+
+
re-open
@@ -58,13 +66,30 @@ write({'state':'cancel'})
invoice_open
-
+
+
+
+ invoice_sent
+
+
account.move.line
move_line_id_payment_get()
test_paid()
+
+
+
+ account.move.line
+ move_line_id_payment_get()
+ test_paid()
+
+
+
+
+ invoice_cancel
+
@@ -86,6 +111,11 @@ write({'state':'cancel'})
invoice_cancel
+
+
+
+ invoice_sent
+
diff --git a/addons/account_voucher/account_voucher.py b/addons/account_voucher/account_voucher.py
index 3ed173cca85..0a902fd48dc 100644
--- a/addons/account_voucher/account_voucher.py
+++ b/addons/account_voucher/account_voucher.py
@@ -772,7 +772,7 @@ class account_voucher(osv.osv):
def proforma_voucher(self, cr, uid, ids, context=None):
self.action_move_line_create(cr, uid, ids, context=context)
- return True
+ return {'type': 'ir.actions.act_window_close'}
def action_cancel_draft(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
diff --git a/addons/account_voucher/account_voucher_pay_invoice.xml b/addons/account_voucher/account_voucher_pay_invoice.xml
index 345241cb4ee..f93da8d370f 100644
--- a/addons/account_voucher/account_voucher_pay_invoice.xml
+++ b/addons/account_voucher/account_voucher_pay_invoice.xml
@@ -8,7 +8,7 @@
-
+
diff --git a/addons/account_voucher/invoice.py b/addons/account_voucher/invoice.py
index b108bc14fe3..006a622e25f 100644
--- a/addons/account_voucher/invoice.py
+++ b/addons/account_voucher/invoice.py
@@ -36,7 +36,7 @@ class invoice(osv.osv):
'res_model': 'account.voucher',
'type': 'ir.actions.act_window',
'nodestroy': True,
- 'target': 'current',
+ 'target': 'new',
'domain': '[]',
'context': {
'default_partner_id': inv.partner_id.id,
diff --git a/addons/account_voucher/voucher_payment_receipt_view.xml b/addons/account_voucher/voucher_payment_receipt_view.xml
index 241bd23d5bb..43e316d1091 100644
--- a/addons/account_voucher/voucher_payment_receipt_view.xml
+++ b/addons/account_voucher/voucher_payment_receipt_view.xml
@@ -403,10 +403,10 @@
+
-
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 6c1571c5630..a6a2f9f2c82 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -56,6 +56,8 @@ class email_template(osv.osv):
:param str model: model name of the document record this mail is related to.
:param int res_id: id of the document record this mail is related to.
"""
+ if context is None:
+ context = {}
if not template: return u""
try:
template = tools.ustr(template)
From 8dcc88469eaf311966214c64d46715e095c3277b Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 29 Feb 2012 15:16:32 +0530
Subject: [PATCH 013/126] [IMP] sale: workflow improvements and send quatation
in mail feature implementation
bzr revid: psi@tinyerp.com-20120229094632-wvu5h6w0avbhto1b
---
addons/sale/edi/sale_order_action_data.xml | 20 +++++-----
addons/sale/sale.py | 46 ++++++++++++++++++++--
addons/sale/sale_view.xml | 13 +++---
addons/sale/sale_workflow.xml | 26 +++++++++++-
4 files changed, 86 insertions(+), 19 deletions(-)
diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml
index 3d7a554ff4a..56cee553b9e 100644
--- a/addons/sale/edi/sale_order_action_data.xml
+++ b/addons/sale/edi/sale_order_action_data.xml
@@ -2,14 +2,7 @@
-
- if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
- code
- ir.actions.server
-
- True
- Auto-email confirmed sale orders
-
+
@@ -30,9 +23,18 @@
so users can freely customize/delete them -->
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 82bfda7b580..c13fae41c20 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -201,10 +201,11 @@ class sale_order(osv.osv):
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this sales order request."),
'client_order_ref': fields.char('Customer Reference', size=64),
'state': fields.selection([
- ('draft', 'Quotation'),
+ ('draft', 'Draft Quotation'),
+ ('sent', 'Quotation Sent'),
('waiting_date', 'Waiting Schedule'),
- ('manual', 'To Invoice'),
- ('progress', 'In Progress'),
+ ('manual', 'Sale to Invoice'),
+ ('progress', 'Sale in Progress'),
('shipping_except', 'Shipping Exception'),
('invoice_except', 'Invoice Exception'),
('done', 'Done'),
@@ -470,6 +471,17 @@ class sale_order(osv.osv):
inv_obj.button_compute(cr, uid, [inv_id])
return inv_id
+ def print_quotation(self, cr, uid, ids, context=None):
+ wf_service = netsvc.LocalService("workflow")
+ for id in ids:
+ wf_service.trg_validate(uid, 'sale.order', id, 'quotation_sent', cr)
+ datas = {
+ 'model': 'sale.order',
+ 'ids': ids,
+ 'form': self.read(cr, uid, ids, context=context)[0],
+ }
+ return {'type': 'ir.actions.report.xml', 'report_name': 'sale.order', 'datas': datas, 'nodestroy': True}
+
def manual_invoice(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
wf_service = netsvc.LocalService("workflow")
@@ -658,6 +670,34 @@ class sale_order(osv.osv):
self.log(cr, uid, o.id, message)
return True
+ def action_quotation_sent(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)
+ model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')], context=context)
+ resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+ #EDI EXport data
+ id = ids[0]
+ if not self.browse(cr, uid, id, context).partner_id.opt_out:
+ order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
+ ctx = context.copy()
+ ctx.update({'active_model': 'sale.order', 'active_id': id, 'mail.compose.template_id': template_id})
+ return {
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'mail.compose.message',
+ 'views': [(resource_id,'form')],
+ 'view_id': resource_id,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context': ctx,
+ 'nodestroy': True,
+ }
+
+ def _hook_message_sent(self, cr, uid, sale_id, context=None):
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'sale.order', sale_id, 'quotation_sent', cr)
+ return True
+
def procurement_lines_get(self, cr, uid, ids, *args):
res = []
for order in self.browse(cr, uid, ids, context={}):
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 90d3838f5a0..f47bb09e2fa 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -200,20 +200,21 @@
-
+
-
+
-
-
+
+
+
+
+
-
-
diff --git a/addons/sale/sale_workflow.xml b/addons/sale/sale_workflow.xml
index 0ff5eb15ea0..59fce9f9d7b 100644
--- a/addons/sale/sale_workflow.xml
+++ b/addons/sale/sale_workflow.xml
@@ -13,6 +13,12 @@
True
draft
+
+
+ sent
+ function
+ write({'state':'sent'})
+
router
@@ -123,6 +129,24 @@
order_confirm
+
+
+
+ quotation_sent
+
+
+
+
+
+ cancel
+
+
+
+
+
+ order_confirm
+
+
@@ -180,7 +204,7 @@
manual_invoice
-
+
From 8dd0ad53f7ecac6078f1ab50b4132c7f711164f2 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 29 Feb 2012 15:25:58 +0530
Subject: [PATCH 014/126] [imp] mail, email_template: improvements
bzr revid: psi@tinyerp.com-20120229095558-ezomcdj23m6kcdlv
---
addons/email_template/email_template.py | 2 ++
addons/email_template/wizard/mail_compose_message.py | 4 +++-
addons/mail/mail_message.py | 4 +++-
addons/mail/wizard/mail_compose_message.py | 2 +-
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index 6c1571c5630..a6a2f9f2c82 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -56,6 +56,8 @@ class email_template(osv.osv):
:param str model: model name of the document record this mail is related to.
:param int res_id: id of the document record this mail is related to.
"""
+ if context is None:
+ context = {}
if not template: return u""
try:
template = tools.ustr(template)
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py
index ef4572429a1..c68f884f7ef 100644
--- a/addons/email_template/wizard/mail_compose_message.py
+++ b/addons/email_template/wizard/mail_compose_message.py
@@ -95,19 +95,21 @@ class mail_compose_message(osv.osv_memory):
for fname, fcontent in attachment.iteritems():
data_attach = {
'name': fname,
- 'datas': base64.b64encode(fcontent),
+ 'datas': fcontent,
'datas_fname': fname,
'description': fname,
'res_model' : self._name,
'res_id' : ids[0] if ids else False
}
att_ids.append(attachment_obj.create(cr, uid, data_attach))
+ values['subtype'] = 'html'
values['attachment_ids'] = att_ids
else:
# restore defaults
values = self.default_get(cr, uid, self.fields_get_keys(cr, uid), context)
values.update(use_template=use_template, template_id=template_id)
+ values['subtype'] = 'html'
return {'value': values}
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index 45a6019db3d..8e6472a265c 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -517,7 +517,9 @@ class mail_message(osv.osv):
message.write({'state':'sent', 'message_id': res})
else:
message.write({'state':'exception'})
-
+ model_pool = self.pool.get(message.model)
+ if hasattr(model_pool, '_hook_message_sent'):
+ model_pool._hook_message_sent(cr, uid, message.res_id, context=context)
# if auto_delete=True then delete that sent messages as well as attachments
message.refresh()
if message.state == 'sent' and message.auto_delete:
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 27ec13b2147..003ddd8b6c3 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -160,6 +160,7 @@ class mail_compose_message(osv.osv_memory):
result.update({
'subtype' : 'plain', # default to the text version due to quoting
'body_text' : body,
+ 'body_html' : message_data.body_html,
'subject' : subject,
'attachment_ids' : [],
'model' : message_data.model or False,
@@ -238,7 +239,6 @@ class mail_compose_message(osv.osv_memory):
subtype=mail.subtype, headers=headers, context=context)
# in normal mode, we send the email immediately, as the user expects us to (delay should be sufficiently small)
mail_message.send(cr, uid, [msg_id], context=context)
-
return {'type': 'ir.actions.act_window_close'}
def render_template(self, cr, uid, template, model, res_id, context=None):
From 98fc1ace87bcf80e55d7be1f069bb823a9a075f3 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 29 Feb 2012 15:40:45 +0530
Subject: [PATCH 015/126] [IMP] account Improve the print button to call the
invoice_sent signal and also invoice_sent is triggered only when mail is
send.
bzr revid: mdi@tinyerp.com-20120229101045-w775o646hlu432ot
---
addons/account/account_invoice.py | 39 ++++++++++++++++++---
addons/account/account_invoice_view.xml | 4 +--
addons/account/account_invoice_workflow.xml | 2 +-
3 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 98379f67240..51533353be4 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -372,25 +372,54 @@ class account_invoice(osv.osv):
else:
raise orm.except_orm(_('Unknown Error'), str(e))
- def invoice_sent(self, cr, uid, ids, *args):
+ def _hook_message_sent(self, cr, uid, invoice_id, context=None):
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'account.invoice', invoice_id, 'invoice_sent', cr)
+ return True
+
+ def invoice_print(self, cr, uid, ids, context=None):
+ wf_service = netsvc.LocalService('workflow')
+ for id in ids:
+ wf_service.trg_validate(uid, 'account.invoice', id, 'invoice_sent', cr)
+ datas = {
+ 'ids': ids,
+ 'model': 'account.invoice',
+ 'form': self.read(cr, uid, ids, context=context)[0]
+ }
+ return {
+ 'type': 'ir.actions.report.xml',
+ 'report_name': 'account.invoice',
+ 'datas': datas,
+ 'nodestroy' : True
+ }
+
+ def action_invoice_sent(self, cr, uid, ids, context=None):
email_template_obj = self.pool.get('email.template')
mod_obj = self.pool.get('ir.model.data')
- template_id = email_template_obj.search(cr, uid, [('name', '=', 'Automated Invoice Notification Mail')])[0]
+ template_id = email_template_obj.search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)[0]
template = email_template_obj.browse(cr, uid, template_id)
model_data_id = mod_obj._get_id(cr, uid, 'mail', 'email_compose_message_wizard_form')
- res_id = mod_obj.browse(cr, uid, model_data_id).res_id
+ res_id = mod_obj.browse(cr, uid, model_data_id, context=context).res_id
- self.write(cr, uid, ids, {'state' : 'sent'})
+ #EDI EXport data
+ id = ids[0]
+ invoice = self.browse(cr, uid, id, context)
+ if not invoice.partner_id.opt_out:
+ invoice.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context)
+ ctx = context.copy()
+ ctx.update({'active_model': 'account.invoice', 'active_id': invoice.id, 'mail.compose.template_id': template.id})
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
'views': [(res_id, 'form')],
+ 'view_id': res_id,
'type': 'ir.actions.act_window',
'target': 'new',
- 'context':{'active_model':'account.invoice', 'mail.compose.template_id': template.id},
+ 'context': ctx,
+ 'nodestroy': True,
}
def confirm_paid(self, cr, uid, ids, context=None):
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 0aa7e48b6fc..cd70edb2349 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -302,8 +302,8 @@
-
-
+
+
diff --git a/addons/account/account_invoice_workflow.xml b/addons/account/account_invoice_workflow.xml
index 58c4150a736..7e536036628 100644
--- a/addons/account/account_invoice_workflow.xml
+++ b/addons/account/account_invoice_workflow.xml
@@ -34,7 +34,7 @@ write({'state':'open'})
sent
- invoice_sent()
+ write({'state':'sent'})
function
From f4f13affad3ea93595a1d059be174447d64d16ff Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 15:46:53 +0530
Subject: [PATCH 016/126] [IMP]purchase: added message_hook method and improve
workflow and button
bzr revid: mma@tinyerp.com-20120229101653-wiuo4am11s1kaa5h
---
addons/purchase/purchase.py | 16 ++++++++++++++--
addons/purchase/purchase_view.xml | 2 +-
addons/purchase/purchase_workflow.xml | 2 +-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 793d7e76fb1..9ebb084ecb2 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -346,14 +346,25 @@ class purchase_order(osv.osv):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
+ def _hook_message_sent(self, cr, uid, purchase_id, context=None):
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'purchase.order', purchase_id, 'send_rfq', cr)
+ return True
+
def wkf_send_rfq(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')])
- self.write(cr, uid, ids, {'state' : 'send'})
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
+ #EDI EXport data
+ id = ids[0]
+ order = self.browse(cr, uid, id, context)
+ if not order.partner_id.opt_out:
+ order.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context)
+ ctx = context.copy()
+ ctx.update({'active_model': 'purchase.order', 'active_id': id, 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
@@ -362,7 +373,8 @@ class purchase_order(osv.osv):
'view_id': res_id,
'type': 'ir.actions.act_window',
'target': 'new',
- 'context': {'active_model': 'purchase.order','mail.compose.template_id' :template_id},
+ 'context': ctx,
+ 'nodestroy': True,
}
#TODO: implement messages system
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 2a17c9bc58d..ad064bab696 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -196,7 +196,7 @@
-
+
diff --git a/addons/purchase/purchase_workflow.xml b/addons/purchase/purchase_workflow.xml
index a7d67dd87a1..38010780c7f 100644
--- a/addons/purchase/purchase_workflow.xml
+++ b/addons/purchase/purchase_workflow.xml
@@ -17,7 +17,7 @@
send
function
- wkf_send_rfq()
+ write({'state':'send'})
From 1e4d9f48d2b197400d9c4ca6e684101a1ada1e6a Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 15:52:43 +0530
Subject: [PATCH 017/126] [IMP]purchase:revert email_template changes
bzr revid: mma@tinyerp.com-20120229102243-vvft6tu6wn2jnkrv
---
addons/email_template/email_template.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py
index a6a2f9f2c82..6c1571c5630 100644
--- a/addons/email_template/email_template.py
+++ b/addons/email_template/email_template.py
@@ -56,8 +56,6 @@ class email_template(osv.osv):
:param str model: model name of the document record this mail is related to.
:param int res_id: id of the document record this mail is related to.
"""
- if context is None:
- context = {}
if not template: return u""
try:
template = tools.ustr(template)
From d49739ff8a9fbd4bf3d59ff9d386c82a343b2900 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 29 Feb 2012 16:55:32 +0530
Subject: [PATCH 018/126] [IMP] account : Improve the workflow button
visibility.
bzr revid: mdi@tinyerp.com-20120229112532-qc7bmge9d6naqqt1
---
addons/account/account_invoice_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index cd70edb2349..e71f83b30f3 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -306,7 +306,7 @@
-
+
From ae97d281d309c0c4ba3cae832a3be97dc0055fd2 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 17:07:11 +0530
Subject: [PATCH 019/126] [IMP]purchase:comment code of edi for pending now
bzr revid: mma@tinyerp.com-20120229113711-jq8in1oww9o03on2
---
addons/purchase/purchase.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 9ebb084ecb2..eaf3e39ae3c 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -361,8 +361,8 @@ class purchase_order(osv.osv):
#EDI EXport data
id = ids[0]
order = self.browse(cr, uid, id, context)
- if not order.partner_id.opt_out:
- order.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context)
+ #if not order.partner_id.opt_out:
+ #order.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context)
ctx = context.copy()
ctx.update({'active_model': 'purchase.order', 'active_id': id, 'mail.compose.template_id': template_id})
return {
From 7650c331c5582fd25cae863a9ccdfb34e6b0abb9 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 29 Feb 2012 17:13:43 +0530
Subject: [PATCH 020/126] [IMP] sale: small change related to print order
button
bzr revid: psi@tinyerp.com-20120229114343-we8n5tlhfxxe3xv8
---
addons/sale/sale.py | 4 ++--
addons/sale/sale_view.xml | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index c13fae41c20..a8b3f9d8f73 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -677,8 +677,8 @@ class sale_order(osv.osv):
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
#EDI EXport data
id = ids[0]
- if not self.browse(cr, uid, id, context).partner_id.opt_out:
- order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
+# if not self.browse(cr, uid, id, context).partner_id.opt_out:
+# order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
ctx = context.copy()
ctx.update({'active_model': 'sale.order', 'active_id': id, 'mail.compose.template_id': template_id})
return {
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index f47bb09e2fa..e01bf8ab725 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -206,7 +206,6 @@
-
From 57586ad1accb095612481947fb2cc081e6eade4b Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Wed, 29 Feb 2012 17:17:20 +0530
Subject: [PATCH 021/126] [IMP] account : Improve the workflow button
visibility and code.
bzr revid: mdi@tinyerp.com-20120229114720-hx6sexngsi4hgfg7
---
addons/account/account_invoice.py | 4 ++--
addons/account/account_invoice_view.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 51533353be4..3a82bfd9854 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -405,8 +405,8 @@ class account_invoice(osv.osv):
#EDI EXport data
id = ids[0]
invoice = self.browse(cr, uid, id, context)
- if not invoice.partner_id.opt_out:
- invoice.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context)
+# if not invoice.partner_id.opt_out:
+# invoice.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context)
ctx = context.copy()
ctx.update({'active_model': 'account.invoice', 'active_id': invoice.id, 'mail.compose.template_id': template.id})
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index e71f83b30f3..35b8cd2cadf 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -303,7 +303,7 @@
-
+
From 16bfaa6fce17c8705a191b348d51b67970b1fa95 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 29 Feb 2012 18:23:19 +0530
Subject: [PATCH 022/126] [IMP] sale: small change
bzr revid: psi@tinyerp.com-20120229125319-8a71fmbcrv10383z
---
addons/sale/sale.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index a8b3f9d8f73..ba051d37a9e 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -676,11 +676,10 @@ class sale_order(osv.osv):
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
#EDI EXport data
- id = ids[0]
# if not self.browse(cr, uid, id, context).partner_id.opt_out:
# order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
ctx = context.copy()
- ctx.update({'active_model': 'sale.order', 'active_id': id, 'mail.compose.template_id': template_id})
+ ctx.update({'active_model': 'sale.order', 'active_id': id[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
From c420db4bbfe6fe64bfc5488fda4705b2d67eb54b Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Wed, 29 Feb 2012 18:48:19 +0530
Subject: [PATCH 023/126] [IMP]hr_holidays: Set department readonly till
approved.
bzr revid: mma@tinyerp.com-20120229131819-x8rmt9ew3a8uysmd
---
addons/hr_holidays/hr_holidays.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index 287558e5280..a999a3593f3 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -132,7 +132,7 @@ class hr_holidays(osv.osv):
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
- 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
+ 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, store=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)'),
From 120a4a9fd76abc284f22766b32b1683dbc73a24e Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Thu, 1 Mar 2012 10:57:38 +0530
Subject: [PATCH 024/126] [IMP]hr_holidays: Set department readonly via xml and
revert in py file
bzr revid: mma@tinyerp.com-20120301052738-oaj8phgg1h4p4jq7
---
addons/hr_holidays/hr_holidays.py | 2 +-
addons/hr_holidays/hr_holidays_view.xml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py
index a999a3593f3..287558e5280 100644
--- a/addons/hr_holidays/hr_holidays.py
+++ b/addons/hr_holidays/hr_holidays.py
@@ -132,7 +132,7 @@ class hr_holidays(osv.osv):
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
- 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, store=True),
+ 'department_id':fields.related('employee_id', 'department_id', string='Department', type='many2one', relation='hr.department', readonly=True, store=True),
'category_id': fields.many2one('hr.employee.category', "Category", help='Category of Employee'),
'holiday_type': fields.selection([('employee','By Employee'),('category','By Employee Category')], 'Allocation Type', help='By Employee: Allocation/Request for individual Employee, By Employee Category: Allocation/Request for group of employees in category', required=True),
'manager_id2': fields.many2one('hr.employee', 'Second Approval', readonly=True, help='This area is automaticly filled by the user who validate the leave with second level (If Leave type need second validation)'),
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index 302ca4fe6ee..3f8490942f3 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -76,7 +76,7 @@
-
+
@@ -121,7 +121,7 @@
-
+
From b4688cd91ba74dd4317539e63db82c5a8a787632 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 5 Mar 2012 10:41:17 +0530
Subject: [PATCH 025/126] [IMP]: Purchase: Changed string for invoiced field
bzr revid: mma@tinyerp.com-20120305051117-hmgatham6qkl3z76
---
addons/purchase/purchase.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index eaf3e39ae3c..3b832cca7aa 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -180,7 +180,7 @@ class purchase_order(osv.osv):
'picking_ids': fields.one2many('stock.picking', 'purchase_id', 'Picking List', readonly=True, help="This is the list of picking list that have been generated for this purchase"),
'shipped':fields.boolean('Received', readonly=True, select=True, help="It indicates that a picking has been done"),
'shipped_rate': fields.function(_shipped_rate, string='Received', type='float'),
- 'invoiced': fields.function(_invoiced, string='Invoiced & Paid', type='boolean', help="It indicates that an invoice has been paid"),
+ 'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been paid"),
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on receptions')], 'Invoicing Control', required=True,
help="Based on Purchase Order lines: place individual lines in 'Invoice Control > Based on P.O. lines' from where you can selectively create an invoice.\n" \
From 34d47a13ea5c3af61eb21501d495c1db74b6bcb2 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 5 Mar 2012 10:49:52 +0530
Subject: [PATCH 026/126] [REM]: Purchase: Removed print button [IMP]:
purchase: renamed Receive product button name
bzr revid: mma@tinyerp.com-20120305051952-46lj68covxrod54s
---
addons/purchase/purchase.py | 20 --------------------
addons/purchase/purchase_view.xml | 3 +--
2 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 3b832cca7aa..647b744e1c4 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -322,26 +322,6 @@ class purchase_order(osv.osv):
'res_id': pick_ids and pick_ids[0] or False,
}
- def view_report(self, cr, uid, ids, context=None):
- wf_service = netsvc.LocalService("workflow")
- if context is None:
- context = {}
- for id in ids:
- wf_service.trg_validate(uid, 'purchase.order', id, 'send_rfq', cr)
-
- data = self.read(cr, uid, ids, [], context=context)[0]
- datas = {
- 'ids': [],
- 'model': 'purchase.order',
- 'form': data
- }
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'purchase.quotation',
- 'nodestroy': True,
- 'datas': datas,
- }
-
def wkf_approve_order(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index ad064bab696..6dbdcfeeb0c 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -197,7 +197,6 @@
-
@@ -205,7 +204,7 @@
-
+
From 900d064e3ea853108656215dece270b79781d8f5 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Mon, 5 Mar 2012 11:16:20 +0530
Subject: [PATCH 027/126] [IMP]: purchase: Improvements in purchase search
view: used the same for RfQ and Purchase Orders
bzr revid: mma@tinyerp.com-20120305054620-zxzydncz12nj6ms5
---
addons/purchase/purchase_view.xml | 45 ++-----------------
.../purchase_double_validation/__openerp__.py | 1 +
.../purchase_double_validation_view.xml | 16 +++++++
.../purchase_requisition_view.xml | 15 +------
4 files changed, 22 insertions(+), 55 deletions(-)
create mode 100644 addons/purchase_double_validation/purchase_double_validation_view.xml
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index 6dbdcfeeb0c..42237c2a138 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -237,40 +237,6 @@
-
- request.quotation.select
- purchase.order
- search
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
purchase.order.list.select
purchase.order
@@ -279,13 +245,10 @@
-
-
-
-
-
+
+
@@ -329,12 +292,12 @@
- Requests for Quotation
+ Quotations
ir.actions.act_window
purchase.order
{'search_default_draft': 1}
tree,form,graph,calendar
-
+
You can create a request for quotation when you want to buy products to a supplier but the purchase is not confirmed yet. Use also this menu to review requests for quotation created automatically based on your logistic rules (minimum stock, MTO, etc). You can convert the request for quotation into a purchase order once the order is confirmed. If you use the extended interface (from user's preferences), you can select the way to control your supplier invoices: based on the order, based on the receptions or manual encoding.
-
-
- request.for.quotation.select.inherit
- form
- purchase.order
-
-
-
+
From 314f9586d0c100577c4743b408c3b2c36f6d301c Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 5 Mar 2012 16:18:56 +0530
Subject: [PATCH 028/126] [IMP] purchase : Remove the warning when 'based on PO
lines' but generate the invoice instead.
bzr revid: mdi@tinyerp.com-20120305104856-5n9x4ntz8jitcywf
---
addons/purchase/purchase.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 647b744e1c4..16abd4dab3e 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -276,12 +276,13 @@ class purchase_order(osv.osv):
def view_invoice(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
+ wizard_obj = self.pool.get('purchase.order.line_invoice')
inv_ids = []
for po in self.browse(cr, uid, ids, context=context):
if po.invoice_method == 'manual':
if not po.invoice_ids:
- raise osv.except_osv(_('warning !'),
- _('Your Invoicing Control is based on order lines, so please create invoice from Purchase order lines.'))
+ context.update({'active_ids' : [line.id for line in po.order_line]})
+ wizard_obj.makeInvoices(cr, uid, [], context=context)
inv_ids+= [invoice.id for invoice in po.invoice_ids]
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
From 5c6efbd235b6a0b174fc22bf51443646ed53ea30 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 5 Mar 2012 17:46:42 +0530
Subject: [PATCH 029/126] [IMP] purchase : Improved the code to get the invoice
lines at first time when we create the invoice.
bzr revid: mdi@tinyerp.com-20120305121642-781krexsohokecfn
---
addons/purchase/purchase.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 16abd4dab3e..b5f8568e5ca 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -283,8 +283,9 @@ class purchase_order(osv.osv):
if not po.invoice_ids:
context.update({'active_ids' : [line.id for line in po.order_line]})
wizard_obj.makeInvoices(cr, uid, [], context=context)
+
+ for po in self.browse(cr, uid, ids, context=context):
inv_ids+= [invoice.id for invoice in po.invoice_ids]
-
res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_supplier_form')
res_id = res and res[1] or False
From 876cac5546563e17ce2e0b1f04acf823f0539c13 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Tue, 6 Mar 2012 10:38:47 +0530
Subject: [PATCH 030/126] [IMP] sale: Added buttons to see invoice and delivery
order on sale order from
bzr revid: psi@tinyerp.com-20120306050847-bbrjq8qrcxehom99
---
addons/sale/sale.py | 64 ++++++++++++++++++++++++++++++++++++---
addons/sale/sale_view.xml | 2 ++
2 files changed, 62 insertions(+), 4 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index ba051d37a9e..e031cac5964 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -513,6 +513,65 @@ class sale_order(osv.osv):
'res_id': inv_ids and inv_ids[0] or False,
}
+ def action_view_invoice(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ inv_ids = []
+ for so in self.browse(cr, uid, ids, context=context):
+ inv_ids+= [invoice.id for invoice in so.invoice_ids]
+
+ res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
+ res_id = res and res[1] or False
+
+ return {
+ 'name': _('Customer Invoices'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': [res_id],
+ 'res_model': 'account.invoice',
+ 'context': "{'type':'out_invoice', 'journal_type': 'sale'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': inv_ids and inv_ids[0] or False,
+ }
+
+ def action_view_delivery(self, cr, uid, ids, context=None):
+ mod_obj = self.pool.get('ir.model.data')
+ pick_ids = []
+ for so in self.browse(cr, uid, ids, context=context):
+ pick_ids += [picking.id for picking in so.picking_ids]
+
+ if len(pick_ids) > 1:
+ res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_search')
+ res_id = res and res[1] or False,
+ return {
+ 'name': _('Delivery Order'),
+ 'view_type': 'search',
+ 'view_mode': 'search',
+ 'view_id': res_id,
+ 'res_model': 'stock.picking',
+ 'context': "{'type':'out'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': pick_ids or False,
+ }
+ else:
+ res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
+ res_id = res and res[1] or False,
+ return {
+ 'name': _('Delivery Order'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'view_id': res_id,
+ 'res_model': 'stock.picking',
+ 'context': "{'type':'out'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ 'res_id': pick_ids and pick_ids[0] or False,
+ }
+
def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):
res = False
invoices = {}
@@ -675,11 +734,8 @@ class sale_order(osv.osv):
template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- #EDI EXport data
-# if not self.browse(cr, uid, id, context).partner_id.opt_out:
-# order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
ctx = context.copy()
- ctx.update({'active_model': 'sale.order', 'active_id': id[0], 'mail.compose.template_id': template_id})
+ ctx.update({'active_model': 'sale.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e01bf8ab725..2a7b059016b 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -210,6 +210,8 @@
+
+
From 3fe4b833294f749d03667550f089231137d9c053 Mon Sep 17 00:00:00 2001
From: "Mayur Maheshwari (OpenERP)"
Date: Tue, 6 Mar 2012 11:22:10 +0530
Subject: [PATCH 031/126] [IMP]hr_evaluation: renamed Button name Interview
question to Answer Survey
bzr revid: mma@tinyerp.com-20120306055210-9eodpob4zmebs3z2
---
addons/hr_evaluation/hr_evaluation_view.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index e1dd5e0b96f..1f1b5af553c 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -173,7 +173,7 @@
-
+
@@ -301,7 +301,7 @@
-
+
@@ -338,7 +338,7 @@
-
+
From e64820b32a92cea24647a8a5525c37364487c207 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 7 Mar 2012 11:44:04 +0530
Subject: [PATCH 032/126] [IMP] sale: set attrs on open invoice and open
delivery oder buttons
bzr revid: psi@tinyerp.com-20120307061404-uob7czxdiio8hmt8
---
addons/sale/sale_view.xml | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 2a7b059016b..e7d2ab42223 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -210,8 +210,11 @@
-
-
+
+
From 116974c0d8dcd6da1c90a7847e9a11f74eb257cb Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 7 Mar 2012 11:54:12 +0530
Subject: [PATCH 033/126] [IMP] sale: improve action_view_delivery funtions
bzr revid: psi@tinyerp.com-20120307062412-82bdsvhif9cxktl2
---
addons/sale/sale.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index e031cac5964..d19d43a22cf 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -540,14 +540,13 @@ class sale_order(osv.osv):
pick_ids = []
for so in self.browse(cr, uid, ids, context=context):
pick_ids += [picking.id for picking in so.picking_ids]
-
if len(pick_ids) > 1:
- res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_search')
+ res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_tree')
res_id = res and res[1] or False,
return {
'name': _('Delivery Order'),
- 'view_type': 'search',
- 'view_mode': 'search',
+ 'view_type': 'form',
+ 'view_mode': 'tree',
'view_id': res_id,
'res_model': 'stock.picking',
'context': "{'type':'out'}",
From 553f0fe846c5e1c433165f59073b00ad0554d9be Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 7 Mar 2012 12:10:22 +0530
Subject: [PATCH 034/126] [imp] sale improve sale and mail
bzr revid: psi@tinyerp.com-20120307064022-4q3j3uqoao20eqqy
---
addons/mail/wizard/mail_compose_message.py | 3 ++-
addons/mail/wizard/mail_compose_message_view.xml | 1 +
addons/sale/edi/sale_order.py | 12 ++++++++++++
addons/sale/sale.py | 5 +----
4 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 90ecbcb3607..2010d7d0f5a 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -100,6 +100,7 @@ class mail_compose_message(osv.osv_memory):
if not result.get('email_from'):
current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
result['email_from'] = current_user.user_email or False
+ result['subtype'] = 'html'
return result
_columns = {
@@ -158,7 +159,7 @@ class mail_compose_message(osv.osv_memory):
if not (subject.startswith('Re:') or subject.startswith(re_prefix)):
subject = "%s %s" % (re_prefix, subject)
result.update({
- 'subtype' : 'plain', # default to the text version due to quoting
+ 'subtype' : message_data.subtype or 'plain', # default to the text version due to quoting
'body_text' : body,
'body_html' : message_data.body_html,
'subject' : subject,
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index d559d679c8b..3a44b040139 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -23,6 +23,7 @@
+
diff --git a/addons/sale/edi/sale_order.py b/addons/sale/edi/sale_order.py
index d40d0b613ed..12aee8a1812 100644
--- a/addons/sale/edi/sale_order.py
+++ b/addons/sale/edi/sale_order.py
@@ -24,6 +24,7 @@ from dateutil.relativedelta import relativedelta
from osv import fields, osv, orm
from edi import EDIMixin
+from edi.models import edi
from tools import DEFAULT_SERVER_DATE_FORMAT
SALE_ORDER_LINE_EDI_STRUCT = {
@@ -64,6 +65,17 @@ SALE_ORDER_EDI_STRUCT = {
class sale_order(osv.osv, EDIMixin):
_inherit = 'sale.order'
+ def action_quotation_sent(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ sale_objs = self.browse(cr, uid, ids, context=context)
+ edi_token = self.pool.get('edi.document').export_edi(cr, uid, sale_objs, context = context)[0]
+ web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
+ edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
+ ctx = context.copy()
+ ctx.update(edi_context)
+ return super(sale_order, self).action_quotation_sent(cr, uid, ids, context=ctx)
+
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
"""Exports a Sale order"""
edi_struct = dict(edi_struct or SALE_ORDER_EDI_STRUCT)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index ba051d37a9e..d657eedd2bf 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -675,11 +675,8 @@ class sale_order(osv.osv):
template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)
model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
- #EDI EXport data
-# if not self.browse(cr, uid, id, context).partner_id.opt_out:
-# order.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
ctx = context.copy()
- ctx.update({'active_model': 'sale.order', 'active_id': id[0], 'mail.compose.template_id': template_id})
+ ctx.update({'active_model': 'sale.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
From 7947da855689976471cd67318527521dff21e75e Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 7 Mar 2012 15:40:46 +0530
Subject: [PATCH 035/126] [IMP]sale: update attrs on Open Invoice button
bzr revid: psi@tinyerp.com-20120307101046-yv27cggqlanh338i
---
addons/sale/sale_view.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index e7d2ab42223..2ad4059cb42 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -211,8 +211,8 @@
+ attrs="{'invisible': ['|','|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking'),
+ '&','&',('order_policy','=','postpaid'),('state', '=','progress'),('shipped','=',False)]}"/>
From b16de17c746c1acd459f1bd95e5beb6d42268467 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Fri, 9 Mar 2012 10:59:48 +0530
Subject: [PATCH 036/126] [IMP] sale: revert the changes related to EDI
bzr revid: psi@tinyerp.com-20120309052948-iy1o89q06uj440oy
---
addons/sale/edi/sale_order_action_data.xml | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml
index 56cee553b9e..3d7a554ff4a 100644
--- a/addons/sale/edi/sale_order_action_data.xml
+++ b/addons/sale/edi/sale_order_action_data.xml
@@ -2,7 +2,14 @@
-
+
+ if not object.partner_id.opt_out: object.edi_export_and_email(template_ext_id='sale.email_template_edi_sale', context=context)
+ code
+ ir.actions.server
+
+ True
+ Auto-email confirmed sale orders
+
@@ -23,18 +30,9 @@
so users can freely customize/delete them -->
-
+
From 99fac6333ae1e87b7e9685eb4afd94a8bc976604 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Fri, 16 Mar 2012 10:36:22 +0530
Subject: [PATCH 037/126] [IMP] stock : Improve the workflow button visibility.
bzr revid: mdi@tinyerp.com-20120316050622-7d7cldlkxdryq6o5
---
addons/stock/stock_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index ff3e1171dbf..c4ab0ac3462 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -1210,7 +1210,7 @@
-
+
From c55193994d0421b1d9e80c808a415d1dba7299d6 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Mon, 19 Mar 2012 10:57:15 +0530
Subject: [PATCH 038/126] [IMP] sale: improve the logic of open invoice and
open delivery oder so they will work for multiple invoices and delivery
orders, added set to draft button in sent state
bzr revid: psi@tinyerp.com-20120319052715-n7nga0ky12mwwtya
---
addons/sale/sale.py | 91 +++++++++++++++++++++------------------
addons/sale/sale_view.xml | 4 +-
2 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index d19d43a22cf..3b7eff07cbf 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -516,60 +516,65 @@ class sale_order(osv.osv):
def action_view_invoice(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
inv_ids = []
+ result = {}
for so in self.browse(cr, uid, ids, context=context):
inv_ids+= [invoice.id for invoice in so.invoice_ids]
-
- res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
- res_id = res and res[1] or False
-
- return {
- 'name': _('Customer Invoices'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'view_id': [res_id],
- 'res_model': 'account.invoice',
- 'context': "{'type':'out_invoice', 'journal_type': 'sale'}",
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- 'res_id': inv_ids and inv_ids[0] or False,
- }
+ if len(inv_ids)>1:
+ res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_tree')
+ result.update({
+ 'view_mode': 'tree,form',
+ 'res_id': inv_ids or False
+ })
+ else:
+ res = mod_obj.get_object_reference(cr, uid, 'account', 'invoice_form')
+ result.update({
+ 'view_mode': 'form',
+ 'res_id': inv_ids and inv_ids[0] or False,
+ })
+ res_id = res and res[1] or False,
+ result.update({
+ 'name': _('Cutomer Invoice'),
+ 'view_type': 'form',
+ 'view_id': [res_id],
+ 'res_model': 'account.invoice',
+ 'context': "{'type':'out_invoice', 'journal_type': 'sale'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ })
+ return result
+
def action_view_delivery(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
pick_ids = []
+ result = {}
for so in self.browse(cr, uid, ids, context=context):
pick_ids += [picking.id for picking in so.picking_ids]
if len(pick_ids) > 1:
res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_tree')
- res_id = res and res[1] or False,
- return {
- 'name': _('Delivery Order'),
- 'view_type': 'form',
- 'view_mode': 'tree',
- 'view_id': res_id,
- 'res_model': 'stock.picking',
- 'context': "{'type':'out'}",
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- 'res_id': pick_ids or False,
- }
- else:
+ result.update({
+ 'view_mode': 'tree,form',
+ 'res_id': pick_ids or False
+ })
+ else:
res = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
- res_id = res and res[1] or False,
- return {
- 'name': _('Delivery Order'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'view_id': res_id,
- 'res_model': 'stock.picking',
- 'context': "{'type':'out'}",
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- 'res_id': pick_ids and pick_ids[0] or False,
- }
+ result.update({
+ 'view_mode': 'form',
+ 'res_id': pick_ids and pick_ids[0] or False,
+ })
+ res_id = res and res[1] or False,
+ result.update({
+ 'name': _('Delivery Order'),
+ 'view_type': 'form',
+ 'view_id': res_id,
+ 'res_model': 'stock.picking',
+ 'context': "{'type':'out'}",
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ })
+ return result
def action_invoice_create(self, cr, uid, ids, grouped=False, states=['confirmed', 'done', 'exception'], date_inv = False, context=None):
res = False
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 2ad4059cb42..8ff740144e8 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -203,11 +203,11 @@
-
+
-
+
Date: Mon, 19 Mar 2012 12:13:13 +0530
Subject: [PATCH 039/126] [IMP]hr_evaluation: Improvement in view of
hr.evaluation.interview model
bzr revid: mma@tinyerp.com-20120319064313-copl2xbroairqlhz
---
addons/hr_evaluation/hr_evaluation_view.xml | 27 +++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml
index 1f1b5af553c..e67378df124 100644
--- a/addons/hr_evaluation/hr_evaluation_view.xml
+++ b/addons/hr_evaluation/hr_evaluation_view.xml
@@ -298,21 +298,18 @@
From 6c2be6eba42e10cf7021a6bd1158283de8c2c3e2 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 21 Mar 2012 18:12:45 +0530
Subject: [PATCH 041/126] [IMP]sale: update the domain on Open delivery order
button so it will work on web and gtk
bzr revid: psi@tinyerp.com-20120321124245-kfxrszc13za2cjtu
---
addons/sale/sale_view.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 8ff740144e8..55718664bcf 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -214,7 +214,7 @@
attrs="{'invisible': ['|','|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking'),
'&','&',('order_policy','=','postpaid'),('state', '=','progress'),('shipped','=',False)]}"/>
+ attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
From 5488e8ae0a1bc91e18a12524edc2304b0d18d5b1 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Tue, 27 Mar 2012 17:14:44 +0530
Subject: [PATCH 042/126] [IMP] mail, account, sale, purchase: remove
_hook_msg_sent from account, sale and purchase and revert all changes of mail
as it will be done in other branch
bzr revid: psi@tinyerp.com-20120327114444-qj9z73j0zaq4kkd2
---
addons/account/account_invoice.py | 16 +++++++++++-----
addons/mail/mail_message.py | 4 ----
addons/mail/wizard/mail_compose_message.py | 4 +---
.../mail/wizard/mail_compose_message_view.xml | 1 -
addons/purchase/purchase.py | 17 ++++++++++++-----
addons/sale/sale.py | 17 ++++++++++++-----
6 files changed, 36 insertions(+), 23 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 3a82bfd9854..365200743d8 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -371,11 +371,6 @@ class account_invoice(osv.osv):
_('There is no Accounting Journal of type Sale/Purchase defined!'))
else:
raise orm.except_orm(_('Unknown Error'), str(e))
-
- def _hook_message_sent(self, cr, uid, invoice_id, context=None):
- wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'account.invoice', invoice_id, 'invoice_sent', cr)
- return True
def invoice_print(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService('workflow')
@@ -1699,4 +1694,15 @@ class res_partner(osv.osv):
res_partner()
+class mail_message(osv.osv):
+ _name = 'mail.message'
+ _inherit = 'mail.message'
+
+ def _postprocess_sent_message(self, cr, uid, message, context=None):
+ if message.model == 'account.invoice':
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'account.invoice', message.res_id, 'invoice_sent', cr)
+ return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
+
+mail_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py
index f2565decb79..695b0b905e8 100644
--- a/addons/mail/mail_message.py
+++ b/addons/mail/mail_message.py
@@ -464,7 +464,6 @@ class mail_message(osv.osv):
msg['sub_type'] = msg['subtype'] or 'plain'
return msg
-
def send(self, cr, uid, ids, auto_commit=False, context=None):
"""Sends the selected emails immediately, ignoring their current
state (mails that have already been sent should not be passed
@@ -521,9 +520,6 @@ class mail_message(osv.osv):
message.write({'state':'sent', 'message_id': res})
else:
message.write({'state':'exception'})
- model_pool = self.pool.get(message.model)
- if hasattr(model_pool, '_hook_message_sent'):
- model_pool._hook_message_sent(cr, uid, message.res_id, context=context)
# if auto_delete=True then delete that sent messages as well as attachments
message.refresh()
if message.state == 'sent' and message.auto_delete:
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 4f1163c0d69..bc4a6fbe233 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -100,7 +100,6 @@ class mail_compose_message(osv.osv_memory):
if not result.get('email_from'):
current_user = self.pool.get('res.users').browse(cr, uid, uid, context)
result['email_from'] = current_user.user_email or False
- result['subtype'] = 'html'
return result
_columns = {
@@ -159,9 +158,8 @@ class mail_compose_message(osv.osv_memory):
if not (subject.startswith('Re:') or subject.startswith(re_prefix)):
subject = "%s %s" % (re_prefix, subject)
result.update({
- 'subtype' : message_data.subtype or 'plain', # default to the text version due to quoting
+ 'subtype' : 'plain', # default to the text version due to quoting
'body_text' : body,
- 'body_html' : message_data.body_html,
'subject' : subject,
'attachment_ids' : [],
'model' : message_data.model or False,
diff --git a/addons/mail/wizard/mail_compose_message_view.xml b/addons/mail/wizard/mail_compose_message_view.xml
index 3a44b040139..d559d679c8b 100644
--- a/addons/mail/wizard/mail_compose_message_view.xml
+++ b/addons/mail/wizard/mail_compose_message_view.xml
@@ -23,7 +23,6 @@
-
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index b5f8568e5ca..0093222d78d 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -328,11 +328,6 @@ class purchase_order(osv.osv):
self.write(cr, uid, ids, {'state': 'approved', 'date_approve': fields.date.context_today(self,cr,uid,context=context)})
return True
- def _hook_message_sent(self, cr, uid, purchase_id, context=None):
- wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'purchase.order', purchase_id, 'send_rfq', cr)
- return True
-
def wkf_send_rfq(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')])
@@ -1020,4 +1015,16 @@ class procurement_order(osv.osv):
return res
procurement_order()
+
+class mail_message(osv.osv):
+ _name = 'mail.message'
+ _inherit = 'mail.message'
+
+ def _postprocess_sent_message(self, cr, uid, message, context=None):
+ if message.model == 'purchase.order':
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'purchase.order', message.res_id, 'send_rfq', cr)
+ return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
+
+mail_message()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 3b7eff07cbf..50f6bf81153 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -752,11 +752,6 @@ class sale_order(osv.osv):
'nodestroy': True,
}
- def _hook_message_sent(self, cr, uid, sale_id, context=None):
- wf_service = netsvc.LocalService("workflow")
- wf_service.trg_validate(uid, 'sale.order', sale_id, 'quotation_sent', cr)
- return True
-
def procurement_lines_get(self, cr, uid, ids, *args):
res = []
for order in self.browse(cr, uid, ids, context={}):
@@ -1520,4 +1515,16 @@ class sale_config_picking_policy(osv.osv_memory):
sale_config_picking_policy()
+class mail_message(osv.osv):
+ _name = 'mail.message'
+ _inherit = 'mail.message'
+
+ def _postprocess_sent_message(self, cr, uid, message, context=None):
+ if message.model == 'sale.order':
+ wf_service = netsvc.LocalService("workflow")
+ wf_service.trg_validate(uid, 'sale.order', message.res_id, 'quotation_sent', cr)
+ return super(mail_message, self)._postprocess_sent_message(cr, uid, message=message, context=context)
+
+mail_message()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
From cede2bb069d3ae9566cf38e908e9668e6ef77db2 Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Tue, 27 Mar 2012 18:56:05 +0530
Subject: [PATCH 043/126] [IMP] account : Improved the code.
bzr revid: mdi@tinyerp.com-20120327132605-xnd1k0bo3qj9fu07
---
addons/account/account_invoice.py | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 365200743d8..6b9b2b0e41c 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -392,18 +392,12 @@ class account_invoice(osv.osv):
email_template_obj = self.pool.get('email.template')
mod_obj = self.pool.get('ir.model.data')
- template_id = email_template_obj.search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)[0]
- template = email_template_obj.browse(cr, uid, template_id)
- model_data_id = mod_obj._get_id(cr, uid, 'mail', 'email_compose_message_wizard_form')
- res_id = mod_obj.browse(cr, uid, model_data_id, context=context).res_id
+ template_id = email_template_obj.search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)
+ res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
+ res_id = res and res[1] or False
- #EDI EXport data
- id = ids[0]
- invoice = self.browse(cr, uid, id, context)
-# if not invoice.partner_id.opt_out:
-# invoice.edi_export_and_email(template_ext_id='account.email_template_edi_invoice', context=context)
ctx = context.copy()
- ctx.update({'active_model': 'account.invoice', 'active_id': invoice.id, 'mail.compose.template_id': template.id})
+ ctx.update({'active_model': 'account.invoice', 'active_id': ids[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
From 4a274f3dda4c3958aae817effc109d1df462b2c4 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 28 Mar 2012 11:34:43 +0530
Subject: [PATCH 044/126] [IMP] account, purchase, sale: Improve code to add a
link in mail
bzr revid: psi@tinyerp.com-20120328060443-34pimg3azu50dy4v
---
addons/account/account_invoice.py | 24 +++++++++------------
addons/account/account_invoice_workflow.xml | 6 +++---
addons/account/edi/invoice.py | 13 +++++++++++
addons/purchase/edi/purchase_order.py | 13 +++++++++++
addons/purchase/purchase.py | 9 ++------
addons/sale/sale.py | 16 +++++++-------
6 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 6b9b2b0e41c..dc2b70c0094 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -389,26 +389,22 @@ class account_invoice(osv.osv):
}
def action_invoice_sent(self, cr, uid, ids, context=None):
- email_template_obj = self.pool.get('email.template')
mod_obj = self.pool.get('ir.model.data')
-
- template_id = email_template_obj.search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)
+ template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)[0]
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
-
ctx = context.copy()
ctx.update({'active_model': 'account.invoice', 'active_id': ids[0], 'mail.compose.template_id': template_id})
-
return {
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'mail.compose.message',
- 'views': [(res_id, 'form')],
- 'view_id': res_id,
- 'type': 'ir.actions.act_window',
- 'target': 'new',
- 'context': ctx,
- 'nodestroy': True,
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'mail.compose.message',
+ 'views': [(res_id, 'form')],
+ 'view_id': res_id,
+ 'type': 'ir.actions.act_window',
+ 'target': 'new',
+ 'context': ctx,
+ 'nodestroy': True,
}
def confirm_paid(self, cr, uid, ids, context=None):
diff --git a/addons/account/account_invoice_workflow.xml b/addons/account/account_invoice_workflow.xml
index 7e536036628..faf38acd924 100644
--- a/addons/account/account_invoice_workflow.xml
+++ b/addons/account/account_invoice_workflow.xml
@@ -66,12 +66,12 @@ write({'state':'cancel'})
invoice_open
-
+
invoice_sent
-
+
account.move.line
@@ -85,7 +85,7 @@ write({'state':'cancel'})
move_line_id_payment_get()
test_paid()
-
+
invoice_cancel
diff --git a/addons/account/edi/invoice.py b/addons/account/edi/invoice.py
index d36e9163ba9..97b633d1740 100644
--- a/addons/account/edi/invoice.py
+++ b/addons/account/edi/invoice.py
@@ -21,6 +21,7 @@
from osv import fields, osv, orm
from edi import EDIMixin
+from edi.models import edi
INVOICE_LINE_EDI_STRUCT = {
'name': True,
@@ -71,6 +72,18 @@ INVOICE_EDI_STRUCT = {
class account_invoice(osv.osv, EDIMixin):
_inherit = 'account.invoice'
+ def action_invoice_sent(self, cr, uid, ids, context=None):
+ """"Override this method to add a link to mail"""
+ if context is None:
+ context = {}
+ invoice_objs = self.browse(cr, uid, ids, context=context)
+ edi_token = self.pool.get('edi.document').export_edi(cr, uid, invoice_objs, context = context)[0]
+ web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
+ edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
+ ctx = context.copy()
+ ctx.update(edi_context)
+ return super(account_invoice, self).action_invoice_sent(cr, uid, ids, context=ctx)
+
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
"""Exports a supplier or customer invoice"""
edi_struct = dict(edi_struct or INVOICE_EDI_STRUCT)
diff --git a/addons/purchase/edi/purchase_order.py b/addons/purchase/edi/purchase_order.py
index b8359f3bf7f..8330bb21ec2 100644
--- a/addons/purchase/edi/purchase_order.py
+++ b/addons/purchase/edi/purchase_order.py
@@ -24,6 +24,7 @@ from dateutil.relativedelta import relativedelta
from osv import fields, osv, orm
from edi import EDIMixin
+from edi.models import edi
from tools import DEFAULT_SERVER_DATE_FORMAT
from tools.translate import _
@@ -61,6 +62,18 @@ PURCHASE_ORDER_EDI_STRUCT = {
class purchase_order(osv.osv, EDIMixin):
_inherit = 'purchase.order'
+ def wkf_send_rfq(self, cr, uid, ids, context=None):
+ """"Override this method to add a link to mail"""
+ if context is None:
+ context = {}
+ purchase_objs = self.browse(cr, uid, ids, context=context)
+ edi_token = self.pool.get('edi.document').export_edi(cr, uid, purchase_objs, context = context)[0]
+ web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
+ edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
+ ctx = context.copy()
+ ctx.update(edi_context)
+ return super(purchase_order, self).wkf_send_rfq(cr, uid, ids, context=ctx)
+
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
"""Exports a purchase order"""
edi_struct = dict(edi_struct or PURCHASE_ORDER_EDI_STRUCT)
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 0093222d78d..1e6f7602280 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -330,18 +330,13 @@ class purchase_order(osv.osv):
def wkf_send_rfq(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
- template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')])
+ template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')], context=context)[0]
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
- #EDI EXport data
- id = ids[0]
- order = self.browse(cr, uid, id, context)
- #if not order.partner_id.opt_out:
- #order.edi_export_and_email(template_ext_id='purchase.email_template_edi_purchase', context=context)
ctx = context.copy()
- ctx.update({'active_model': 'purchase.order', 'active_id': id, 'mail.compose.template_id': template_id})
+ ctx.update({'active_model': 'purchase.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 50f6bf81153..4c450aca3a7 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -474,13 +474,13 @@ class sale_order(osv.osv):
def print_quotation(self, cr, uid, ids, context=None):
wf_service = netsvc.LocalService("workflow")
for id in ids:
- wf_service.trg_validate(uid, 'sale.order', id, 'quotation_sent', cr)
+ wf_service.trg_validate(uid, 'sale.order', id, 'quotation_sent', cr)
datas = {
'model': 'sale.order',
'ids': ids,
'form': self.read(cr, uid, ids, context=context)[0],
- }
- return {'type': 'ir.actions.report.xml', 'report_name': 'sale.order', 'datas': datas, 'nodestroy': True}
+ }
+ return {'type': 'ir.actions.report.xml', 'report_name': 'sale.order', 'datas': datas, 'nodestroy': True}
def manual_invoice(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
@@ -735,17 +735,17 @@ class sale_order(osv.osv):
def action_quotation_sent(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
- template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)
- model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','email_compose_message_wizard_form')], context=context)
- resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
+ template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)[0]
+ res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
+ res_id = res and res[1] or False
ctx = context.copy()
ctx.update({'active_model': 'sale.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'mail.compose.message',
- 'views': [(resource_id,'form')],
- 'view_id': resource_id,
+ 'views': [(res_id,'form')],
+ 'view_id': res_id,
'type': 'ir.actions.act_window',
'target': 'new',
'context': ctx,
From a85f78a48bb5a8681746925eaf6eb62243472453 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 2 Apr 2012 11:58:17 +0530
Subject: [PATCH 045/126] [ADD]event_sale: Add event_items fields for
product_ids and sales_ends fields.
bzr revid: atp@tinyerp.com-20120402062817-yjd1pay0kqolv8fe
---
addons/event_sale/event_sale.py | 30 +++++++++++++++++-
addons/event_sale/event_sale_view.xml | 45 +++++++++++++++++++++++++++
2 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index df115c0eef4..0208714b083 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -92,4 +92,32 @@ class sale_order_line(osv.osv):
message = _("The registration %s has been created from the Sale Order %s.") % (registration_id, order_line.order_id.name)
registration_obj.log(cr, uid, registration_id, message)
return super(sale_order_line, self).button_confirm(cr, uid, ids, context=context)
-
+
+class event_event(osv.osv):
+ _inherit = 'event.event'
+ _columns = {
+ 'event_item_ids': fields.one2many('event.items','event_id', 'Event Items'),
+ }
+
+class event_items(osv.osv):
+ _name = "event.items"
+ _columns = {
+ 'product_id': fields.many2one('product.product', 'Product', required=True),
+ 'qty': fields.integer('Quantity'),
+ 'price': fields.integer('Price'),
+ 'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
+ 'discount': fields.integer('Discount'),
+ 'event_id': fields.many2one('event.event', 'Event'),
+ 'sales_end_date': fields.date('Sales End')
+ }
+
+ def onchange_product_id(self, cr, uid, ids, product, context=None):
+ product_obj = self.pool.get('product.product')
+ data = {}
+ if not product:
+ return {'value': data}
+ price = product_obj.browse(cr, uid, product).list_price
+ uom = product_obj.browse(cr, uid, product).uom_id.id
+ data['price'] = price
+ data['uom_id'] = uom
+ return {'value': data}
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 4387e3a725a..1eb15e944a9 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -29,5 +29,50 @@
+
+
+ Events Inherit
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+ Event Items Tree
+ event.items
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ Event Items Form
+ event.items
+ form
+
+
+
+
+
From aa8e83ea2d44f8e59f4b6dee915f0aea101063fa Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Mon, 2 Apr 2012 18:06:51 +0530
Subject: [PATCH 046/126] [IMP] account, sale, purchase : Cleanup the use of
dicts, remove the automatic email send by the EDI and use proper template
based on an XML ID.
bzr revid: mdi@tinyerp.com-20120402123651-ekqw8z66ltpqnxgz
---
addons/account/account_invoice.py | 7 ++++---
addons/account/edi/invoice.py | 4 +---
addons/account/edi/invoice_action_data.xml | 4 ++++
addons/purchase/edi/purchase_order.py | 4 +---
addons/purchase/edi/purchase_order_action_data.xml | 6 +++++-
addons/purchase/purchase.py | 9 ++++-----
addons/sale/edi/sale_order.py | 6 ++----
addons/sale/edi/sale_order_action_data.xml | 4 ++++
addons/sale/sale.py | 7 ++++---
9 files changed, 29 insertions(+), 22 deletions(-)
diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py
index 8d0d185db23..d715778584f 100644
--- a/addons/account/account_invoice.py
+++ b/addons/account/account_invoice.py
@@ -388,11 +388,12 @@ class account_invoice(osv.osv):
def action_invoice_sent(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
- template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'account.invoice')], context=context)[0]
+ template = mod_obj.get_object_reference(cr, uid, 'account', 'email_template_edi_invoice')
+ template_id = template and template[1] or False
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
- ctx = context.copy()
- ctx.update({'active_model': 'account.invoice', 'active_id': ids[0], 'mail.compose.template_id': template_id})
+ ctx = dict(context, active_model='account.invoice', active_id=ids[0])
+ ctx.update({'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/account/edi/invoice.py b/addons/account/edi/invoice.py
index eb9f97c80db..6e4d601e987 100644
--- a/addons/account/edi/invoice.py
+++ b/addons/account/edi/invoice.py
@@ -79,9 +79,7 @@ class account_invoice(osv.osv, EDIMixin):
invoice_objs = self.browse(cr, uid, ids, context=context)
edi_token = self.pool.get('edi.document').export_edi(cr, uid, invoice_objs, context = context)[0]
web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
- edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
- ctx = context.copy()
- ctx.update(edi_context)
+ ctx = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
return super(account_invoice, self).action_invoice_sent(cr, uid, ids, context=ctx)
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
diff --git a/addons/account/edi/invoice_action_data.xml b/addons/account/edi/invoice_action_data.xml
index ce837c6662b..4dd225a493d 100644
--- a/addons/account/edi/invoice_action_data.xml
+++ b/addons/account/edi/invoice_action_data.xml
@@ -2,6 +2,7 @@
+
@@ -31,9 +33,11 @@
so users can freely customize/delete them -->
+
diff --git a/addons/purchase/edi/purchase_order.py b/addons/purchase/edi/purchase_order.py
index 1994668b35b..3a82e990a14 100644
--- a/addons/purchase/edi/purchase_order.py
+++ b/addons/purchase/edi/purchase_order.py
@@ -69,9 +69,7 @@ class purchase_order(osv.osv, EDIMixin):
purchase_objs = self.browse(cr, uid, ids, context=context)
edi_token = self.pool.get('edi.document').export_edi(cr, uid, purchase_objs, context = context)[0]
web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
- edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
- ctx = context.copy()
- ctx.update(edi_context)
+ ctx = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
return super(purchase_order, self).wkf_send_rfq(cr, uid, ids, context=ctx)
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml
index c4a7f75819a..5fafa1f4b1a 100644
--- a/addons/purchase/edi/purchase_order_action_data.xml
+++ b/addons/purchase/edi/purchase_order_action_data.xml
@@ -2,6 +2,7 @@
+
@@ -27,9 +29,11 @@
so users can freely customize/delete them -->
+
@@ -151,4 +155,4 @@ ${object.company_id.website or ''}
]]>
-
\ No newline at end of file
+
diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 7e5c28d0050..19e3ce5db95 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -327,13 +327,12 @@ class purchase_order(osv.osv):
def wkf_send_rfq(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
- template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'purchase.order')], context=context)[0]
-
+ template = mod_obj.get_object_reference(cr, uid, 'purchase', 'email_template_edi_purchase')
+ template_id = template and template[1] or False
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
-
- ctx = context.copy()
- ctx.update({'active_model': 'purchase.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
+ ctx = dict(context, active_model='purchase.order', active_id=ids[0])
+ ctx.update({'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
diff --git a/addons/sale/edi/sale_order.py b/addons/sale/edi/sale_order.py
index 02c6ce617e9..b49f6c1e415 100644
--- a/addons/sale/edi/sale_order.py
+++ b/addons/sale/edi/sale_order.py
@@ -71,9 +71,7 @@ class sale_order(osv.osv, EDIMixin):
sale_objs = self.browse(cr, uid, ids, context=context)
edi_token = self.pool.get('edi.document').export_edi(cr, uid, sale_objs, context = context)[0]
web_root_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
- edi_context = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
- ctx = context.copy()
- ctx.update(edi_context)
+ ctx = dict(context, edi_web_url_view=edi.EDI_VIEW_WEB_URL % (web_root_url, cr.dbname, edi_token))
return super(sale_order, self).action_quotation_sent(cr, uid, ids, context=ctx)
def edi_export(self, cr, uid, records, edi_struct=None, context=None):
@@ -226,4 +224,4 @@ class sale_order_line(osv.osv, EDIMixin):
edi_doc_list.append(edi_doc)
return edi_doc_list
-# 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/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml
index 9fcee173014..a92c87de46f 100644
--- a/addons/sale/edi/sale_order_action_data.xml
+++ b/addons/sale/edi/sale_order_action_data.xml
@@ -2,6 +2,7 @@
+
@@ -29,9 +31,11 @@
so users can freely customize/delete them -->
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 9eb1336a0d9..8f88e28a3b8 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -730,11 +730,12 @@ class sale_order(osv.osv):
def action_quotation_sent(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
- template_id = self.pool.get('email.template').search(cr, uid, [('model_id', '=', 'sale.order')], context=context)[0]
+ template = mod_obj.get_object_reference(cr, uid, 'sale', 'email_template_edi_sale')
+ template_id = template and template[1] or False
res = mod_obj.get_object_reference(cr, uid, 'mail', 'email_compose_message_wizard_form')
res_id = res and res[1] or False
- ctx = context.copy()
- ctx.update({'active_model': 'sale.order', 'active_id': ids[0], 'mail.compose.template_id': template_id})
+ ctx = dict(context, active_model='sale.order', active_id=ids[0])
+ ctx.update({'mail.compose.template_id': template_id})
return {
'view_type': 'form',
'view_mode': 'form',
From 3eb66d427a23399cc61fe3e4b5dcf7b84b99644a Mon Sep 17 00:00:00 2001
From: "Divyesh Makwana (Open ERP)"
Date: Tue, 3 Apr 2012 11:27:24 +0530
Subject: [PATCH 047/126] [IMP] email_template : Remove the subtype equal to
html.
bzr revid: mdi@tinyerp.com-20120403055724-fi7jvk30ptnydy61
---
addons/email_template/wizard/mail_compose_message.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py
index c68f884f7ef..a4fd749979c 100644
--- a/addons/email_template/wizard/mail_compose_message.py
+++ b/addons/email_template/wizard/mail_compose_message.py
@@ -102,14 +102,12 @@ class mail_compose_message(osv.osv_memory):
'res_id' : ids[0] if ids else False
}
att_ids.append(attachment_obj.create(cr, uid, data_attach))
- values['subtype'] = 'html'
values['attachment_ids'] = att_ids
else:
# restore defaults
values = self.default_get(cr, uid, self.fields_get_keys(cr, uid), context)
values.update(use_template=use_template, template_id=template_id)
- values['subtype'] = 'html'
return {'value': values}
From 95952a8d56abb3c69e3597991b3c3819e65c8775 Mon Sep 17 00:00:00 2001
From: "Bharat Devnani (OpenERP)"
Date: Tue, 17 Apr 2012 15:03:40 +0530
Subject: [PATCH 048/126] [ADD] added functionality which checks the available
seats at the time of confirming registration, and set current date in demo
data inorder to show the upcoming events
bzr revid: bde@tinyerp.com-20120417093340-824lazijkbf83m1x
---
addons/event/event.py | 12 ++++++++++++
addons/event/event_demo.xml | 8 ++++----
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/addons/event/event.py b/addons/event/event.py
index 6bf1ea24786..071835fa240 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -102,6 +102,14 @@ class event_event(osv.osv):
total_confirmed = self.event.register_current
if total_confirmed < self.event.register_min or total_confirmed > self.event.register_max and self.event.register_max!=0:
raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. You should maybe reconsider those limits before going further") % (self.event.name))
+
+ def check_registration_limits_before(self, cr, uid, ids, no_of_registration, context=None):
+ total_confirmed = self.browse(cr, uid, ids, context=context).register_current
+ register_max = self.browse(cr, uid, ids, context=context).register_max
+ available_seats = register_max - total_confirmed
+ if no_of_registration > available_seats:
+ raise osv.except_osv(_('Warning!'),_("Only %d Seats are Available!") % (available_seats))
+
def confirm_event(self, cr, uid, ids, context=None):
register_pool = self.pool.get('event.registration')
@@ -295,6 +303,10 @@ class event_registration(osv.osv):
def registration_open(self, cr, uid, ids, context=None):
""" Open Registration
"""
+ event_obj = self.pool.get('event.event')
+ event_id = self.browse(cr, uid, ids, context=context)[0].event_id.id
+ no_of_registration = self.browse(cr, uid, ids, context=context)[0].nb_register
+ event_obj.check_registration_limits_before(cr, uid, event_id, no_of_registration, context=context)
res = self.confirm_registration(cr, uid, ids, context=context)
self.mail_user(cr, uid, ids, context=context)
return res
diff --git a/addons/event/event_demo.xml b/addons/event/event_demo.xml
index 96bc64e12aa..d5907b4bebf 100644
--- a/addons/event/event_demo.xml
+++ b/addons/event/event_demo.xml
@@ -38,16 +38,16 @@
Opera of Verdi
-
-
+
+
50
350
Conference on ERP Business
-
-
+
+
200
From 27d279e3c3e21233005efa5b4c2aca788044f912 Mon Sep 17 00:00:00 2001
From: "Bharat Devnani (OpenERP)"
Date: Tue, 17 Apr 2012 17:01:20 +0530
Subject: [PATCH 049/126] [IMP] improved the date manipulation in
event/event_demo.xml
bzr revid: bde@tinyerp.com-20120417113120-cm6tro3par1vtpy2
---
addons/event/event_demo.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/addons/event/event_demo.xml b/addons/event/event_demo.xml
index d5907b4bebf..81dad07b5e4 100644
--- a/addons/event/event_demo.xml
+++ b/addons/event/event_demo.xml
@@ -38,16 +38,16 @@
Opera of Verdi
-
-
+
+
50
350
Conference on ERP Business
-
-
+
+
200
From 89547acdfb6d883b6fc5c8790dbd2cc3abadedca Mon Sep 17 00:00:00 2001
From: "Bharat Devnani (OpenERP)"
Date: Wed, 18 Apr 2012 14:56:37 +0530
Subject: [PATCH 050/126] [ADD] added text area in kanban view inorder to input
number of seats
bzr revid: bde@tinyerp.com-20120418092637-uprsxgafbu1tl8vw
---
addons/event/__openerp__.py | 3 +++
addons/event/event.py | 6 +++++-
addons/event/event_view.xml | 1 +
addons/event/static/src/css/event.css | 3 +++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index ea0e4316ef5..b9753835aeb 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -54,6 +54,9 @@ Note that:
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
'css': ['static/src/css/event.css'],
+ 'js': [
+ #'static/src/js/event.js',
+ ],
'installable': True,
'application': True,
'auto_install': False,
diff --git a/addons/event/event.py b/addons/event/event.py
index 6bf1ea24786..27b8269db20 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -215,10 +215,13 @@ class event_event(osv.osv):
register_pool = self.pool.get('event.registration')
user_pool = self.pool.get('res.users')
user = user_pool.browse(cr, uid, uid, context=context)
+ print "user", user
curr_reg_ids = register_pool.search(cr, uid, [('user_id', '=', user.id), ('event_id', '=' , ids[0])])
+ print "curr_reg_ids", curr_reg_ids
#the subscription is done with UID = 1 because in case we share the kanban view, we want anyone to be able to subscribe
if not curr_reg_ids:
- curr_reg_ids = [register_pool.create(cr, 1, {'event_id': ids[0] ,'email': user.user_email, 'name':user.name, 'user_id': user.id,})]
+ curr_reg_ids = [register_pool.create(cr, 1, {'event_id': ids[0] ,'email': user.user_email, 'name':user.name, 'user_id': user.id, 'nb_register': 5})]
+ print "::::::::::::::", curr_reg_ids
return register_pool.confirm_registration(cr, 1, curr_reg_ids, context=context)
def unsubscribe_to_event(self, cr, uid, ids, context=None):
@@ -288,6 +291,7 @@ class event_registration(osv.osv):
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
def confirm_registration(self, cr, uid, ids, context=None):
+ print "confirm_registrationconfirm_registration"
self.message_append(cr, uid, ids,_('State set to open'),body_text= _('Open'))
return self.write(cr, uid, ids, {'state': 'open'}, context=context)
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 4e22569c3e1..d4bbe059084 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -203,6 +203,7 @@
+
Subscribe
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index a0f738e6323..52cf194dbe7 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -115,4 +115,7 @@ div.oe_fold_column{
display: inline;
background-color: #DC5F59;
}
+ .no_of_seats{
+ width:40px;
+ }
From 6dbbf9e79d16f83d46087b50466c34827823e582 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Thu, 19 Apr 2012 12:23:06 +0530
Subject: [PATCH 051/126] [IMP] resolve conflicts
bzr revid: psi@tinyerp.com-20120419065306-2ie570l1mpu9jegt
---
addons/mail/wizard/mail_compose_message.py | 5 -----
1 file changed, 5 deletions(-)
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py
index 107ddfbe764..59554acd57b 100644
--- a/addons/mail/wizard/mail_compose_message.py
+++ b/addons/mail/wizard/mail_compose_message.py
@@ -259,12 +259,7 @@ class mail_compose_message(osv.osv_memory):
attachments=attachment, references=references, res_id=int(mail.res_id),
subtype=mail.subtype, headers=headers, context=context)]
# in normal mode, we send the email immediately, as the user expects us to (delay should be sufficiently small)
-<<<<<<< TREE
- mail_message.send(cr, uid, [msg_id], context=context)
-=======
mail_message.send(cr, uid, msg_ids, context=context)
-
->>>>>>> MERGE-SOURCE
return {'type': 'ir.actions.act_window_close'}
def render_template(self, cr, uid, template, model, res_id, context=None):
From 2a6a022d032bc3ebd52d93d2b9db8da8e3165bf2 Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Thu, 19 Apr 2012 14:37:08 +0530
Subject: [PATCH 052/126] [IMP] remove conflicts
bzr revid: psi@tinyerp.com-20120419090708-ezvbeb00093ojkrt
---
addons/account/account_invoice_view.xml | 9 +--
addons/hr_holidays/hr_holidays_view.xml | 14 ----
addons/sale/sale.py | 94 -------------------------
addons/sale/sale_view.xml | 67 ++++++------------
4 files changed, 21 insertions(+), 163 deletions(-)
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 88af88ac4e1..ac0fd9de962 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -303,18 +303,11 @@
-
+
-<<<<<<< TREE
-=======
-
-
-
-
->>>>>>> MERGE-SOURCE
diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml
index b0db225df25..3006f50302e 100644
--- a/addons/hr_holidays/hr_holidays_view.xml
+++ b/addons/hr_holidays/hr_holidays_view.xml
@@ -87,17 +87,10 @@
-<<<<<<< TREE
-=======
-
-
-
-
->>>>>>> MERGE-SOURCE
@@ -138,17 +131,10 @@
-<<<<<<< TREE
-=======
-
-
-
-
->>>>>>> MERGE-SOURCE
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 43209ad4bcf..71846387f65 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -1473,98 +1473,6 @@ class sale_order_line(osv.osv):
sale_order_line()
-<<<<<<< TREE
-class sale_config_picking_policy(osv.osv_memory):
- _name = 'sale.config.picking_policy'
- _inherit = 'res.config'
-
- _columns = {
- 'name': fields.char('Name', size=64),
- 'sale_orders': fields.boolean('Based on Sales Orders',),
- 'deli_orders': fields.boolean('Based on Delivery Orders'),
- 'task_work': fields.boolean('Based on Tasks\' Work'),
- 'timesheet': fields.boolean('Based on Timesheet'),
- 'order_policy': fields.selection([
- ('manual', 'Invoice Based on Sales Orders'),
- ('picking', 'Invoice Based on Deliveries'),
- ], 'Main Method Based On', required=True, help="You can generate invoices based on sales orders or based on shippings."),
- 'charge_delivery': fields.boolean('Do you charge the delivery?'),
- 'time_unit': fields.many2one('product.uom','Main Working Time Unit')
- }
- _defaults = {
- 'order_policy': 'manual',
- 'time_unit': lambda self, cr, uid, c: self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Hour'))], context=c) and self.pool.get('product.uom').search(cr, uid, [('name', '=', _('Hour'))], context=c)[0] or False,
- }
-
- def onchange_order(self, cr, uid, ids, sale, deli, context=None):
- res = {}
- if sale:
- res.update({'order_policy': 'manual'})
- elif deli:
- res.update({'order_policy': 'picking'})
- return {'value':res}
-
- def execute(self, cr, uid, ids, context=None):
- ir_values_obj = self.pool.get('ir.values')
- data_obj = self.pool.get('ir.model.data')
- menu_obj = self.pool.get('ir.ui.menu')
- module_obj = self.pool.get('ir.module.module')
- module_upgrade_obj = self.pool.get('base.module.upgrade')
- module_name = []
-
- group_id = data_obj.get_object(cr, uid, 'base', 'group_sale_salesman').id
-
- wizard = self.browse(cr, uid, ids)[0]
-
- if wizard.sale_orders:
- menu_id = data_obj.get_object(cr, uid, 'sale', 'menu_invoicing_sales_order_lines').id
- menu_obj.write(cr, uid, menu_id, {'groups_id':[(4,group_id)]})
-
- if wizard.deli_orders:
- menu_id = data_obj.get_object(cr, uid, 'sale', 'menu_action_picking_list_to_invoice').id
- menu_obj.write(cr, uid, menu_id, {'groups_id':[(4,group_id)]})
-
- if wizard.task_work:
- module_name.append('project_timesheet')
- module_name.append('project_mrp')
- module_name.append('account_analytic_analysis')
-
- if wizard.timesheet:
- module_name.append('account_analytic_analysis')
-
- if wizard.charge_delivery:
- module_name.append('delivery')
-
- if len(module_name):
- module_ids = []
- need_install = False
- module_ids = []
- for module in module_name:
- data_id = module_obj.name_search(cr, uid , module, [], '=')
- module_ids.append(data_id[0][0])
-
- for module in module_obj.browse(cr, uid, module_ids):
- if module.state == 'uninstalled':
- module_obj.state_update(cr, uid, [module.id], 'to install', ['uninstalled'], context)
- need_install = True
- cr.commit()
- if need_install:
- pooler.restart_pool(cr.dbname, update_module=True)[1]
-
- if wizard.time_unit:
- prod_id = data_obj.get_object(cr, uid, 'product', 'product_consultant').id
- product_obj = self.pool.get('product.product')
- product_obj.write(cr, uid, prod_id, {'uom_id':wizard.time_unit.id, 'uom_po_id': wizard.time_unit.id})
-
- ir_values_obj.set(cr, uid, 'default', False, 'order_policy', ['sale.order'], wizard.order_policy)
- if wizard.task_work and wizard.time_unit:
- company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
- self.pool.get('res.company').write(cr, uid, [company_id], {
- 'project_time_mode_id': wizard.time_unit.id
- }, context=context)
-
-sale_config_picking_policy()
-
class mail_message(osv.osv):
_name = 'mail.message'
_inherit = 'mail.message'
@@ -1577,6 +1485,4 @@ class mail_message(osv.osv):
mail_message()
-=======
->>>>>>> MERGE-SOURCE
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 5c8db74b15d..025d27e48b1 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -97,22 +97,27 @@
form
-
@@ -198,8 +278,8 @@
-
-
+
+
event.event.tree
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index 7cf87ffc38c..cebf155081b 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -133,13 +133,14 @@ div.oe_fold_column{
border:1px solid black;
margin-left:auto;
margin-right:auto;
-
+ text-align: right;
}
.oe_td_border
{
width: 5em;
padding: 2px;
border-right: 1px solid black;
+ text-align: center;
}
.oe_td_date_border
{
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index ee48956324f..81b69babebf 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -35,6 +35,7 @@ class product(osv.osv):
product()
+
class sale_order_line(osv.osv):
_inherit = 'sale.order.line'
_columns = {
@@ -98,75 +99,70 @@ class event_event(osv.osv):
_columns = {
'event_item_ids': fields.one2many('event.items','event_id', 'Event Items'),
}
-
- def make_quotation(self, cr, uid, ids, context=None):
- res = {}
- event_pool = self.pool.get('event.event')
- register_pool = self.pool.get('event.registration')
- sale_order_line_pool = self.pool.get('sale.order.line')
- sale_order = self.pool.get('sale.order')
- partner_pool = self.pool.get("res.partner")
- prod_pricelist_obj = self.pool.get('product.pricelist')
- user = self.pool.get("res.users").browse(cr, uid, uid, context=context)
- partner_ids = partner_pool.search(cr, uid, [('name', '=', user.name), ('email', '=', user.user_email)])
- if not partner_ids:
- new_partner_id = partner_pool.create(cr, uid, {'name': user.name, 'email': user.user_email})
- partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
- partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
- else:
- new_partner_id = partner_ids[0]
- partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
- partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
- for event_id in self.browse(cr, uid, ids, context=context):
- sale_order_lines = []
- price_list = prod_pricelist_obj.search(cr,uid,[],context=context)[0]
- sale_ids = sale_order.search(cr, uid, [('date_order', '=', event_id.date_begin), ('partner_id', '=', new_partner_id)])
- if not sale_ids:
-# raise osv.except_osv(_('Error !'),
-# _('sale order is already Exists for this event:'))
-# else:
- new_sale_id = sale_order.create(cr, uid, {
- 'date_order': event_id.date_begin,
- 'pricelist_id': price_list,
- 'partner_id': new_partner_id,
- 'partner_invoice_id': partner_invoice_id,
- 'partner_shipping_id': partner_shipping_id
- })
- if event_id.event_item_ids:
- for items in event_id.event_item_ids:
- product = items.product_id.id
- sale_order_line = sale_order_line_pool.create(cr, uid, {
- 'order_id': new_sale_id,
- 'name': items.product_id.name,
- 'product_uom_qty': items.qty,
- 'product_id': items.product_id.id,
- 'product_uom': items.uom_id.id,
- 'price_unit': items.price,
- 'date_planned': items.sales_end_date,
- }, context=context)
- view_id = data_obj._get_id(cr, uid, 'sale', 'view_order_form')
- if view_id:
- res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
- res = {
- 'name': _('Quotation'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'sale.order',
- 'res_id': new_sale_id,
- 'views':[(res_id,'form'), (False, 'tree')],
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- }
- return res
-
+# def subscribe_to_event(self, cr, uid, ids, context=None):
+# res = {}
+# event_pool = self.pool.get('event.event')
+# register_pool = self.pool.get('event.registration')
+# sale_order_line_pool = self.pool.get('sale.order.line')
+# sale_order = self.pool.get('sale.order')
+# partner_pool = self.pool.get("res.partner")
+# data_obj = self.pool.get("ir.model.data")
+# prod_pricelist_obj = self.pool.get('product.pricelist')
+# user = self.pool.get("res.users").browse(cr, uid, uid, context=context)
+# partner_ids = partner_pool.search(cr, uid, [('name', '=', user.name), ('email', '=', user.user_email)])
+# if not partner_ids:
+# new_partner_id = partner_pool.create(cr, uid, {'name': user.name, 'email': user.user_email})
+# partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
+# partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
+# else:
+# new_partner_id = partner_ids[0]
+# partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
+# partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
+# for event_id in self.browse(cr, uid, ids, context=context):
+# sale_order_lines = []
+# price_list = prod_pricelist_obj.search(cr,uid,[],context=context)[0]
+# new_sale_id = sale_order.create(cr, uid, {
+# 'date_order': event_id.date_begin,
+# 'pricelist_id': price_list,
+# 'partner_id': new_partner_id,
+# 'partner_invoice_id': partner_invoice_id,
+# 'partner_shipping_id': partner_shipping_id
+# })
+# if event_id.event_item_ids:
+# for items in event_id.event_item_ids:
+# product = items.product_id.id
+# sale_order_line = sale_order_line_pool.create(cr, uid, {
+# 'order_id': new_sale_id,
+# 'name': items.product_id.name,
+# 'product_uom_qty': items.qty,
+# 'product_id': items.product_id.id,
+# 'price_unit': items.price,
+# 'date_planned': items.sales_end_date,
+# }, context=context)
+# view_id = data_obj._get_id(cr, uid, 'sale', 'view_order_form')
+# if view_id:
+# res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
+# res = {
+# 'name': _('Quotation'),
+# 'view_type': 'form',
+# 'view_mode': 'form',
+# 'res_model': 'sale.order',
+# 'res_id': new_sale_id,
+# 'views':[(res_id,'form'), (False, 'tree')],
+# 'type': 'ir.actions.act_window',
+# 'nodestroy': True,
+# 'target': 'current',
+# }
+# return res
+
class event_items(osv.osv):
_name = "event.items"
_columns = {
'product_id': fields.many2one('product.product', 'Product', required=True),
- 'qty': fields.integer('Quantity'),
'price': fields.integer('Price'),
- 'uom_id': fields.many2one('product.uom', 'Unit of Measure'),
+ 'qty': fields.integer('QTY'),
+ # 'qty': fields.selection(_max_register, 'QTY'),
+ 'uom_id': fields.many2one('product.uom', 'UoM'),
'discount': fields.integer('Discount'),
'event_id': fields.many2one('event.event', 'Event'),
'sales_end_date': fields.date('Sales End')
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 7f1504b7b69..2176affac40 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -36,11 +36,10 @@
form
-
-
-
-
-
+
+
+
+
@@ -51,17 +50,16 @@
tree
-
+
+
-
-
Event Items Form
event.items
@@ -71,13 +69,10 @@
-
-
-
From 09dc29291da30ed5de8825412c9d4a2bd668a72a Mon Sep 17 00:00:00 2001
From: "Vidhin Mehta (OpenERP)"
Date: Wed, 2 May 2012 12:45:35 +0530
Subject: [PATCH 061/126] [IMP]impelment map widget.
bzr revid: vme@tinyerp.com-20120502071535-5h213fx2p5s0tlqi
---
addons/event/__openerp__.py | 1 +
addons/event/event_view.xml | 158 +++++++-------------------
addons/event/static/src/css/event.css | 1 -
addons/event/static/src/js/event.js | 52 +++++++++
4 files changed, 92 insertions(+), 120 deletions(-)
create mode 100644 addons/event/static/src/js/event.js
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index 6de6d2c62c1..85eb78f32f1 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -54,6 +54,7 @@ Note that:
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
'css': ['static/src/css/*.css'],
+ 'js': ['static/src/js/event.js'],
'installable': True,
'application': True,
'auto_install': False,
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 9276f77ed9d..87e29a641f2 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -45,124 +45,42 @@
-
-
-
- Events
- event.event
- form
+
+
+
+ Event Items Tree
+ event.items
+ tree
-
+
+
+
+
+
+
+
-
-
-
-
+
+
+ Event Items Form
+ event.items
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Events
event.event
form
@@ -190,14 +108,14 @@
-
+
@@ -250,6 +169,7 @@
+
@@ -278,8 +198,8 @@
-
-
+
+
event.event.tree
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index cebf155081b..c9f9084a583 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -130,7 +130,6 @@ div.oe_fold_column{
{
width:380px;
height:200px;
- border:1px solid black;
margin-left:auto;
margin-right:auto;
text-align: right;
diff --git a/addons/event/static/src/js/event.js b/addons/event/static/src/js/event.js
new file mode 100644
index 00000000000..6081533397a
--- /dev/null
+++ b/addons/event/static/src/js/event.js
@@ -0,0 +1,52 @@
+openerp.event = function(instance){
+ instance.web.form.widgets.add('geo_address', 'instance.event.GeoAddress');
+ instance.event.GeoAddress = instance.web.form.AbstractField.extend(_.extend({}, {
+
+ init : function(){
+ this._super.apply(this,arguments);
+ },
+
+ start:function(){
+ },
+
+ set_input_id:function(id){
+ },
+ set_value:function(value){
+ var self = this;
+ this.get_address(value).done(function(value){
+ var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
+ return self.list_addresses(address);
+ });
+
+ },
+ get_address:function(value){
+ if (!value || value.length == 0){
+ return $.Deferred().reject();
+ }
+ return new instance.web.DataSet (this,this.field.relation, this.build_context()).read_ids(value[0],["street","city","country_id"]);
+ },
+
+ list_addresses: function(address){
+ var geocoder = new google.maps.Geocoder();
+ geocoder.geocode( { 'address': address}, function(results, status)
+ {
+ if (status == google.maps.GeocoderStatus.OK){
+ var lat = results[0].geometry.location.lat(),lng =results[0].geometry.location.lng();
+ var myOptions = {
+ zoom: 17,
+ center: new google.maps.LatLng(lat,lng),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+ return new google.maps.Marker({
+ map : new google.maps.Map(document.getElementById("oe_mapbox"),myOptions),
+ position: new google.maps.LatLng(lat,lng)
+ });
+ }
+ });
+
+ },
+ get_value:function(){
+ }
+
+ }));
+};
\ No newline at end of file
From e69395f0bc6adef3f500952d19def91b0f412dfc Mon Sep 17 00:00:00 2001
From: "Purnendu Singh (OpenERP)"
Date: Wed, 2 May 2012 14:47:01 +0530
Subject: [PATCH 062/126] [IMP] Sale: Improve the domain on Open Invoice button
as order_policy postpaid is removed now
bzr revid: psi@tinyerp.com-20120502091701-v4sb5hmnez24k9rn
---
addons/sale/sale_view.xml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index 483095aa976..38fa150f66d 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -109,10 +109,9 @@
+ attrs="{'invisible': ['|','|',('state', '!=','progress'), ('invoiced', '=', True),('order_policy','=','picking')]}"/>
+ attrs="{'invisible': ['|','|','|',('picking_ids','=',False),('picking_ids','=',[]), ('state', 'not in', ('progress','manual')),('shipped','=',True)]}"/>
From bfe05098460c888fde44d03306f7fa29fd6ffcf7 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Fri, 4 May 2012 17:01:36 +0530
Subject: [PATCH 063/126] [imp] add the event page view for user
bzr revid: nco@tinyerp.com-20120504113136-ws9nxquin9sk95vu
---
addons/event/__openerp__.py | 1 +
addons/event/event_view.xml | 131 ++++++++++-------
addons/event/static/src/css/event.css | 11 ++
addons/event/static/src/js/event.js | 6 +
addons/event/static/src/xml/event_address.xml | 9 ++
addons/event_sale/event_sale.py | 134 ++++++++++--------
addons/event_sale/event_sale_view.xml | 85 ++++++-----
7 files changed, 235 insertions(+), 142 deletions(-)
create mode 100644 addons/event/static/src/xml/event_address.xml
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index 85eb78f32f1..88943b06654 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -55,6 +55,7 @@ Note that:
'test': ['test/process/event_draft2done.yml'],
'css': ['static/src/css/*.css'],
'js': ['static/src/js/event.js'],
+ 'qweb': ['static/src/xml/event_address.xml'],
'installable': True,
'application': True,
'auto_install': False,
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 87e29a641f2..b4df8cb48ed 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -78,65 +78,27 @@
-
+
Events
event.event
form
-
-
-
-
-
-
-
-
-
-
- Venue :
-
-
-
-
-
-
-
- |
- Where
- |
-
-
- |
-
-
-
- |
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
@@ -169,7 +131,13 @@
-
+
+
+
+
+
+
+
@@ -177,7 +145,7 @@
-
+
@@ -194,6 +162,67 @@
+
+
+
+
+
+
+
+
+ Events
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+ Venue :
+
+
+
+
+
+
+
+ |
+ Where
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index c9f9084a583..f3f40834072 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -144,4 +144,15 @@ div.oe_fold_column{
.oe_td_date_border
{
border-right:1px solid black;
+}
+.oe_pager_group11 {
+ float: left;
+ height: 24px;
+ line-height: 24px;
+ display: inline-block;
+ border: 1px solid #ababab;
+ cursor: pointer;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
\ No newline at end of file
diff --git a/addons/event/static/src/js/event.js b/addons/event/static/src/js/event.js
index 6081533397a..bd59bc78818 100644
--- a/addons/event/static/src/js/event.js
+++ b/addons/event/static/src/js/event.js
@@ -14,8 +14,11 @@ openerp.event = function(instance){
set_value:function(value){
var self = this;
this.get_address(value).done(function(value){
+ console.log("value",value,self);
+ self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
return self.list_addresses(address);
+
});
},
@@ -49,4 +52,7 @@ openerp.event = function(instance){
}
}));
+
+
+
};
\ No newline at end of file
diff --git a/addons/event/static/src/xml/event_address.xml b/addons/event/static/src/xml/event_address.xml
new file mode 100644
index 00000000000..370da230e6b
--- /dev/null
+++ b/addons/event/static/src/xml/event_address.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+ |
+
\ No newline at end of file
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index 81b69babebf..fa3a9c14f46 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -99,75 +99,93 @@ class event_event(osv.osv):
_columns = {
'event_item_ids': fields.one2many('event.items','event_id', 'Event Items'),
}
-# def subscribe_to_event(self, cr, uid, ids, context=None):
-# res = {}
-# event_pool = self.pool.get('event.event')
-# register_pool = self.pool.get('event.registration')
-# sale_order_line_pool = self.pool.get('sale.order.line')
-# sale_order = self.pool.get('sale.order')
-# partner_pool = self.pool.get("res.partner")
-# data_obj = self.pool.get("ir.model.data")
-# prod_pricelist_obj = self.pool.get('product.pricelist')
-# user = self.pool.get("res.users").browse(cr, uid, uid, context=context)
-# partner_ids = partner_pool.search(cr, uid, [('name', '=', user.name), ('email', '=', user.user_email)])
-# if not partner_ids:
-# new_partner_id = partner_pool.create(cr, uid, {'name': user.name, 'email': user.user_email})
-# partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
-# partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
-# else:
-# new_partner_id = partner_ids[0]
-# partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
-# partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
-# for event_id in self.browse(cr, uid, ids, context=context):
-# sale_order_lines = []
-# price_list = prod_pricelist_obj.search(cr,uid,[],context=context)[0]
-# new_sale_id = sale_order.create(cr, uid, {
-# 'date_order': event_id.date_begin,
-# 'pricelist_id': price_list,
-# 'partner_id': new_partner_id,
-# 'partner_invoice_id': partner_invoice_id,
-# 'partner_shipping_id': partner_shipping_id
-# })
-# if event_id.event_item_ids:
-# for items in event_id.event_item_ids:
-# product = items.product_id.id
-# sale_order_line = sale_order_line_pool.create(cr, uid, {
-# 'order_id': new_sale_id,
-# 'name': items.product_id.name,
-# 'product_uom_qty': items.qty,
-# 'product_id': items.product_id.id,
-# 'price_unit': items.price,
-# 'date_planned': items.sales_end_date,
-# }, context=context)
-# view_id = data_obj._get_id(cr, uid, 'sale', 'view_order_form')
-# if view_id:
-# res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
-# res = {
-# 'name': _('Quotation'),
-# 'view_type': 'form',
-# 'view_mode': 'form',
-# 'res_model': 'sale.order',
-# 'res_id': new_sale_id,
-# 'views':[(res_id,'form'), (False, 'tree')],
-# 'type': 'ir.actions.act_window',
-# 'nodestroy': True,
-# 'target': 'current',
-# }
-# return res
+ def order_now(self, cr, uid, ids, context=None):
+ res = {}
+ event_pool = self.pool.get('event.event')
+ register_pool = self.pool.get('event.registration')
+ sale_order_line_pool = self.pool.get('sale.order.line')
+ sale_order = self.pool.get('sale.order')
+ partner_pool = self.pool.get("res.partner")
+ data_obj = self.pool.get("ir.model.data")
+ prod_pricelist_obj = self.pool.get('product.pricelist')
+ user = self.pool.get("res.users").browse(cr, uid, uid, context=context)
+ partner_ids = partner_pool.search(cr, uid, [('name', '=', user.name), ('email', '=', user.user_email)])
+ if not partner_ids:
+ new_partner_id = partner_pool.create(cr, uid, {'name': user.name, 'email': user.user_email})
+ partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
+ partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
+ else:
+ new_partner_id = partner_ids[0]
+ partner_invoice_id = partner_pool.address_get(cr, uid, [new_partner_id], ['invoice'])['invoice']
+ partner_shipping_id = partner_pool.address_get(cr, uid, [new_partner_id], ['delivery'])['delivery']
+ for event_id in self.browse(cr, uid, ids, context=context):
+ sale_order_lines = []
+ price_list = prod_pricelist_obj.search(cr,uid,[],context=context)[0]
+ new_sale_id = sale_order.create(cr, uid, {
+ 'date_order': event_id.date_begin,
+ 'pricelist_id': price_list,
+ 'partner_id': new_partner_id,
+ 'partner_invoice_id': partner_invoice_id,
+ 'partner_shipping_id': partner_shipping_id
+ })
+ if event_id.event_item_ids:
+ for items in event_id.event_item_ids:
+ product = items.product_id.id
+ sale_order_line = sale_order_line_pool.create(cr, uid, {
+ 'order_id': new_sale_id,
+ 'name': items.product_id.name,
+ 'product_uom_qty': items.qty,
+ 'product_id': items.product_id.id,
+ 'price_unit': items.price,
+ 'date_planned': items.sales_end_date,
+ }, context=context)
+ view_id = data_obj._get_id(cr, uid, 'sale', 'view_order_form')
+ if view_id:
+ res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
+ res = {
+ 'name': _('Quotation'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'sale.order',
+ 'res_id': new_sale_id,
+ 'views':[(res_id,'form'), (False, 'tree')],
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ }
+ return res
+ def subscribe_to_event(self, cr, uid, ids, context=None):
+ res = {}
+ data_obj = self.pool.get("ir.model.data")
+ view_id = data_obj._get_id(cr, uid, 'event', 'view_event_page')
+ if view_id:
+ res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
+ res = {
+ 'name': _('Event Page'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'views':[(res_id,'form'), (False, 'tree')],
+ 'res_model': 'event.event',
+ 'res_id': ids[0],
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ }
+ return res
class event_items(osv.osv):
_name = "event.items"
_columns = {
'product_id': fields.many2one('product.product', 'Product', required=True),
'price': fields.integer('Price'),
- 'qty': fields.integer('QTY'),
- # 'qty': fields.selection(_max_register, 'QTY'),
+ 'max_qty': fields.integer('Max Qty'),
+ 'qty': fields.integer('QTY', type = 'integer'),
'uom_id': fields.many2one('product.uom', 'UoM'),
'discount': fields.integer('Discount'),
'event_id': fields.many2one('event.event', 'Event'),
'sales_end_date': fields.date('Sales End')
}
-
+
def onchange_product_id(self, cr, uid, ids, product, context=None):
product_obj = self.pool.get('product.product')
data = {}
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 72782d5c421..0110bc1df2c 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -30,49 +30,68 @@
+
+ Events Inherit
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Events Inherit
event.event
form
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- Event Items Tree
- event.items
- tree
-
-
-
-
-
-
-
-
-
-
-
+
+ event.inherit.kanban
+ event.event
+ kanban
+
+
+
+
+
+
+
-
- Event Items Form
- event.items
- form
-
-
-
-
-
-
-
-
-
-
From 12f03240ef4084acb759d7d05a6313481940ed23 Mon Sep 17 00:00:00 2001
From: "Nimesh (Open ERP)"
Date: Fri, 4 May 2012 17:17:41 +0530
Subject: [PATCH 064/126] [remove] remove the unused console statement.
bzr revid: nco@tinyerp.com-20120504114741-ik1ft1ln90188tpt
---
addons/event/static/src/js/event.js | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/event/static/src/js/event.js b/addons/event/static/src/js/event.js
index bd59bc78818..ed390d6af9e 100644
--- a/addons/event/static/src/js/event.js
+++ b/addons/event/static/src/js/event.js
@@ -14,7 +14,6 @@ openerp.event = function(instance){
set_value:function(value){
var self = this;
this.get_address(value).done(function(value){
- console.log("value",value,self);
self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
return self.list_addresses(address);
From 0a09dbed34812d416e9c52bc4226117ca3176b7e Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Sat, 5 May 2012 23:03:40 +0530
Subject: [PATCH 065/126] [FIX]: Improve css file. Improve view.
bzr revid: atp@tinyerp.com-20120505173340-1jmgy4clza1gy6sh
---
addons/event/event_view.xml | 9 +++++----
addons/event/static/src/css/event.css | 7 +++++++
addons/event_sale/event_sale.py | 5 +++--
addons/event_sale/event_sale_view.xml | 6 +++---
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 42037637ea5..91c2590008d 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -159,7 +159,7 @@
- Venue :
+ Venue :
@@ -187,9 +187,10 @@
-
-
-
+
+
+
+
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index 3ff0bb8564f..d53770071d0 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -125,6 +125,9 @@ div.oe_fold_column{
.oe_sub1
{
float:left;
+ height:50px;
+ border-right: 1px solid black;
+ border-color: #DCDCDC;
}
.oe_mapbox
{
@@ -133,6 +136,7 @@ div.oe_fold_column{
margin-left:auto;
margin-right:auto;
text-align: right;
+
}
.oe_td_border
{
@@ -140,9 +144,12 @@ div.oe_fold_column{
padding: 2px;
border-right: 1px solid black;
text-align: center;
+ border-color: #DCDCDC;
+
}
.oe_td_date_border
{
border-right:1px solid black;
+ border-color: #DCDCDC;
}
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index eb17f6ac59a..5097ea5b9f3 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -179,8 +179,9 @@ class event_items(osv.osv):
_columns = {
'product_id': fields.many2one('product.product', 'Product', required=True),
'price': fields.integer('Price'),
- 'max_qty': fields.integer('Max.Quantity available'),
- 'qty': fields.integer('QTY', type ='integer'),
+ #Need to convert this integer field in to dynamic selection.. TODO
+ # 'max_qty': fields.integer('Max.Quantity available'),
+ 'qty': fields.integer('Quantity'),
'uom_id': fields.many2one('product.uom', 'UoM'),
'discount': fields.integer('Discount'),
'event_id': fields.many2one('event.event', 'Event'),
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 9fb3fb9f81b..bf2e8833df7 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -42,8 +42,8 @@
-
-
+
+
@@ -68,7 +68,7 @@
-
+
From 80a595d631f5335b068d445fc87644787d686d1d Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Sat, 5 May 2012 23:33:49 +0530
Subject: [PATCH 066/126] [FIX]: Remove unused space.
bzr revid: atp@tinyerp.com-20120505180349-tlrsdqqpjpm1haaf
---
addons/event/__openerp__.py | 2 +-
addons/event/event_view.xml | 93 +++++++++++++------------
addons/event_sale/event_sale_view.xml | 97 +++++++++++++--------------
3 files changed, 95 insertions(+), 97 deletions(-)
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index 88943b06654..e36914ee9fb 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -53,7 +53,7 @@ Note that:
],
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
- 'css': ['static/src/css/*.css'],
+ 'css': ['static/src/css/event.css'],
'js': ['static/src/js/event.js'],
'qweb': ['static/src/xml/event_address.xml'],
'installable': True,
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 91c2590008d..34688f18efb 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -143,54 +143,53 @@
-
-
-
-
-
-
-
-
- Venue :
-
-
-
-
-
-
-
- |
- Where
- |
-
-
- |
-
-
-
- |
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Venue :
+
+
+
+
+
+
+
+ |
+ Where
+ |
+
+
+ |
+
+
+ |
+
+
+
+
-
-
+
+
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index bf2e8833df7..ad752a36dd1 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -30,56 +30,55 @@
-
- Events Inherit
- event.event
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Events Inherit
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- Events Inherit
- event.event
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Events Inherit
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
event.inherit.kanban
From 20624a156e9edaa09db5267a6f68b60f2bd1a827 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 7 May 2012 10:56:45 +0530
Subject: [PATCH 067/126] [FIX]: Optimize code.
bzr revid: atp@tinyerp.com-20120507052645-5jkwjolm0tm3rb5c
---
addons/event/event.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/addons/event/event.py b/addons/event/event.py
index 62b1d79f969..2d5c85aef4a 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -104,13 +104,11 @@ class event_event(osv.osv):
raise osv.except_osv(_('Error!'),_("The total of confirmed registration for the event '%s' does not meet the expected minimum/maximum. You should maybe reconsider those limits before going further") % (self.event.name))
def check_available_seats(self, cr, uid, ids, context=None):
- if isinstance(ids, list):
- ids = ids[0]
- else:
- ids = ids
- total_confirmed = self.browse(cr, uid, ids, context=context).register_current
- register_max = self.browse(cr, uid, ids, context=context).register_max
- available_seats = register_max - total_confirmed
+ available_seats = False
+ for event in self.browse(cr, uid, ids, context=context):
+ total_confirmed = event.register_current
+ register_max = event.register_max
+ available_seats = register_max - total_confirmed
return available_seats
def check_registration_limits_before(self, cr, uid, ids, no_of_registration, context=None):
@@ -317,9 +315,10 @@ class event_registration(osv.osv):
""" Open Registration
"""
event_obj = self.pool.get('event.event')
- event_id = self.browse(cr, uid, ids, context=context)[0].event_id.id
- no_of_registration = self.browse(cr, uid, ids, context=context)[0].nb_register
- event_obj.check_registration_limits_before(cr, uid, event_id, no_of_registration, context=context)
+ for register in self.browse(cr, uid, ids, context=context):
+ event_id = register.event_id.id
+ no_of_registration = register.nb_register
+ event_obj.check_registration_limits_before(cr, uid, [event_id], no_of_registration, context=context)
res = self.confirm_registration(cr, uid, ids, context=context)
self.mail_user(cr, uid, ids, context=context)
return res
From 7a087d62406f33c43f102eb02ae6bd8e242488a0 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 7 May 2012 15:40:32 +0530
Subject: [PATCH 068/126] [FIX]: Remove page view from form view and place it
into event_sale module.
bzr revid: atp@tinyerp.com-20120507101032-e9q0u4cgng231i62
---
addons/event/event_view.xml | 61 -----------------
addons/event_sale/event_sale.py | 2 +-
addons/event_sale/event_sale_view.xml | 99 +++++++++++++++++++++------
3 files changed, 78 insertions(+), 84 deletions(-)
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 34688f18efb..23257cd8efe 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -134,67 +134,6 @@
-
-
-
- Events
- event.event
- form
-
-
-
-
-
-
-
-
-
-
-
- Venue :
-
-
-
-
-
-
-
- |
- Where
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/event_sale/event_sale.py b/addons/event_sale/event_sale.py
index 5097ea5b9f3..0abbfc2cfb3 100644
--- a/addons/event_sale/event_sale.py
+++ b/addons/event_sale/event_sale.py
@@ -158,7 +158,7 @@ class event_event(osv.osv):
def subscribe_to_event(self, cr, uid, ids, context=None):
res = {}
data_obj = self.pool.get("ir.model.data")
- view_id = data_obj._get_id(cr, uid, 'event', 'view_event_page')
+ view_id = data_obj._get_id(cr, uid, 'event_sale', 'view_event_page')
if view_id:
res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
res = {
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index ad752a36dd1..1c2d520beb8 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -30,30 +30,85 @@
-
- Events Inherit
- event.event
- form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ Events
+ event.event
+ form
+
+
+
+
+
+
+
+
+
+
+
+ Venue :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+ Where
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Events Inherit
event.event
From 042e72de8d9c3f2838c6e1d443c83dc4da48c8c8 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 9 May 2012 17:12:10 +0530
Subject: [PATCH 069/126] [FIX]: Fix alignment in kanban view. add accessrights
for event.items.
bzr revid: atp@tinyerp.com-20120509114210-r3tp1nnn5rvoipqy
---
addons/event/event_view.xml | 3 ++-
addons/event/static/src/css/event.css | 4 ++--
addons/event_sale/__openerp__.py | 1 +
addons/event_sale/event_sale_view.xml | 3 ---
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 23257cd8efe..6432a50542e 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -53,13 +53,14 @@
form
-
+
+
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index d53770071d0..f898647db23 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -37,7 +37,7 @@ div.oe_fold_column{
border: 1px solid #ababab;
color: #404040;
font-size: 12px;
- padding: 3px 10px;
+ padding: 0px !important;
text-align: center;
-o-background-size: 100% 100%;
-moz-background-size: 100% 100%;
@@ -117,7 +117,7 @@ div.oe_fold_column{
background-color: #DC5F59;
}
.no_of_seats{
- width:25px;
+ width:35px;
}
.oe_event_title{
font-size: 25px;
diff --git a/addons/event_sale/__openerp__.py b/addons/event_sale/__openerp__.py
index d8f689986e2..e235c31aa08 100644
--- a/addons/event_sale/__openerp__.py
+++ b/addons/event_sale/__openerp__.py
@@ -36,6 +36,7 @@ It defines a new kind of service products that offers you the possibility to cho
'author': 'OpenERP SA',
'depends': ['event','sale','sale_crm'],
'update_xml': [
+ 'security/ir.model.access.csv',
'event_sale_view.xml',
],
'demo_xml': ['event_demo.xml'],
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 1c2d520beb8..faaa157d356 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -127,9 +127,6 @@
-
-
-
From d2faa8c8ea8e94a77c78d2538080e253a9fcf29e Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 9 May 2012 17:13:57 +0530
Subject: [PATCH 070/126] [ADD]: ADD security files
bzr revid: atp@tinyerp.com-20120509114357-ikyou2uf4uo3iwhd
---
addons/event_sale/security/ir.model.access.csv | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 addons/event_sale/security/ir.model.access.csv
diff --git a/addons/event_sale/security/ir.model.access.csv b/addons/event_sale/security/ir.model.access.csv
new file mode 100644
index 00000000000..da2067dff00
--- /dev/null
+++ b/addons/event_sale/security/ir.model.access.csv
@@ -0,0 +1,2 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_event_items,event.items,event.model_event_items,event.group_event_user,1,1,0,0
From 9ea1132374f4a170863c78fd78eb388d8910b98b Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 9 May 2012 17:30:11 +0530
Subject: [PATCH 071/126] [FIX]: Change model_id in security access right.
bzr revid: atp@tinyerp.com-20120509120011-f4224eeji0m8ix05
---
addons/event_sale/security/ir.model.access.csv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/addons/event_sale/security/ir.model.access.csv b/addons/event_sale/security/ir.model.access.csv
index da2067dff00..8078ec3ff78 100644
--- a/addons/event_sale/security/ir.model.access.csv
+++ b/addons/event_sale/security/ir.model.access.csv
@@ -1,2 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_event_items,event.items,event.model_event_items,event.group_event_user,1,1,0,0
+access_event_items,event.items,event_sale.model_event_items,event.group_event_user,1,1,0,0
From 8d2723ac4f49e17c186cb701a250abd28015e432 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 9 May 2012 17:42:44 +0530
Subject: [PATCH 072/126] [FIX]: Fix address template problem.
bzr revid: atp@tinyerp.com-20120509121244-ougokpvpe9i5dxkx
---
addons/event/static/src/js/event.js | 2 +-
addons/event/static/src/xml/event_address.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/addons/event/static/src/js/event.js b/addons/event/static/src/js/event.js
index 0932d6ed776..4fb368d0845 100644
--- a/addons/event/static/src/js/event.js
+++ b/addons/event/static/src/js/event.js
@@ -14,7 +14,7 @@ openerp.event = function(instance){
set_value:function(value){
var self = this;
this.get_address(value).done(function(value){
- self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
+ if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
return self.list_addresses(address);
diff --git a/addons/event/static/src/xml/event_address.xml b/addons/event/static/src/xml/event_address.xml
index 370da230e6b..14c7051cf7d 100644
--- a/addons/event/static/src/xml/event_address.xml
+++ b/addons/event/static/src/xml/event_address.xml
@@ -1,7 +1,7 @@
-
+ |
From 9dc92d18d5d86459ade21c8d9985c0deda005f20 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Wed, 9 May 2012 23:08:39 +0530
Subject: [PATCH 073/126] [Add]: Add css file into event_sale modules.
bzr revid: atp@tinyerp.com-20120509173839-q3y5egsp8xliyfvi
---
addons/event/__openerp__.py | 2 --
addons/event/event_view.xml | 4 +--
addons/event/static/src/css/event.css | 34 -------------------
addons/event_sale/__openerp__.py | 3 ++
.../event_sale/static/src/css/event_page.css | 31 +++++++++++++++++
.../static/src/js/google_map.js} | 0
.../static/src/xml/event_address.xml | 0
7 files changed, 36 insertions(+), 38 deletions(-)
create mode 100644 addons/event_sale/static/src/css/event_page.css
rename addons/{event/static/src/js/event.js => event_sale/static/src/js/google_map.js} (100%)
rename addons/{event => event_sale}/static/src/xml/event_address.xml (100%)
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index e36914ee9fb..ea0e4316ef5 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -54,8 +54,6 @@ Note that:
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
'css': ['static/src/css/event.css'],
- 'js': ['static/src/js/event.js'],
- 'qweb': ['static/src/xml/event_address.xml'],
'installable': True,
'application': True,
'auto_install': False,
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 6432a50542e..0d8a4478650 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -53,14 +53,13 @@
form
-
+
-
@@ -121,6 +120,7 @@
+
diff --git a/addons/event/static/src/css/event.css b/addons/event/static/src/css/event.css
index f898647db23..b0f5db0e9d2 100644
--- a/addons/event/static/src/css/event.css
+++ b/addons/event/static/src/css/event.css
@@ -119,37 +119,3 @@ div.oe_fold_column{
.no_of_seats{
width:35px;
}
-.oe_event_title{
- font-size: 25px;
-}
-.oe_sub1
-{
- float:left;
- height:50px;
- border-right: 1px solid black;
- border-color: #DCDCDC;
-}
-.oe_mapbox
-{
- width:auto;
- height:200px;
- margin-left:auto;
- margin-right:auto;
- text-align: right;
-
-}
-.oe_td_border
-{
- width: 5em;
- padding: 2px;
- border-right: 1px solid black;
- text-align: center;
- border-color: #DCDCDC;
-
-
-}
-.oe_td_date_border
-{
- border-right:1px solid black;
- border-color: #DCDCDC;
-}
diff --git a/addons/event_sale/__openerp__.py b/addons/event_sale/__openerp__.py
index e235c31aa08..e4d9cd3897c 100644
--- a/addons/event_sale/__openerp__.py
+++ b/addons/event_sale/__openerp__.py
@@ -41,6 +41,9 @@ It defines a new kind of service products that offers you the possibility to cho
],
'demo_xml': ['event_demo.xml'],
'test':['test/confirm.yml'],
+ 'css': ['static/src/css/event_page.css'],
+ 'js': ['static/src/js/google_map.js'],
+ 'qweb': ['static/src/xml/event_address.xml'],
'installable': True,
'active': False,
}
diff --git a/addons/event_sale/static/src/css/event_page.css b/addons/event_sale/static/src/css/event_page.css
new file mode 100644
index 00000000000..0f7b2a81e32
--- /dev/null
+++ b/addons/event_sale/static/src/css/event_page.css
@@ -0,0 +1,31 @@
+.oe_event_title{
+ font-size: 25px;
+}
+.oe_sub1
+{
+ float:left;
+ height:50px;
+ border-right: 1px solid black;
+ border-color: #DCDCDC;
+}
+.oe_mapbox
+{
+ width:auto;
+ height:200px;
+ margin-left:auto;
+ margin-right:auto;
+ text-align: right;
+}
+.oe_td_border
+{
+ width: 5em;
+ padding: 2px;
+ border-right: 1px solid black;
+ text-align: center;
+ border-color: #DCDCDC;
+}
+.oe_td_date_border
+{
+ border-right:1px solid black;
+ border-color: #DCDCDC;
+}
diff --git a/addons/event/static/src/js/event.js b/addons/event_sale/static/src/js/google_map.js
similarity index 100%
rename from addons/event/static/src/js/event.js
rename to addons/event_sale/static/src/js/google_map.js
diff --git a/addons/event/static/src/xml/event_address.xml b/addons/event_sale/static/src/xml/event_address.xml
similarity index 100%
rename from addons/event/static/src/xml/event_address.xml
rename to addons/event_sale/static/src/xml/event_address.xml
From 369e54b547b1ac590b40becb075c073f6a2047b8 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Thu, 10 May 2012 11:10:50 +0530
Subject: [PATCH 074/126] [FIX]: Fix yaml as per event improvement.
bzr revid: atp@tinyerp.com-20120510054050-pjkux4vl1lgnlfxc
---
addons/event/test/process/event_draft2done.yml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/addons/event/test/process/event_draft2done.yml b/addons/event/test/process/event_draft2done.yml
index d3f3d1fb466..dfe2b01cb33 100644
--- a/addons/event/test/process/event_draft2done.yml
+++ b/addons/event/test/process/event_draft2done.yml
@@ -9,6 +9,7 @@
name: event
date_begin: 2012-01-01 19:05:15
date_end: 2012-01-01 20:05:15
+ register_max: 10
-
I create a registration for the event
-
@@ -32,6 +33,15 @@
I confirm the registration1
-
!python {model: event.registration}: |
+ event_pool = self.pool.get("event.event")
+ for register in self.browse(cr, uid, [ref("event_registration1")], context):
+ nb_register = register.nb_register
+ event_id = register.event_id.id
+ available_seats = event_pool.check_available_seats(cr, uid, [event_id], context=context)
+ if available_seats and nb_register > available_seats:
+ assert available_seats, "seats available."
+ elif available_seats == 0:
+ assert available_seats, "No Tickets Available."
self.registration_open(cr, uid, [ref("event_registration1")],context=context)
-
I check that registration is "confirmed"
From b0a13bff6784fa4b9244dfa68865a53844975ea6 Mon Sep 17 00:00:00 2001
From: "Vidhin Mehta (OpenERP)"
Date: Fri, 11 May 2012 17:15:13 +0530
Subject: [PATCH 075/126] [IMP]load script from addons side.
bzr revid: vme@tinyerp.com-20120511114513-bfco3w7u0itaq171
---
addons/event_sale/static/src/js/google_map.js | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/addons/event_sale/static/src/js/google_map.js b/addons/event_sale/static/src/js/google_map.js
index 4fb368d0845..179c26069cc 100644
--- a/addons/event_sale/static/src/js/google_map.js
+++ b/addons/event_sale/static/src/js/google_map.js
@@ -1,9 +1,9 @@
openerp.event = function(instance){
instance.web.form.widgets.add('geo_address', 'instance.event.GeoAddress');
instance.event.GeoAddress = instance.web.form.AbstractField.extend(_.extend({}, {
-
init : function(){
this._super.apply(this,arguments);
+ this.googleMapsLoaded = $.Deferred();
},
start:function(){
@@ -11,13 +11,27 @@ openerp.event = function(instance){
set_input_id:function(id){
},
+ map_load: function() {
+ var self = this;
+ if(this.googleMapsLoaded.state() != "pending"){return this.googleMapsLoaded.promise();}
+ googleMapsCallback = function () {
+ self.googleMapsLoaded.resolve();
+ };
+ $.ajax({
+ url: "https://maps.googleapis.com/maps/api/js?v=3&callback=googleMapsCallback&sensor=false",
+ dataType: "script"
+ }).fail(self.googleMapsLoaded.reject);
+ return this.googleMapsLoaded.promise();
+ },
set_value:function(value){
var self = this;
this.get_address(value).done(function(value){
if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
- return self.list_addresses(address);
-
+ var defer = self.Map_Load();
+ defer.done(function(){
+ return self.render_map(address);
+ })
});
},
@@ -28,7 +42,7 @@ openerp.event = function(instance){
return new instance.web.DataSet (this,this.field.relation, this.build_context()).read_ids(value[0],["street","city","country_id"]);
},
- list_addresses: function(address){
+ render_map: function(address){
var geocoder = new google.maps.Geocoder();
geocoder.geocode( { 'address': address}, function(results, status)
{
From 32ecb048dc3daa39573c37144683d3842490dbb2 Mon Sep 17 00:00:00 2001
From: "Vidhin Mehta (OpenERP)"
Date: Fri, 11 May 2012 17:33:06 +0530
Subject: [PATCH 076/126] [IMP]perfect indentation.
bzr revid: vme@tinyerp.com-20120511120306-j72jwc1mm8kfdsq4
---
addons/event_sale/static/src/js/google_map.js | 124 +++++++++---------
1 file changed, 60 insertions(+), 64 deletions(-)
diff --git a/addons/event_sale/static/src/js/google_map.js b/addons/event_sale/static/src/js/google_map.js
index 179c26069cc..6fe69160447 100644
--- a/addons/event_sale/static/src/js/google_map.js
+++ b/addons/event_sale/static/src/js/google_map.js
@@ -1,68 +1,64 @@
openerp.event = function(instance){
- instance.web.form.widgets.add('geo_address', 'instance.event.GeoAddress');
- instance.event.GeoAddress = instance.web.form.AbstractField.extend(_.extend({}, {
- init : function(){
- this._super.apply(this,arguments);
- this.googleMapsLoaded = $.Deferred();
- },
+ instance.web.form.widgets.add('geo_address', 'instance.event.GeoAddress');
+ instance.event.GeoAddress = instance.web.form.AbstractField.extend(_.extend({}, {
+ init : function(){
+ this._super.apply(this,arguments);
+ this.googleMapsLoaded = $.Deferred();
+ },
+ start:function(){
+ },
- start:function(){
- },
-
- set_input_id:function(id){
- },
- map_load: function() {
- var self = this;
- if(this.googleMapsLoaded.state() != "pending"){return this.googleMapsLoaded.promise();}
- googleMapsCallback = function () {
- self.googleMapsLoaded.resolve();
- };
- $.ajax({
- url: "https://maps.googleapis.com/maps/api/js?v=3&callback=googleMapsCallback&sensor=false",
- dataType: "script"
- }).fail(self.googleMapsLoaded.reject);
- return this.googleMapsLoaded.promise();
- },
- set_value:function(value){
- var self = this;
- this.get_address(value).done(function(value){
- if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
- var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
- var defer = self.Map_Load();
- defer.done(function(){
- return self.render_map(address);
- })
- });
-
- },
- get_address:function(value){
- if (!value || value.length == 0){
- return $.Deferred().reject();
- }
- return new instance.web.DataSet (this,this.field.relation, this.build_context()).read_ids(value[0],["street","city","country_id"]);
- },
+ set_input_id:function(id){
+ },
+ map_load: function() {
+ var self = this;
+ if(this.googleMapsLoaded.state() != "pending"){return this.googleMapsLoaded.promise();}
+ googleMapsCallback = function () {
+ self.googleMapsLoaded.resolve();
+ };
+ $.ajax({
+ url: "https://maps.googleapis.com/maps/api/js?v=3&callback=googleMapsCallback&sensor=false",
+ dataType: "script"
+ }).fail(self.googleMapsLoaded.reject);
+ return this.googleMapsLoaded.promise();
+ },
+ set_value:function(value){
+ var self = this;
+ this.get_address(value).done(function(value){
+ if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
+ var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
+ var defer = self.Map_Load();
+ defer.done(function(){
+ return self.render_map(address);
+ });
+ });
+ },
+ get_address:function(value){
+ if (!value || value.length == 0){
+ return $.Deferred().reject();
+ }
+ return new instance.web.DataSet (this,this.field.relation, this.build_context()).read_ids(value[0],["street","city","country_id"]);
+ },
- render_map: function(address){
- var geocoder = new google.maps.Geocoder();
- geocoder.geocode( { 'address': address}, function(results, status)
- {
- if (status == google.maps.GeocoderStatus.OK){
- var lat = results[0].geometry.location.lat(),lng =results[0].geometry.location.lng();
- var myOptions = {
- zoom: 17,
- center: new google.maps.LatLng(lat,lng),
- mapTypeId: google.maps.MapTypeId.ROADMAP
- }
- return new google.maps.Marker({
- map : new google.maps.Map(document.getElementById("oe_mapbox"),myOptions),
- position: new google.maps.LatLng(lat,lng)
- });
- }
- });
-
- },
- get_value:function(){
- }
-
- }));
+ render_map: function(address){
+ var geocoder = new google.maps.Geocoder();
+ geocoder.geocode( { 'address': address}, function(results, status){
+ if (status == google.maps.GeocoderStatus.OK){
+ var lat = results[0].geometry.location.lat(),lng =results[0].geometry.location.lng();
+ var myOptions = {
+ zoom: 17,
+ center: new google.maps.LatLng(lat,lng),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+ return new google.maps.Marker({
+ map : new google.maps.Map(document.getElementById("oe_mapbox"),myOptions),
+ position: new google.maps.LatLng(lat,lng)
+ });
+ }
+ });
+ },
+ get_value:function(){
+ }
+
+ }));
};
\ No newline at end of file
From 99e1ebfcd7a96cc6d9348b01462bb16c73f91e05 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Thu, 17 May 2012 12:58:53 +0530
Subject: [PATCH 077/126] [FIX]: New event page view
bzr revid: atp@tinyerp.com-20120517072853-is1te37zsy3be4y6
---
addons/event/__openerp__.py | 3 +
addons/event/event_view.xml | 119 +++++++++++++++++++++++++++++++++++-
2 files changed, 120 insertions(+), 2 deletions(-)
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index ea0e4316ef5..e05754eb992 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -1,3 +1,4 @@
+
# -*- coding: utf-8 -*-
##############################################################################
#
@@ -53,6 +54,8 @@ Note that:
],
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
+ # 'js': ['static/src/js/google_map.js'],
+ 'qweb': ['static/src/xml/event_address.xml'],
'css': ['static/src/css/event.css'],
'installable': True,
'application': True,
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 7a41153acd8..c6e16a240ae 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -47,7 +47,7 @@
-
+
+
+
+ Events
+ event.event
+ form
+ 20
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -160,6 +272,7 @@
+
@@ -211,6 +324,7 @@
Subscribe
+
@@ -218,6 +332,7 @@
Subscribed
Unsubscribe
+
From 08cd412d78a55cc86d841bf9220920ef576dd3d8 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Thu, 17 May 2012 13:00:46 +0530
Subject: [PATCH 078/126] [ADD]: Add event google map file.
bzr revid: atp@tinyerp.com-20120517073046-i47jypr9p6ndckox
---
addons/event/static/src/js/google_map.js | 69 +++++++++++++++++++
addons/event/static/src/xml/event_address.xml | 9 +++
2 files changed, 78 insertions(+)
create mode 100644 addons/event/static/src/js/google_map.js
create mode 100644 addons/event/static/src/xml/event_address.xml
diff --git a/addons/event/static/src/js/google_map.js b/addons/event/static/src/js/google_map.js
new file mode 100644
index 00000000000..2209001f29d
--- /dev/null
+++ b/addons/event/static/src/js/google_map.js
@@ -0,0 +1,69 @@
+openerp.event = function(instance){
+ instance.web.form.widgets.add('geo_address', 'instance.event.GeoAddress');
+ instance.event.GoogleMapConnecter = instance.web.Class.extend({
+ init : function(){
+// call ajex to render map load
+
+ },
+ render_map: function(address){
+ var geocoder = new google.maps.Geocoder();
+ geocoder.geocode( { 'address': address}, function(results, status){
+ if (status == google.maps.GeocoderStatus.OK){
+ var lat = results[0].geometry.location.lat(),lng =results[0].geometry.location.lng();
+ var myOptions = {
+ zoom: 17,
+ center: new google.maps.LatLng(lat,lng),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ }
+ return new google.maps.Marker({
+ map : new google.maps.Map(document.getElementById("oe_mapbox"),myOptions),
+ position: new google.maps.LatLng(lat,lng)
+ });
+ }
+ });
+ map_load: function() {
+ var self = this;
+ if(this.googleMapsLoaded.state() != "pending"){return this.googleMapsLoaded.promise();}
+ googleMapsCallback = function () {
+ self.googleMapsLoaded.resolve();
+ };
+ $.ajax({
+ url: "https://maps.googleapis.com/maps/api/js?v=3&callback=googleMapsCallback&sensor=false",
+ dataType: "script"
+ }).fail(self.googleMapsLoaded.reject);
+ return this.googleMapsLoaded.promise();
+ },
+
+ }),
+
+ instance.event.GeoAddress = instance.web.form.Many2OneField.extend(_.extend({}, {
+ init : function(){
+ this._super();
+ this.googleMapsLoaded = $.Deferred();
+ },
+
+
+ set_value:function(value){
+ var self = this;
+ this.get_address(value).done(function(value){
+ if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
+ var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
+ var defer = self.map_load();
+ defer.done(function(){
+ return self.render_map(address);
+ });
+ });
+ },
+ get_address:function(value){
+ if (!value || value.length == 0){
+ return $.Deferred().reject();
+ }
+ return new instance.web.DataSet (this,this.field.relation, this.build_context()).read_ids(value[0],["street","city","country_id"]);
+ },
+
+ },
+ get_value:function(){
+ }
+
+ }));
+};
\ No newline at end of file
diff --git a/addons/event/static/src/xml/event_address.xml b/addons/event/static/src/xml/event_address.xml
new file mode 100644
index 00000000000..14c7051cf7d
--- /dev/null
+++ b/addons/event/static/src/xml/event_address.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+ |
+
\ No newline at end of file
From 96fde61acf012673b4f0a197b7a9b62d10ee9b5e Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Thu, 17 May 2012 16:09:41 +0530
Subject: [PATCH 079/126] [ADD]: Event page
bzr revid: atp@tinyerp.com-20120517103941-6ngwqfkiow8f4ugq
---
addons/event/event.py | 39 ++++++++++++++++++++--
addons/event/event_view.xml | 66 ++++++++++++++-----------------------
2 files changed, 62 insertions(+), 43 deletions(-)
diff --git a/addons/event/event.py b/addons/event/event.py
index 38ad0027c9d..d029ba22acd 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -218,7 +218,8 @@ class event_event(osv.osv):
'note': fields.text('Description', readonly=False, states={'done': [('readonly', True)]}),
'company_id': fields.many2one('res.company', 'Company', required=False, change_default=True, readonly=False, states={'done': [('readonly', True)]}),
'is_subscribed' : fields.function(_subscribe_fnc, type="boolean", string='Subscribed'),
- 'location_id': fields.many2one('res.partner','Organization Address', readonly=False, states={'done': [('readonly', True)]}),
+ 'available_qty': fields.integer('Availabel Quantity'),
+
}
_defaults = {
@@ -226,7 +227,41 @@ class event_event(osv.osv):
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'event.event', context=c),
'user_id': lambda obj, cr, uid, context: uid,
}
-
+
+ def order_now(self, cr, uid, ids, context=None):
+ register_pool = self.pool.get('event.registration')
+ user_pool = self.pool.get('res.users')
+ data_obj = self.pool.get('ir.model.data')
+ user = user_pool.browse(cr, uid, uid, context=context)
+ for event in self.browse(cr, uid, ids, context):
+ self.check_registration_limits_before(cr, uid, ids, event.available_qty, context=context)
+ curr_reg_ids = register_pool.search(cr, uid, [('user_id', '=', user.id), ('event_id', '=' , event.id)])
+ #the subscription is done with UID = 1 because in case we share the kanban view, we want anyone to be able to subscribe
+ print "event.curre_reg_ids",event.available_qty
+ if not curr_reg_ids and event.available_qty > 0:
+ print "cccccccccccc",event.available_qty
+ curr_reg_ids = [register_pool.create(cr, 1, {'event_id': event.id ,'email': user.user_email, 'name':user.name, 'user_id': user.id, 'nb_register': event.available_qty})]
+ elif event.available_qty > 0:
+ print "mmmmmmm",event.available_qty
+ register_pool.write(cr, uid, curr_reg_ids, {'nb_register': event.available_qty}, context=context)
+ if event.available_qty > 0:
+ register_pool.confirm_registration(cr, 1, curr_reg_ids, context=context)
+ view_id = data_obj._get_id(cr, uid, 'event', 'view_event_registration_form')
+ if view_id:
+ res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
+ res = {
+ 'name': _('Registration'),
+ 'view_type': 'form',
+ 'view_mode': 'form',
+ 'res_model': 'event.registration',
+ 'res_id': curr_reg_ids[0],
+ 'views':[(res_id,'form'), (False, 'tree')],
+ 'type': 'ir.actions.act_window',
+ 'nodestroy': True,
+ 'target': 'current',
+ }
+ return res
+
def subscribe_to_event(self, cr, uid, ids, context=None):
register_pool = self.pool.get('event.registration')
user_pool = self.pool.get('res.users')
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index c6e16a240ae..27ff18d1457 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -152,25 +152,33 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
From 4a02e98d42678b9becec3bacf4d65906596bfdf7 Mon Sep 17 00:00:00 2001
From: "Atul Patel (OpenERP)"
Date: Mon, 21 May 2012 18:54:58 +0530
Subject: [PATCH 080/126] [FIX]: Add osv memory wizard for event
preview.Refactor code as per new specification.
bzr revid: atp@tinyerp.com-20120521132458-xozrh3vcz4wbo6t5
---
addons/event/__openerp__.py | 3 +-
addons/event/event.py | 37 +----
addons/event/event_view.xml | 110 +------------
addons/event/static/src/css/event.css | 181 ++++++++++++++-------
addons/event/static/src/js/google_map.js | 87 +++++-----
addons/event/wizard/__init__.py | 1 +
addons/event/wizard/event_preview.py | 56 +++++++
addons/event/wizard/event_preview_view.xml | 67 ++++++++
addons/event_sale/event_sale_view.xml | 2 +-
addons/mail/static/src/css/mail.css | 1 +
10 files changed, 300 insertions(+), 245 deletions(-)
create mode 100644 addons/event/wizard/event_preview.py
create mode 100644 addons/event/wizard/event_preview_view.xml
diff --git a/addons/event/__openerp__.py b/addons/event/__openerp__.py
index e05754eb992..577a9ba9f3c 100644
--- a/addons/event/__openerp__.py
+++ b/addons/event/__openerp__.py
@@ -46,6 +46,7 @@ Note that:
'security/event_security.xml',
'security/ir.model.access.csv',
'wizard/event_confirm_view.xml',
+ 'wizard/event_preview_view.xml',
'event_view.xml',
'report/report_event_registration_view.xml',
'board_association_view.xml',
@@ -54,7 +55,7 @@ Note that:
],
'demo_xml': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
- # 'js': ['static/src/js/google_map.js'],
+ 'js': ['static/src/js/google_map.js'],
'qweb': ['static/src/xml/event_address.xml'],
'css': ['static/src/css/event.css'],
'installable': True,
diff --git a/addons/event/event.py b/addons/event/event.py
index d029ba22acd..dfa35ad50b2 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -219,49 +219,14 @@ class event_event(osv.osv):
'company_id': fields.many2one('res.company', 'Company', required=False, change_default=True, readonly=False, states={'done': [('readonly', True)]}),
'is_subscribed' : fields.function(_subscribe_fnc, type="boolean", string='Subscribed'),
'available_qty': fields.integer('Availabel Quantity'),
+ 'sale_end_date': fields.datetime('SalesEnd'),
}
-
_defaults = {
'state': 'draft',
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'event.event', context=c),
'user_id': lambda obj, cr, uid, context: uid,
}
-
- def order_now(self, cr, uid, ids, context=None):
- register_pool = self.pool.get('event.registration')
- user_pool = self.pool.get('res.users')
- data_obj = self.pool.get('ir.model.data')
- user = user_pool.browse(cr, uid, uid, context=context)
- for event in self.browse(cr, uid, ids, context):
- self.check_registration_limits_before(cr, uid, ids, event.available_qty, context=context)
- curr_reg_ids = register_pool.search(cr, uid, [('user_id', '=', user.id), ('event_id', '=' , event.id)])
- #the subscription is done with UID = 1 because in case we share the kanban view, we want anyone to be able to subscribe
- print "event.curre_reg_ids",event.available_qty
- if not curr_reg_ids and event.available_qty > 0:
- print "cccccccccccc",event.available_qty
- curr_reg_ids = [register_pool.create(cr, 1, {'event_id': event.id ,'email': user.user_email, 'name':user.name, 'user_id': user.id, 'nb_register': event.available_qty})]
- elif event.available_qty > 0:
- print "mmmmmmm",event.available_qty
- register_pool.write(cr, uid, curr_reg_ids, {'nb_register': event.available_qty}, context=context)
- if event.available_qty > 0:
- register_pool.confirm_registration(cr, 1, curr_reg_ids, context=context)
- view_id = data_obj._get_id(cr, uid, 'event', 'view_event_registration_form')
- if view_id:
- res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
- res = {
- 'name': _('Registration'),
- 'view_type': 'form',
- 'view_mode': 'form',
- 'res_model': 'event.registration',
- 'res_id': curr_reg_ids[0],
- 'views':[(res_id,'form'), (False, 'tree')],
- 'type': 'ir.actions.act_window',
- 'nodestroy': True,
- 'target': 'current',
- }
- return res
-
def subscribe_to_event(self, cr, uid, ids, context=None):
register_pool = self.pool.get('event.registration')
user_pool = self.pool.get('res.users')
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 27ff18d1457..730f6cb6573 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -47,7 +47,7 @@
-
-
-
- Events
- event.event
- form
- 20
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -257,6 +159,7 @@
+
@@ -308,7 +211,9 @@
Subscribe
-
+
+ Preview
+
@@ -316,7 +221,6 @@
Subscribed
Unsubscribe
-
@@ -584,7 +488,7 @@
tree,form,calendar,graph
{}
-
+ view_
|