@@ -151,6 +177,7 @@
+
@@ -263,7 +290,7 @@
Project Phasesproject.phaseform
- tree,form,gantt,calendar
+ gantt,tree,form,calendar{'search_default_responsible_id':uid}You can subdivide your larger projects into several phases. For each phase, you can define your resources allocation (humans or engine), describe de differend task and link your phase with previous and next one, add constraints date and scheduling. A gantt view of your project phase is also available from this menu. Gantt view is a graphically draw of the project plan; it includes any task dependencies by visually adjusting task durations and priorities, and by linking tasks to each other.
@@ -299,7 +326,30 @@
# ------------------------------------------------------
# Project Task
# ------------------------------------------------------
-
+
+
+ phase.task.form2
+ project.task
+ form
+
+
+
+
+
+
+
+
+ phase.task.search.form
+ project.task
+ search
+
+
+
+
+
+
+
+
tree
+
@@ -67,8 +68,10 @@
project.messagessearch
-
+
+
+
@@ -86,7 +89,7 @@
- Communication Messages
+ Project Messagesproject.messagesform
diff --git a/addons/project_planning/project_planning_view.xml b/addons/project_planning/project_planning_view.xml
index 93a5c2c81b7..9363413e4a2 100644
--- a/addons/project_planning/project_planning_view.xml
+++ b/addons/project_planning/project_planning_view.xml
@@ -278,7 +278,6 @@
-
@@ -294,6 +293,7 @@
report_account_analytic.planning.statformgraph,tree
+ {"search_default_user_id":uid}
.
#
##############################################################################
-from mx import DateTime
from osv import fields, osv
from tools.translate import _
import re
import time
import tools
-
+from datetime import datetime
+from dateutil.relativedelta import relativedelta
class project_scrum_project(osv.osv):
_inherit = 'project.project'
@@ -147,7 +147,7 @@ class project_scrum_sprint(osv.osv):
proj = self.pool.get('project.project').browse(cr, uid, [project_id])[0]
v['product_owner_id']= proj.product_owner_id and proj.product_owner_id.id or False
v['scrum_master_id']= proj.user_id and proj.user_id.id or False
- v['date_stop'] = (DateTime.now() + DateTime.RelativeDateTime(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
+ v['date_stop'] = (datetime.now() + relativedelta(days=int(proj.sprint_size or 14))).strftime('%Y-%m-%d')
return {'value':v}
project_scrum_sprint()
@@ -257,14 +257,14 @@ class project_scrum_product_backlog(osv.osv):
'name' : fields.char('Feature', size=64, required=True),
'note' : fields.text('Note'),
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
- 'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
+ 'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)]),
'user_id': fields.many2one('res.users', 'Author'),
'sprint_id': fields.many2one('project.scrum.sprint', 'Sprint'),
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
'state': fields.selection([('draft','Draft'),('open','Open'),('pending','Pending'),('done','Done'),('cancel','Cancelled')], 'State', required=True),
'progress': fields.function(_compute, multi="progress", group_operator="avg", type='float', method=True, string='Progress', help="Computed as: Time Spent / Total Time."),
- 'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks"),
+ 'effective_hours': fields.function(_compute, multi="effective_hours", method=True, string='Spent Hours', help="Computed using the sum of the time spent on every related tasks", store=True),
'expected_hours': fields.float('Planned Hours', help='Estimated total time to do the Backlog'),
'create_date': fields.datetime("Creation Date", readonly=True),
'task_hours': fields.function(_compute, multi="task_hours", method=True, string='Task Hours', help='Estimated time of the total hours of the tasks')
diff --git a/addons/project_scrum/project_scrum_view.xml b/addons/project_scrum/project_scrum_view.xml
index fcf7cae08f5..843b35646e4 100644
--- a/addons/project_scrum/project_scrum_view.xml
+++ b/addons/project_scrum/project_scrum_view.xml
@@ -41,7 +41,7 @@
-
+
@@ -192,7 +192,19 @@
-
+
+
+ project.scrum.sprint.calendar
+ project.scrum.sprint
+ calendar
+
+
+
+
+
+
+
+
project.scrum.sprint.treeproject.scrum.sprint
@@ -333,7 +345,7 @@
Sprintsproject.scrum.sprintform
- tree,form
+ tree,form,calendar{"search_default_filter_current": 1, "search_default_scrum_master_id":uid}
@@ -345,7 +357,19 @@
-
+
+
+ project.scrum.meeting.calendar
+ project.scrum.meeting
+ calendar
+
+
+
+
+
+
+
+
project.scrum.meeting.treeproject.scrum.meeting
@@ -424,7 +448,7 @@
Scrum Meetingsproject.scrum.meetingform
- tree,form
+ tree,form,calendar{'search_default_scrum_daily':1,'search_default_project_id':project_id}
diff --git a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
index 2b8a641622d..1e0e9df66d5 100644
--- a/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
+++ b/addons/project_scrum/wizard/project_scrum_backlog_create_task.py
@@ -31,6 +31,7 @@ class backlog_create_task(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
task = self.pool.get('project.task')
backlog_id = self.pool.get('project.scrum.product.backlog')
+ document_pool = self.pool.get('ir.attachment')
ids_task = []
if context is None:
@@ -39,9 +40,9 @@ class backlog_create_task(osv.osv_memory):
backlogs = backlog_id.browse(cr, uid, context['active_ids'], context=context)
result = mod_obj._get_id(cr, uid, 'project', 'view_task_search_form')
id = mod_obj.read(cr, uid, result, ['res_id'])
-
+
for backlog in backlogs:
- ids_task.append(task.create(cr, uid, {
+ task_id = task.create(cr, uid, {
'product_backlog_id': backlog.id,
'name': backlog.name,
'description': backlog.note,
@@ -50,8 +51,11 @@ class backlog_create_task(osv.osv_memory):
'planned_hours': backlog.expected_hours,
'remaining_hours':backlog.expected_hours,
'sequence':backlog.sequence,
- }))
-
+ })
+ document_ids = document_pool.search(cr, uid, [('res_id', '=', backlog.id), ('res_model', '=', backlog_id._name)])
+ for document_id in document_ids:
+ document_pool.copy(cr, uid, document_id, default={'res_id':task_id, 'res_model':task._name})
+ ids_task.append(task_id)
return {
'domain': "[('product_backlog_id','in',["+','.join(map(str, context['active_ids']))+"])]",
'name': 'Tasks',
diff --git a/addons/purchase/i18n/ru.po b/addons/purchase/i18n/ru.po
index 1eb0196db22..ab3c213f91d 100644
--- a/addons/purchase/i18n/ru.po
+++ b/addons/purchase/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 14:29+0000\n"
+"PO-Revision-Date: 2010-09-30 06:38+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: purchase
diff --git a/addons/purchase/report/order.rml b/addons/purchase/report/order.rml
index 2b6d1f3bbed..5fbc2cbdcc2 100644
--- a/addons/purchase/report/order.rml
+++ b/addons/purchase/report/order.rml
@@ -333,7 +333,7 @@
Taxes :
- [[ formatLang(o.amount_tax) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Purchase Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -364,4 +364,4 @@
-
\ No newline at end of file
+
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index 3daeab14881..de25b07ff9d 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -102,7 +102,7 @@
treepurchase.requisition
-
+
diff --git a/addons/sale/i18n/ru.po b/addons/sale/i18n/ru.po
index 5bf8551edbf..556ed670eaf 100644
--- a/addons/sale/i18n/ru.po
+++ b/addons/sale/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 20:42+0000\n"
+"PO-Revision-Date: 2010-09-30 06:52+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:42+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
diff --git a/addons/sale/i18n/vi.po b/addons/sale/i18n/vi.po
index 5ef0479bf3d..ff262000409 100644
--- a/addons/sale/i18n/vi.po
+++ b/addons/sale/i18n/vi.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME \n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 08:39+0000\n"
-"Last-Translator: OpenERP Administrators \n"
+"PO-Revision-Date: 2010-10-02 08:58+0000\n"
+"Last-Translator: Phong Nguyen \n"
"Language-Team: Vietnamese \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
+"X-Launchpad-Export-Date: 2010-10-03 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale
@@ -40,7 +40,7 @@ msgstr "Đặt giao hàng"
#. module: sale
#: field:sale.order.line,address_allotment_id:0
msgid "Allotment Partner"
-msgstr ""
+msgstr "Đối tác phân phối"
#. module: sale
#: constraint:ir.actions.act_window:0
@@ -58,11 +58,13 @@ msgid ""
"If you don't have enough stock available to deliver all at once, do you "
"accept partial shipments or not?"
msgstr ""
+"Nếu bạn không có đủ hàng để giao hàng toàn bộ một lần, bạn có chấp nhận giao "
+"hàng từng phần hay không?"
#. module: sale
#: selection:sale.order.line,type:0
msgid "from stock"
-msgstr ""
+msgstr "theo nhu cầu dự báo"
#. module: sale
#: field:sale.config.picking_policy,step:0
@@ -100,13 +102,13 @@ msgstr "Sửa lại"
#. module: sale
#: selection:sale.order,state:0
msgid "Invoice Exception"
-msgstr ""
+msgstr "Hóa đơn ngoại lệ"
#. module: sale
#: help:sale.order,picking_ids:0
msgid ""
"This is the list of picking list that have been generated for this invoice"
-msgstr ""
+msgstr "Đây là danh sách các sản phẩm đã chọn được tạo ra cho hóa đơn này"
#. module: sale
#: model:process.node,note:sale.process_node_deliveryorder0
@@ -126,7 +128,7 @@ msgstr "Xác nhận"
#. module: sale
#: view:sale.order:0
msgid "Make Invoice"
-msgstr ""
+msgstr "Lập hóa đơn"
#. module: sale
#: field:sale.order.line,price_subtotal:0
@@ -139,6 +141,8 @@ msgid ""
"Whenever confirm button is clicked, the draft state is moved to manual. that "
"is, quotation is moved to sale order."
msgstr ""
+"Bất kỳ khi nào nút xác nhận được chọn, trạng thái dự thảo sẽ được chuyển "
+"sang thủ công. Nghĩa là, báo giá được chuyển thành đơn chào hàng."
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_cancelorder0
@@ -194,7 +198,7 @@ msgstr "Đã hủy bỏ"
#. module: sale
#: selection:sale.order,state:0
msgid "Shipping Exception"
-msgstr ""
+msgstr "Vận chuyển ngoại lệ"
#. module: sale
#: field:sale.order,amount_total:0
@@ -229,7 +233,7 @@ msgstr "Tất cả một lúc"
#. module: sale
#: model:process.transition,note:sale.process_transition_saleprocurement0
msgid "Procurement is created after confirmation of sale order."
-msgstr ""
+msgstr "Việc thu mua hàng được tạo sau khi có xác nhận của đơn chào hàng."
#. module: sale
#: field:sale.order,project_id:0
@@ -271,7 +275,7 @@ msgstr "Thông tin các dơn đặt hàng"
#. module: sale
#: field:sale.order.line,product_uos_qty:0
msgid "Quantity (UoS)"
-msgstr ""
+msgstr "Số lượng (Đơn vị bán)"
#. module: sale
#: help:sale.order,invoice_quantity:0
@@ -281,6 +285,11 @@ msgid ""
"choose if you invoice based on ordered or shipped quantities. If the product "
"is a service, shipped quantities means hours spent on the associated tasks."
msgstr ""
+"Đơn chào hàng sẽ tự động tạo hóa đơn gợi ý (hóa đơn dự thảo). Số lượng yêu "
+"cầu và số lượng giao hàng có thể không giống nhau. Bạn phải chọn nếu bạn lập "
+"hóa đơn dựa trên số lượng đặt hàng hay số lượng giao hàng. Nếu sản phẩm là "
+"một dịch vụ, số lượng giao hàng có nghĩa là số giờ đã dùng để thực hiện các "
+"công việc liên quan."
#. module: sale
#: selection:sale.order.line,state:0
@@ -355,7 +364,7 @@ msgstr "Dòng hoá đơn"
#. module: sale
#: model:process.transition.action,name:sale.process_transition_action_forceassignation0
msgid "Force Assignation"
-msgstr ""
+msgstr "Phân phối lực lượng"
#. module: sale
#: view:sale.order:0
@@ -368,6 +377,9 @@ msgid ""
"Packing list is created when 'Assign' is being clicked after confirming the "
"sale order. This transaction moves the sale order to packing list."
msgstr ""
+"Bảng kê bao bì hàng hóa được tạo khi nút 'Chỉ định' được chọn sau khi xác "
+"nhận đơn chào hàng. Giao dịch này chuyển đơn chào hàng sang bảng kê bao bì "
+"hàng hóa."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree8
@@ -386,6 +398,8 @@ msgid ""
"When you select Shipping Ploicy = 'Automatic Invoice after delivery' , it "
"will automatic create after delivery."
msgstr ""
+"Khi bạn chọn chính sách vận chuyển = 'Tự động xuất hóa đơn sau khi giao "
+"hàng', nó sẽ tự động tạo sau khi giao hàng."
#. module: sale
#: selection:sale.order,picking_policy:0
@@ -475,7 +489,7 @@ msgstr ""
#. module: sale
#: field:sale.shop,payment_account_id:0
msgid "Payment Accounts"
-msgstr ""
+msgstr "Tài khoản thanh toán"
#. module: sale
#: constraint:product.template:0
@@ -506,7 +520,7 @@ msgstr "Tài khoản thanh toán"
#. module: sale
#: wizard_button:sale.advance_payment_inv,create,end:0
msgid "Close"
-msgstr ""
+msgstr "Đóng"
#. module: sale
#: model:process.node,name:sale.process_node_invoice0
@@ -534,18 +548,18 @@ msgstr "Giảm giá (%)"
#. module: sale
#: model:process.node,note:sale.process_node_invoice0
msgid "Draft customer invoice, to be reviewed by accountant."
-msgstr ""
+msgstr "Hóa đơn khách hàng dự thảo, sẽ được kế toán xem xét lại."
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree3
#: model:ir.ui.menu,name:sale.menu_action_order_tree3
msgid "Sales Order To Be Invoiced"
-msgstr ""
+msgstr "Đơn chào hàng sẽ được lập hóa đơn"
#. module: sale
#: model:process.node,note:sale.process_node_saleorderprocurement0
msgid "Procurement for each line"
-msgstr ""
+msgstr "Thu mua hàng cho mỗi sản phẩm"
#. module: sale
#: model:ir.actions.act_window,name:sale.action_order_tree10
diff --git a/addons/sale/report/sale_order.rml b/addons/sale/report/sale_order.rml
index 3f44ef2afb3..a4eab5aa86d 100644
--- a/addons/sale/report/sale_order.rml
+++ b/addons/sale/report/sale_order.rml
@@ -312,7 +312,7 @@
Net Total :
- [[ formatLang(o.amount_untaxed ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -325,7 +325,7 @@
Taxes :
- [[ formatLang(o.amount_tax ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -338,7 +338,7 @@
Total :
- [[ formatLang(o.amount_total ) ]] [[ o.pricelist_id.currency_id. symbol ]]
+ [[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.pricelist_id.currency_id. symbol ]]
@@ -361,4 +361,4 @@
-
\ No newline at end of file
+
diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml
index d796edd2d2c..b914e2b2d4b 100644
--- a/addons/sale/report/sale_report_view.xml
+++ b/addons/sale/report/sale_report_view.xml
@@ -86,17 +86,17 @@
-
-
-
+
+
+
-
+
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 96f80fe6f18..fef8f21000f 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -21,12 +21,12 @@
from datetime import datetime, timedelta
from dateutil.relativedelta import relativedelta
+import time
+
from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
import netsvc
-import time
-
class sale_shop(osv.osv):
_name = "sale.shop"
@@ -37,7 +37,10 @@ class sale_shop(osv.osv):
'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse'),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist'),
'project_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('parent_id', '!=', False)]),
- 'company_id': fields.many2one('res.company', 'Company', required=True),
+ 'company_id': fields.many2one('res.company', 'Company', required=False),
+ }
+ _defaults = {
+ 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'sale.shop', context=c),
}
sale_shop()
@@ -62,6 +65,7 @@ class sale_order(osv.osv):
'shipped': False,
'invoice_ids': [],
'picking_ids': [],
+ 'date_confirm':False,
'name': self.pool.get('ir.sequence').get(cr, uid, 'sale.order'),
})
return super(sale_order, self).copy(cr, uid, id, default, context=context)
@@ -864,13 +868,6 @@ class sale_order_line(osv.osv):
'product_packaging': False
}
- def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
- if context is None:
- context = {}
- context.update({'active_ids' : ids,'active_id' : ids})
- self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
- return True
-
def invoice_line_create(self, cr, uid, ids, context=None):
if context is None:
context = {}
diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml
index eec5847ed92..be0d254debd 100644
--- a/addons/sale/sale_view.xml
+++ b/addons/sale/sale_view.xml
@@ -157,10 +157,10 @@
@@ -364,6 +364,7 @@ to your configuration: from the sales order, from the pickings, etc.
+
@@ -373,7 +374,6 @@ to your configuration: from the sales order, from the pickings, etc.
form
-
@@ -381,50 +381,36 @@ to your configuration: from the sales order, from the pickings, etc.
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/addons/sale/test/so_make_line_invoice.yml b/addons/sale/test/so_make_line_invoice.yml
index 0aa18df1c9f..d5e81c9e96c 100644
--- a/addons/sale/test/so_make_line_invoice.yml
+++ b/addons/sale/test/so_make_line_invoice.yml
@@ -41,15 +41,20 @@
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
-
- I click on the "Create Invoice" button of sale order line
+ I click on the "Make Invoice" button of sale order line
+-
+ !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_0}:
+ {}
+-
+ I click on the "Create Invoice" button of wizard
-
- !python {model: sale.order.line}: |
+ !python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[0]
- self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
- "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
- "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_0")], {"lang": "en_US",
+ "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
+ "search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that "Invoiced" has been set to True.
@@ -115,17 +120,20 @@
sale_id=self.browse(cr, uid, ref("sale_order_so3"))
assert(sale_id.invoiced == True), "Paid has not been set to true"
-
- I click on the "Create Invoice" button of sale order and verify that it gives a warning message
+ I create an invoice for another sale order line. I click on the "Make Invoice" button of sale order line
-
- I create an invoice for another sale order line. I click on the "Create Invoice" button of sale order line
--
- !python {model: sale.order.line}: |
+ !record {model: sale.order.line.make.invoice, id: sale_order_line_make_invoice_1}:
+ {}
+-
+ I click on the "Create Invoice" button of wizard
+-
+ !python {model: sale.order.line.make.invoice}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so3"))
sol = so.order_line[1]
- self.create_sale_order_line_invoice(cr, uid, [sol.id], {"lang": "en_US",
- "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale.menu_invoicing_sales_order_lines")],
- "search_default_uninvoiced": 1, "active_id": ref("sale.menu_invoicing_sales_order_lines"),
+ self.make_invoices(cr, uid, [ref("sale_order_line_make_invoice_1")], {"lang": "en_US",
+ "tz": False, "active_model": "sale.order.line", "active_ids": [sol.id],
+ "search_default_uninvoiced": 1, "active_id": sol.id,
})
-
I verify that invoice for sale order line has been created.
diff --git a/addons/sale/wizard/sale_line_invoice.xml b/addons/sale/wizard/sale_line_invoice.xml
index 63a26587d43..b48247f8e58 100644
--- a/addons/sale/wizard/sale_line_invoice.xml
+++ b/addons/sale/wizard/sale_line_invoice.xml
@@ -20,7 +20,18 @@
sale.order.line.make.invoiceformform
+ new
+
+
+
+
+ Make Invoices
+ client_action_multi
+
+ action
+ sale.order.line
+
\ No newline at end of file
diff --git a/addons/sale/wizard/sale_make_invoice.xml b/addons/sale/wizard/sale_make_invoice.xml
index 2bef6b67513..106e6945207 100644
--- a/addons/sale/wizard/sale_make_invoice.xml
+++ b/addons/sale/wizard/sale_make_invoice.xml
@@ -24,8 +24,18 @@
sale.make.invoiceformform
+ new
-
+
+
+
+
+ Make Invoices
+ client_action_multi
+
+ action
+ sale.order
+
\ No newline at end of file
diff --git a/addons/sale_crm/i18n/ru.po b/addons/sale_crm/i18n/ru.po
index f7882eacc5b..6585d3294e4 100644
--- a/addons/sale_crm/i18n/ru.po
+++ b/addons/sale_crm/i18n/ru.po
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
-"PO-Revision-Date: 2010-09-29 18:56+0000\n"
+"PO-Revision-Date: 2010-09-30 06:39+0000\n"
"Last-Translator: Chertykov Denis \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2010-09-30 04:39+0000\n"
+"X-Launchpad-Export-Date: 2010-10-01 08:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: sale_crm
diff --git a/addons/sale_journal/sale_journal_view.xml b/addons/sale_journal/sale_journal_view.xml
index f4305329d0d..8a8eb0d2c1e 100644
--- a/addons/sale_journal/sale_journal_view.xml
+++ b/addons/sale_journal/sale_journal_view.xml
@@ -1,8 +1,9 @@
-
+
+ parent="base.menu_base_config" sequence="5" groups="base.group_system,base.group_sale_salesman"/>
diff --git a/addons/sale_layout/report/report_sale_layout.py b/addons/sale_layout/report/report_sale_layout.py
index 20ad66313a2..3e61a6cd3e9 100755
--- a/addons/sale_layout/report/report_sale_layout.py
+++ b/addons/sale_layout/report/report_sale_layout.py
@@ -1,5 +1,5 @@
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL ().
#
@@ -14,21 +14,22 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
#
##############################################################################
import time
-import pooler
from report import report_sxw
rml_parents = {
- 'tr':1,
- 'li':1,
+ 'tr': 1,
+ 'li': 1,
'story': 0,
'section': 0
}
+
+
class sale_order_1(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(sale_order_1, self).__init__(cr, uid, name, context)
@@ -39,98 +40,94 @@ class sale_order_1(report_sxw.rml_parse):
})
self.context = context
-#
+ def sale_order_lines(self, sale_order):
+ result = []
+ sub_total = {}
+ info = []
+ order_lines = []
+ res = {}
- def sale_order_lines(self,sale_order):
- result =[]
- sub_total={}
- info=[]
- order_lines=[]
- res={}
- list_in_seq=[]
ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)])
- for id in range(0,len(ids)):
- order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.context.copy())
+ for id in range(0, len(ids)):
+ order = self.pool.get('sale.order.line').browse(self.cr, self.uid, ids[id], self.context.copy())
order_lines.append(order)
-
- i=1
- j=0
- sum_flag={}
- sum_flag[j]=-1
+
+ i = 1
+ j = 0
+ sum_flag = {}
+ sum_flag[j] = -1
for entry in order_lines:
- res={}
+ res = {}
- if entry.layout_type=='article':
- res['tax_id']=', '.join(map(lambda x: x.name, entry.tax_id)) or ''
- res['name']=entry.name
- res['product_uom_qty']="%.2f"%(entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00)
- res['product_uom']=entry.product_uos and entry.product_uos.name or entry.product_uom.name
- res['price_unit']="%.2f"%(entry.price_unit or 0.00)
- res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
- res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
- sub_total[i]= entry.price_subtotal and entry.price_subtotal
- i=i+1
- res['note']=entry.notes or ''
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['layout_type']=entry.layout_type
-
+ if entry.layout_type == 'article':
+ res['tax_id'] = ', '.join(map(lambda x: x.name, entry.tax_id)) or ''
+ res['name'] = entry.name
+ res['product_uom_qty'] = entry.product_uos and entry.product_uos_qty or entry.product_uom_qty or 0.00
+ res['product_uom'] = entry.product_uos and entry.product_uos.name or entry.product_uom.name
+ res['price_unit'] = entry.price_unit or 0.00
+ res['discount'] = entry.discount and entry.discount or 0.00
+ res['price_subtotal'] = entry.price_subtotal and entry.price_subtotal or 0.00
+ sub_total[i] = entry.price_subtotal and entry.price_subtotal
+ i = i + 1
+ res['note'] = entry.notes or ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['layout_type'] = entry.layout_type
else:
+ res['product_uom_qty'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['layout_type'] = entry.layout_type
+ res['note'] = entry.notes or ''
+ res['product_uom'] = ''
- res['product_uom_qty']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['layout_type']=entry.layout_type
- res['note']=entry.notes or ''
- res['product_uom']=''
-
- if entry.layout_type=='subtotal':
- res['name']=entry.name
- sum=0
- sum_id=0
- if sum_flag[j]==-1:
- temp=1
+ if entry.layout_type == 'subtotal':
+ res['name'] = entry.name
+ sum = 0
+ sum_id = 0
+ if sum_flag[j] == -1:
+ temp = 1
else:
- temp=sum_flag[j]
+ temp = sum_flag[j]
- for sum_id in range(temp,len(sub_total)+1):
- sum+=sub_total[sum_id]
- sum_flag[j+1]= sum_id +1
+ for sum_id in range(temp, len(sub_total)+1):
+ sum += sub_total[sum_id]
+ sum_flag[j+1] = sum_id +1
- j=j+1
- res['price_subtotal']="%.2f"%(sum)
- res['currency']=sale_order.pricelist_id.currency_id.name
- res['quantity']=''
- res['price_unit']=''
- res['discount']=''
- res['tax_id']=''
- res['product_uom']=''
- elif entry.layout_type=='title':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='text':
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
- elif entry.layout_type=='line':
- res['product_uom_qty']='__________'
- res['price_unit']='______________'
- res['discount']='___________'
- res['tax_id']='_________________'
- res['product_uom']='_____'
- res['name']='_______________________________________'
- res['price_subtotal']='_________'
- res['currency']='_______'
- elif entry.layout_type=='break':
- res['layout_type']=entry.layout_type
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=''
+ j = j + 1
+ res['price_subtotal'] = sum
+ res['currency'] = sale_order.pricelist_id.currency_id.name
+ res['quantity'] = ''
+ res['price_unit'] = ''
+ res['discount'] = ''
+ res['tax_id'] = ''
+ res['product_uom'] = ''
+ elif entry.layout_type == 'title':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'text':
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
+ elif entry.layout_type == 'line':
+ res['product_uom_qty'] = '__________'
+ res['price_unit'] = '______________'
+ res['discount'] = '___________'
+ res['tax_id'] = '_________________'
+ res['product_uom'] = '_____'
+ res['name'] = '_______________________________________'
+ res['price_subtotal'] = '_________'
+ res['currency'] = '_______'
+ elif entry.layout_type == 'break':
+ res['layout_type'] = entry.layout_type
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = ''
else:
- res['name']=entry.name
- res['price_subtotal']=''
- res['currency']=sale_order.pricelist_id.currency_id.name
+ res['name'] = entry.name
+ res['price_subtotal'] = ''
+ res['currency'] = sale_order.pricelist_id.currency_id.name
result.append(res)
return result
diff --git a/addons/sale_layout/report/report_sale_layout.rml b/addons/sale_layout/report/report_sale_layout.rml
index d33d424a8a2..b01affd5329 100755
--- a/addons/sale_layout/report/report_sale_layout.rml
+++ b/addons/sale_layout/report/report_sale_layout.rml
@@ -318,13 +318,13 @@
[[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['product_uom'] ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ a['price_unit'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]] [[ formatLang(a['price_unit'], digits=get_digits(dp='Sale Price')) ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['discount'] ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['discount'], digits=get_digits(dp='Sale Price')) ]]
- [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ a['price_subtotal'] ]] [[ o.pricelist_id.currency_id.symbol ]]
+ [[ a['layout_type']=='subtotal' and ( setTag('para','para',{'fontName':'Helvetica-Bold'})) or removeParentNode('font') ]][[ formatLang(a['price_subtotal'], digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id.symbol ]]
diff --git a/addons/sale_order_dates/sale_order_dates.py b/addons/sale_order_dates/sale_order_dates.py
index ce82796235f..beca56b838e 100644
--- a/addons/sale_order_dates/sale_order_dates.py
+++ b/addons/sale_order_dates/sale_order_dates.py
@@ -56,9 +56,9 @@ class sale_order_dates(osv.osv):
return res
_columns = {
- 'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date'),
- 'requested_date': fields.date('Requested Date'),
- 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date'),
+ 'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date', help="Date on which delivery of products is to be made"),
+ 'requested_date': fields.date('Requested Date', help="Date on which customer has requested for sales"),
+ 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date',help="Date on which picking is created"),
}
sale_order_dates()
diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml
index 317180c7209..c2b46959e1d 100644
--- a/addons/stock/report/picking.rml
+++ b/addons/stock/report/picking.rml
@@ -181,7 +181,7 @@
[[ picking.origin or '']]
- [[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and and picking.address_id.name) or '' ]]
+ [[ (picking.address_id and picking.address_id.title) or '' ]] [[ (picking.address_id and picking.address_id.name) or '' ]]
"""
- cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %d" % ans.id)
+ cr.execute("select count(id) from survey_response_answer sra where sra.answer_id = %s", (ans.id,))
tot_res = cr.fetchone()[0]
- cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id = %d group by sra.column_id" % ans.id)
+ cr.execute("select count(id) ,sra.column_id from survey_response_answer sra where sra.answer_id=%s group by sra.column_id", (ans.id,))
calc_res = cr.dictfetchall()
for mat_col in range(1, len(matrix_ans)):
percantage = 0.0
@@ -210,7 +210,7 @@ class survey_analysis(report_rml):
rml += """"""
if que.is_comment_require:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''",(que.id,))
tot_res = cr.fetchone()[0]
rml += """
""" + to_xml(tools.ustr(que.comment_label)) + """
""" + tools.ustr(tot_res) + """
"""
@@ -244,7 +244,7 @@ class survey_analysis(report_rml):
if que.is_comment_require:
# if que.make_comment_field:
-# cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+# cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''", (que.id,))
# tot_res = cr.fetchone()[0]
# tot_avg = 0.00
# if que.tot_resp:
@@ -253,13 +253,13 @@ class survey_analysis(report_rml):
#
""" + str(tot_avg) + """%
#
""" + tools.ustr(tot_res) + """
"""
# else:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment != ''"% que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment != ''", (que.id,))
tot_res = cr.fetchone()[0]
rml += """
""" + to_xml(tools.ustr(que.comment_label)) + """
""" + tools.ustr(tot_res) + """
"""
elif que.type in['single_textbox']:
- cr.execute("select count(id) from survey_response_line where question_id = %d and single_text!=''" % que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and single_text!=''",(que.id,))
rml += """
@@ -270,7 +270,7 @@ class survey_analysis(report_rml):
"""
elif que.type in['comment']:
- cr.execute("select count(id) from survey_response_line where question_id = %d and comment !=''" % que.id)
+ cr.execute("select count(id) from survey_response_line where question_id = %s and comment !=''", (que.id,))
rml += """
@@ -303,12 +303,12 @@ class survey_analysis(report_rml):
rating_weight_sum = 0
for mat_col in range(1, len(matrix_ans)):
cr.execute("select count(sra.answer_id) from survey_response_line sr, survey_response_answer sra\
- where sr.id = sra.response_id and sra.answer_id = %d and sra.column_id ='%d'" % (ans.id,matrix_ans[mat_col][0]))
+ where sr.id = sra.response_id and sra.answer_id = %s and sra.column_id ='%s'", (ans.id,matrix_ans[mat_col][0]))
tot_res = cr.fetchone()[0]
cr.execute("select count(sra.answer_id),sqc.rating_weight from survey_response_line sr, survey_response_answer sra ,\
survey_question_column_heading sqc where sr.id = sra.response_id and \
- sqc.question_id = sr.question_id and sra.answer_id = %d and sqc.title ='%s'\
- group by sra.answer_id,sqc.rating_weight" % (ans.id,matrix_ans[mat_col][1]))
+ sqc.question_id = sr.question_id and sra.answer_id = %s and sqc.title ='%s'\
++ group by sra.answer_id,sqc.rating_weight", (ans.id,matrix_ans[mat_col][1]))
col_weight = cr.fetchone()
if not col_weight:
@@ -352,10 +352,10 @@ class survey_analysis(report_rml):
rml += """
""" + to_xml(tools.ustr(menu)) + """
"""
rml += """
Answer Count
"""
cr.execute("select count(id), sra.answer_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.answer_id " % (column.id))
+ where sra.column_id='%s' group by sra.answer_id ", (column.id,))
res_count = cr.dictfetchall()
cr.execute("select count(sra.id),sra.value_choice, sra.answer_id, sra.column_id from survey_response_answer sra \
- where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id" % (column.id))
+ where sra.column_id='%s' group by sra.value_choice ,sra.answer_id, sra.column_id", (column.id,))
calc_percantage = cr.dictfetchall()
for ans in que.answer_choice_ids:
@@ -393,7 +393,7 @@ class survey_analysis(report_rml):
Answer Count
"""
for ans in que.answer_choice_ids:
- cr.execute("select answer from survey_response_answer where answer_id=%d group by answer" % ans.id)
+ cr.execute("select answer from survey_response_answer where answer_id=%s group by answer", (ans.id,))
tot_res = cr.dictfetchall()
total = 0
for tot in tot_res:
diff --git a/addons/survey/wizard/survey_answer.py b/addons/survey/wizard/survey_answer.py
index 4b44b6a1753..109f4509d81 100644
--- a/addons/survey/wizard/survey_answer.py
+++ b/addons/survey/wizard/survey_answer.py
@@ -108,7 +108,7 @@ class survey_question_wiz(osv.osv_memory):
if sur_rec.state != "open" :
raise osv.except_osv(_('Warning !'),_("You can not give answer because of survey is not open for answer"))
cr.execute('select count(id) from survey_history where user_id=%s\
- and survey_id=%s' % (uid,survey_id))
+ and survey_id=%s', (uid,survey_id))
res = cr.fetchone()[0]
user_limit = survey_obj.browse(cr, uid, survey_id)
user_limit = user_limit.response_user
@@ -401,12 +401,12 @@ class survey_question_wiz(osv.osv_memory):
address_id = user_obj.browse(cr, uid, uid).address_id.id
if address_id:
- cr.execute("select email from res_partner_address where id =%d" % address_id)
+ cr.execute("select email from res_partner_address where id =%s", (address_id,))
user_email = cr.fetchone()[0]
resp_id = survey_data.responsible_id.address_id
if resp_id:
- cr.execute("select email from res_partner_address where id =%d" % resp_id.id)
+ cr.execute("select email from res_partner_address where id =%s", (resp_id.id,))
resp_email = cr.fetchone()[0]
if user_email and resp_email:
user_name = user_obj.browse(cr, uid, uid).name
diff --git a/addons/test.txt b/addons/test.txt
new file mode 100644
index 00000000000..55e60eb73a8
--- /dev/null
+++ b/addons/test.txt
@@ -0,0 +1,8 @@
+this is a test file:
+-------------------
+the purpose is to test the buidlbot engine
+
+how to do?
+we simply gonna make several commit in a local branch, and also several commits in the main branch, then merge and see what happens
+
+iii
diff --git a/addons/thunderbird/partner/partner.py b/addons/thunderbird/partner/partner.py
index d0c830bfa8b..1c028a9e019 100644
--- a/addons/thunderbird/partner/partner.py
+++ b/addons/thunderbird/partner/partner.py
@@ -159,9 +159,6 @@ class thunderbird_partner(osv.osv_memory):
msg_ids = []
res = {}
res_ids = []
- if message_id:
- msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)])
- if msg_ids and len(msg_ids): return 0
for ref_id in ref_ids:
msg_new = dictcreate.get('message')
ref = ref_id.split(',')
@@ -181,6 +178,24 @@ class thunderbird_partner(osv.osv_memory):
message = dictcreate.get('message')
return self.pool.get('email.server.tools').process_email(cr, uid, model, message, attach=True, context=None)
+ def search_message(self, cr, uid, message, context=None):
+ #@param message: string of mail which is read from EML File
+ #@return model,res_id
+ dictcreate = dict(message)
+ message = dictcreate.get('message')
+ msg_pool = self.pool.get('mailgate.message')
+ msg = self.pool.get('email.server.tools').parse_message(message)
+ message_id = msg.get('message-id', False)
+ model = False
+ res_id = False
+ if message_id:
+ msg_ids = msg_pool.search(cr, uid, [('message_id','=',message_id)])
+ if msg_ids and len(msg_ids):
+ msg = msg_pool.browse(cr, uid, msg_ids[0])
+ model = msg.model
+ res_id = msg.res_id
+ return (model,res_id)
+
def search_contact(self, cr, user, email):
address_pool = self.pool.get('res.partner.address')
address_ids = address_pool.search(cr, user, [('email','=',email)])
diff --git a/addons/thunderbird/plugin/openerp_plugin.xpi b/addons/thunderbird/plugin/openerp_plugin.xpi
index e928318e313..56dd5241b9a 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin.xpi and b/addons/thunderbird/plugin/openerp_plugin.xpi differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar
index 2ee7837623f..b81a298f20a 100644
Binary files a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin.jar differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
index cacd522718e..9d39e4c5cfc 100644
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/address.xul
@@ -25,7 +25,6 @@
-
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
index 96f4a43b578..637d412d51b 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.js
@@ -175,6 +175,8 @@ function searchmail()
window.open("chrome://openerp_plugin/content/plugin.xul", "", "chrome, resizable=yes");
}
}
+
+
var openPartnerHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
@@ -190,16 +192,17 @@ var openPartnerHandler = {
alert("Partner is not Available.");
return;
}
- if(strlSearchResult=="partner_id"){
- partner_id = strlSearchResultValue;
- weburl = getWebServerURL();
- var branchobj = getPref();
- db_name = branchobj.getCharPref("serverdbname");
- if (weburl == false){
- weburl = 'http://localhost:8080'
- }
- if (partner_id > 0){
- window.open(weburl + "/model=res.partner&id=" + partner_id)
+ if(strlSearchResult=="partner_id"){
+ partner_id = strlSearchResultValue;
+ weburl = getWebServerURL();
+ webport = getwebPort();
+ var urlport = weburl+':'+webport
+
+ if (parseInt(partner_id) > 0){
+ var t = urlport + "/openerp/form/view?model=res.partner&id="+partner_id;
+ alert(t + ":" + " " + "\n\n" + "If you can not open this link directly in web browser then you can copy the link and paste in web browser.");
+ window.open(t);
+
}
else{
alert("Partner is not Available.");
@@ -292,19 +295,21 @@ function open_partner()
}
searchPartner(senderemail);
}
+
var listDocumentHandler = {
- onResult: function(client, context, result) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
- var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
- res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
- model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
- weburl = getWebServerURL()
- if (weburl == false){
- weburl = 'http://localhost:8080'
- }
- var branchobj = getPref();
- db_name = branchobj.getCharPref("serverdbname");
- window.open(weburl + "/model=" + model +"&id=" + res_id)
+ onResult: function(client, context, result) {
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
+ var res = result.QueryInterface(Components.interfaces.nsISupportsArray);
+ res_id = res.QueryElementAt(1, Components.interfaces.nsISupportsPRInt32);
+ model = res.QueryElementAt(0, Components.interfaces.nsISupportsCString);
+ weburl = getWebServerURL();
+ webport = getwebPort();
+
+ var urlport = weburl+':'+webport;
+ var t = urlport + "/openerp/form/view?model=" + model +"&id=" + res_id;
+ alert(t + ":" + " " + "\n\n" + "If you can not open this link directly in web browser then you can copy the link and paste in web browser.");
+ window.open(t);
+
},
onFault: function (client, ctxt, fault) {
@@ -313,12 +318,14 @@ var listDocumentHandler = {
onError: function (client, ctxt, status, errorMsg) {
}
-}
+}
+
+
function open_document()
-{
+{
if (check() == false){
return true
- }
+ }
var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var version_obj = prefService.getBranch("extensions.");
version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
@@ -355,12 +362,14 @@ function open_document()
strmethod.data = 'search_message';
var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
strobj.data = 'thunderbird.partner';
- var eml_string = parse_eml()
- var a = ['model', 'message'];
- var b = [object, eml_string];
- var arrofarr = dictcontact(a,b);
+ var eml_string = parse_eml()
+ var a = ['message'];
+ var b = [eml_string];
+ var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listDocumentHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
-}
+}
+
+
function open_contact()
{
if (check() == false){
@@ -428,6 +437,64 @@ function open_contact()
searchContact();
}
+function search_document()
+{
+ if (check() == false){
+ return true
+ }
+
+ var prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
+ var version_obj = prefService.getBranch("extensions.");
+ version_obj.QueryInterface(Components.interfaces.nsIPrefBranch2);
+ version = version_obj.getCharPref("lastAppVersion");
+ version = parseInt(version[0])
+
+ file = getPredefinedFolder(2);
+
+ if (version > 2)
+ {
+ var emlsArray = gFolderDisplay.selectedMessages;
+ }
+ else
+ {
+ var emlsArray = GetSelectedMessages();
+ }
+
+ IETtotal = emlsArray.length;
+ IETexported = 0;
+ var msguri = emlsArray[0];
+
+
+ //gives the selected email uri
+ var messageUri= gDBView.URIForFirstSelectedMessage;
+
+ var messenger = Components.classes['@mozilla.org/messenger;1'].createInstance(Components.interfaces.nsIMessenger);
+
+ //gives the selected email object
+ var message = messenger.messageServiceFromURI(messageUri).messageURIToMsgHdr(messageUri);
+
+ //functionality to split the author name and email
+ if(message.author.charAt(0) == '"'){
+ sendername = message.author.split('"')[1].split('"')[0];
+ }
+ else if(message.author.indexOf('<')!=-1){
+ sendername = message.author.split('<')[0];
+ }
+ else{
+ sendername = message.author;
+ }
+ if(message.author.indexOf('<')!=-1){
+ senderemail = message.author.split('<')[1].split('>')[0];
+ }
+ else{
+ senderemail = message.author
+ }
+
+ //set the initial information for the selected email
+ setSenderEmail(senderemail);
+ setSenderName(sendername);
+ searchdocument();
+}
//function to open the configuration window
var Config = {
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
index 6e2af251052..230ab391ff1 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/overlay.xul
@@ -42,18 +42,11 @@
oncommand="searchmail();" />
-
-
-
@@ -62,7 +55,7 @@
class="toolbarbutton-1"
image="&imagearchive.value;"
label= "Open Document"
- oncommand="open_document();" />
+ oncommand="search_document();" />
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
index 0736e39b3ed..34b68ee9bc3 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/content/tiny_xmlrpc.js
@@ -408,6 +408,11 @@ function getWebServerURL(){
return getPref().getCharPref('webserverurl');
}
+//get webserver port
+function getwebPort(){
+ return getPref().getCharPref('webserverport');
+}
+
//get username from config settings
function getUsername(){
return getPref().getCharPref('username');
@@ -961,6 +966,41 @@ function module_install()
xmlRpcClient.asyncCall(listinstallmodulehandler,null,'execute',[ strDbName,struid,strpass,strobj,strmethod, strvalue],6);
}
+var listSearchwebdocumentHandler = {
+ onResult: function(client, context, result) {
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
+ var sendername = getSenderEmail();
+ var arrIdList = result.QueryInterface(Components.interfaces.nsISupportsArray);
+ var count = arrIdList.Count();
+ for (i = 0; i < count; i++) {
+ var strlResult = arrIdList.QueryElementAt(i, Components.interfaces.nsISupportsArray);
+ var strlSearchResult = strlResult.QueryElementAt(0, Components.interfaces.nsISupportsCString);
+ var strlSearchResultValue = strlResult.QueryElementAt(1, Components.interfaces.nsISupportsCString);
+ }
+ if(strlSearchResult=="email" && strlSearchResultValue!=''){
+ setSenderEmail(strlSearchResultValue);
+ var t = getSenderEmail();
+ open_document();}
+
+ if(strlSearchResult=="email" && strlSearchResultValue==''){
+ alert("Contact is not available.so not open any document.");
+ }
+
+ if(strlSearchResult=="res_id"){
+ setResourceId(strlSearchResultValue);
+ var t = getResourceId();}
+ },
+ onFault: function (client, ctxt, fault) {
+
+ },
+
+ onError: function (client, ctxt, status, errorMsg) {
+
+ }
+
+}
+
+
var listSearchContactHandler = {
onResult: function(client, context, result) {
@@ -1031,6 +1071,7 @@ var listSearchContactHandler = {
}
}
+
var listSearchContactdetailHandler = {
onResult: function(client, context, result) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
@@ -1271,6 +1312,31 @@ function searchCheckbox()
xmlRpcClient.asyncCall(listSearchCheckboxHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,arrofarr ],6);
}
+function searchdocument()
+{
+ var branchobj = getPref();
+ setServerService('xmlrpc/object');
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserAccess');
+ arrFinalList = [];
+ var xmlRpcClient = getXmlRpc();
+ var cmbSearchList = document.getElementById('listSearchBox');
+ var strDbName = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strDbName.data = branchobj.getCharPref("serverdbname");
+ var struid = xmlRpcClient.createType(xmlRpcClient.INT,{});
+ struid.data = branchobj.getIntPref('userid');
+ var strpass = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strpass.data = branchobj.getCharPref("password");
+ var strobj = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strobj.data = 'thunderbird.partner';
+ var strmethod = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strmethod.data = 'search_contact';
+ var strname = xmlRpcClient.createType(xmlRpcClient.STRING,{});
+ strname.data = getSenderEmail();
+
+ xmlRpcClient.asyncCall(listSearchwebdocumentHandler,cmbSearchList,'execute',[ strDbName,struid,strpass,strobj,strmethod,strname ],6);
+}
+
+
function searchContact()
{
var branchobj = getPref();
@@ -1484,9 +1550,7 @@ function upload_archivemail()
var arrofarr = dictcontact(a,b);
xmlRpcClient.asyncCall(listArchiveHandler,null,'execute',[strDbName,struids,strpass,strobj,strmethod,arrofarr],6);
- // alert("Mail Archived Successfully to" +" " + ":" + " "+ list_documents.value);
- //window.close();
-
+
}
var listArchiveDocumentHandler = {
@@ -1762,12 +1826,7 @@ var listLoginHandler = {
setUserId(login.data);
module_install();
alert('Successfully Login To OpenERP.');
- if (check_module_install(5) == false){
- alert("Please install the thunderbird module on your '" + getDbName() +"' database and try again !");
- }
- else{
- window.close();
- }
+ window.close();
}
else{
alert("Login Failed");
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
index 48bec840d1a..fb257d70c95 100755
--- a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
+++ b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/locale/en-US/overlay.dtd
@@ -3,7 +3,7 @@
-
+
diff --git a/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner_icon.png b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner_icon.png
new file mode 100644
index 00000000000..b8f4a0f380b
Binary files /dev/null and b/addons/thunderbird/plugin/openerp_plugin/chrome/openerp_plugin/skin/partner_icon.png differ
diff --git a/addons/thunderbird/plugin/openerp_plugin/defaults/preferences/tiny.js b/addons/thunderbird/plugin/openerp_plugin/defaults/preferences/tiny.js
index ca8332c868e..1383eb28ea7 100755
--- a/addons/thunderbird/plugin/openerp_plugin/defaults/preferences/tiny.js
+++ b/addons/thunderbird/plugin/openerp_plugin/defaults/preferences/tiny.js
@@ -1,6 +1,9 @@
-
+pref("network.protocol-handler.app.http","/usr/bin/firefox");
+pref("network.protocol-handler.app.https","/usr/bin/firefox");
pref("extensions.tiny.serverurl", "http://localhost");
pref("extensions.tiny.serverport", "8069");
+pref("extensions.tiny.webserverurl", "http://localhost");
+pref("extensions.tiny.webserverport", "8080");
pref("extensions.tiny.serverdbname", "terp");
pref("extensions.tiny.username","admin");
pref("extensions.tiny.password","admin");