diff --git a/addons/account/process/customer_invoice_process.xml b/addons/account/process/customer_invoice_process.xml index be50089cc9d..c3fedd1826e 100755 --- a/addons/account/process/customer_invoice_process.xml +++ b/addons/account/process/customer_invoice_process.xml @@ -18,11 +18,10 @@ - + - @@ -60,7 +59,7 @@ - + diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml index 9fa1bf6becb..d0105f76e03 100755 --- a/addons/account/process/statement_process.xml +++ b/addons/account/process/statement_process.xml @@ -16,7 +16,7 @@ --> - + @@ -27,7 +27,7 @@ - + @@ -38,7 +38,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -65,6 +65,7 @@ + diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml index ef335146fa9..613aaaa4005 100755 --- a/addons/account/process/supplier_invoice_process.xml +++ b/addons/account/process/supplier_invoice_process.xml @@ -15,6 +15,17 @@ Process Node --> + + + + + + + + + + + @@ -38,14 +49,14 @@ - + - + @@ -95,6 +106,15 @@ Process Transition --> + + + + + + + + + diff --git a/addons/base_module_publish/wizard/module_zip.py b/addons/base_module_publish/wizard/module_zip.py index c3d04ceb5c4..569423e7c87 100644 --- a/addons/base_module_publish/wizard/module_zip.py +++ b/addons/base_module_publish/wizard/module_zip.py @@ -42,7 +42,7 @@ def _zippy(archive, fromurl, path, src=True): else: exclude = ['py','pyo','pyc'] if (path.split('.')[-1] not in exclude) or (os.path.basename(path)=='__terp__.py'): - archive.write(os.path.join(fromurl, path).encode(), path.encode()) + archive.write(os.path.join(fromurl, path).encode('utf8'), path.encode('utf8')) return True def createzip(cr, uid, moduleid, context, b64enc=True, src=True): @@ -60,7 +60,7 @@ def createzip(cr, uid, moduleid, context, b64enc=True, src=True): if os.path.isdir(os.path.join(ad, name)): archname = StringIO.StringIO('wb') archive = PyZipFile(archname, "w", ZIP_DEFLATED) - archive.writepy(os.path.join(ad, name).encode()) + archive.writepy(os.path.join(ad, name).encode('utf8')) _zippy(archive, ad, name, src=src) archive.close() val =archname.getvalue() diff --git a/addons/base_module_publish/wizard/wizard_module_export.py b/addons/base_module_publish/wizard/wizard_module_export.py index 0c8bf2f0266..64195741759 100644 --- a/addons/base_module_publish/wizard/wizard_module_export.py +++ b/addons/base_module_publish/wizard/wizard_module_export.py @@ -52,7 +52,7 @@ finish_fields = { class move_module_wizard(wizard.interface): def createzip(self, cr, uid, data, context): - return module_zip.createzip(cr, uid, data['id'], context, src=data['form']['include_src']) + return module_zip.createzip(cr, uid, data['id'], context, src=data['form']['include_src']) states = { 'init': { diff --git a/addons/base_report_designer/base_report_designer.py b/addons/base_report_designer/base_report_designer.py index 69d31fda861..bf4c26fd4de 100644 --- a/addons/base_report_designer/base_report_designer.py +++ b/addons/base_report_designer/base_report_designer.py @@ -36,11 +36,11 @@ class report_xml(osv.osv): The use of this function is to get rml file from sxw file. ''' sxwval = StringIO(base64.decodestring(file_sxw)) - fp = tools.file_open('normalized_oo2rml.xsl', - subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + fp = tools.file_open('normalized_odt2rml.xsl', + subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') return {'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read()))} - def upload_report(self, cr, uid, report_id, file_sxw, context): + def upload_report(self, cr, uid, report_id, file_sxw,file_type, context): ''' Untested function ''' @@ -48,9 +48,13 @@ class report_xml(osv.osv): sxwval = StringIO(base64.decodestring(file_sxw)) fp = tools.file_open('normalized_oo2rml.xsl', subdir='addons/base_report_designer/wizard/tiny_sxw2rml') + if file_type=='odt': + fp = tools.file_open('normalized_odt2rml.xsl', + subdir='/home/dsh/my-work/bazaar/odt-sxw2ml') report = pool.get('ir.actions.report.xml').write(cr, uid, [report_id], { 'report_sxw_content': base64.decodestring(file_sxw), - 'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())) + 'report_rml_content': str(sxw2rml(sxwval, xsl=fp.read())), + 'report_type' : file_type }) cr.commit() db = pooler.get_db_only(cr.dbname) @@ -59,6 +63,7 @@ class report_xml(osv.osv): def report_get(self, cr, uid, report_id, context={}): report = self.browse(cr, uid, report_id, context) return { + 'file_type' : report.report_type, 'report_sxw_content': report.report_sxw_content and base64.encodestring(report.report_sxw_content) or False, 'report_rml_content': report.report_rml_content and base64.encodestring(report.report_rml_content) or False } diff --git a/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl b/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl new file mode 100644 index 00000000000..b8c48673753 --- /dev/null +++ b/addons/base_report_designer/wizard/tiny_sxw2rml/normalized_odt2rml.xsl @@ -0,0 +1,681 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ( + + , + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + white + + + + + + + + + + + ......... + + + + + + + + + + + + + 15 + 0 + + + + + + + + + + 6 + + + + + + ZapfDingbats + l + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LEFT + + + CENTER + + + RIGHT + + + JUSTIFY + + + + + + + + + + + + + + + + + + + + + + + + + + + Courier-BoldOblique + + + Courier-Bold + + + Courier-Oblique + + + Courier + + + + + + + Helvetica-BoldOblique + + + Helvetica-Bold + + + Helvetica-Oblique + + + Helvetica + + + + + + + Times-BoldItalic + + + Times-Bold + + + Times-Italic + + + Times-Roman + + + + + + + + Times-Roman + + + + + + +
+ + diff --git a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py index 9bc62ac02c8..0d0ced599cb 100644 --- a/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py +++ b/addons/base_report_designer/wizard/tiny_sxw2rml/tiny_sxw2rml.py @@ -151,6 +151,8 @@ class DomApi(DomApiGeneral): self.buildStylePropertiesDict() if self.styles_dom.getElementsByTagName("style:page-master").__len__()<>0: self.page_master = self.styles_dom.getElementsByTagName("style:page-master")[0] + if self.styles_dom.getElementsByTagName("style:page-layout").__len__()<>0 : + self.page_master = self.styles_dom.getElementsByTagName("style:page-layout")[0] self.document = self.content_dom.getElementsByTagName("office:document-content")[0] def buildStylePropertiesDict(self): @@ -265,7 +267,7 @@ class DomApi(DomApiGeneral): childs = self.style_dict[style_name].childNodes for c in childs: - if c.nodeType == c.ELEMENT_NODE and c.nodeName == "style:properties": + if c.nodeType == c.ELEMENT_NODE and c.nodeName.find("properties")>0 : for attr in c._attrs.keys(): res[attr] = c.getAttribute(attr).encode("latin-1") return res @@ -357,8 +359,12 @@ if __name__ == "__main__": fname = sys.argv[1] f = StringIO.StringIO(file(fname).read()) - - xsl = file(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), 'normalized_oo2rml.xsl')).read() + xsl_file = 'normalized_oo2rml.xsl' + z = zipfile.ZipFile(fname,"r") + mimetype = z.read('mimetype') + if mimetype.split('/')[-1] == 'vnd.oasis.opendocument.text' : + xsl_file = 'normalized_odt2rml.xsl' + xsl = file(os.path.join(os.getcwd(), os.path.dirname(sys.argv[0]), xsl_file)).read() result = sxw2rml(f, xsl, output=opt.output, save_pict=False) print result diff --git a/addons/board_crm_configuration/board_crm_view.xml b/addons/board_crm_configuration/board_crm_view.xml index 6672e13b2b1..2508f15e1ef 100644 --- a/addons/board_crm_configuration/board_crm_view.xml +++ b/addons/board_crm_configuration/board_crm_view.xml @@ -22,7 +22,7 @@ form tree,form - [('section_id', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]
@@ -30,7 +30,7 @@ form tree,form - [('section_id', '=', 'Meetings'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Meetings'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] form
graph,tree,form - [('section_id', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Leads'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]
@@ -53,7 +53,7 @@ form graph,tree,form - [('section_id', '=', 'Opportunities'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name', '=', 'Opportunities'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] @@ -61,7 +61,7 @@ form graph,tree,form - [('section_id','=','Jobs'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] + [('section_id.name','=','Jobs'),('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')] diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 7ba7c6d0337..b1451e7b90a 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -181,6 +181,7 @@ class crm_case_section(osv.osv): 'object': True }) return True + def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] diff --git a/addons/custom/corporate_odt_header.xml b/addons/custom/corporate_odt_header.xml new file mode 100644 index 00000000000..b27eeda8ccb --- /dev/null +++ b/addons/custom/corporate_odt_header.xml @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Tiny sprl + + + + + + + + - + + + + + + Phone : + + + + + + + + Mail : + + + + + + + + + + + + + + + + Contact : Administrator + + + + + + + + \ No newline at end of file diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml index c1d85525b79..42c9fd022ab 100755 --- a/addons/hr/process/hr_process.xml +++ b/addons/hr/process/hr_process.xml @@ -15,15 +15,6 @@ Process Node --> - - - - - - - - - @@ -67,15 +58,6 @@ - - - - - - - - - diff --git a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml index c07d8deffcf..390e572c52b 100755 --- a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml +++ b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml @@ -10,7 +10,7 @@ - + @@ -66,7 +66,7 @@ - + diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index 78aec8304bf..6965274dca1 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -635,7 +635,7 @@ class hr_timesheet_sheet_sheet_account(osv.osv): 'sheet_id': fields.many2one('hr_timesheet_sheet.sheet', 'Sheet', readonly=True), 'total': fields.float('Total Time', digits=(16,2), readonly=True), 'invoice_rate': fields.many2one('hr_timesheet_invoice.factor', 'Invoice rate', readonly=True), - } + } def init(self, cr): cr.execute("""create or replace view hr_timesheet_sheet_sheet_account as ( diff --git a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml index 1f467a1c2e2..a664be5e1ee 100755 --- a/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml +++ b/addons/hr_timesheet_sheet/process/hr_timesheet_sheet_process.xml @@ -41,8 +41,9 @@ - + + @@ -72,7 +73,6 @@ - @@ -129,9 +129,10 @@ - + + @@ -149,7 +150,7 @@ - + @@ -158,7 +159,7 @@ - + diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 5ea266c3a0d..b8cb6a2d3da 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -64,6 +64,8 @@ "mrp_wizard.xml", "mrp_report.xml", "company_view.xml", + "process/stockable_product_process.xml", + "process/service_product_process.xml", "process/procurement_process.xml", ], "active": False, diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 9724c5c28f1..a1c2429f917 100755 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -18,7 +18,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -47,12 +47,13 @@ - + - + + @@ -61,99 +62,22 @@ - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -171,7 +95,7 @@ - + @@ -215,7 +139,7 @@ - + @@ -228,69 +152,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/mrp/process/service_product_process.xml b/addons/mrp/process/service_product_process.xml new file mode 100644 index 00000000000..abaa418331e --- /dev/null +++ b/addons/mrp/process/service_product_process.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/mrp/process/stockable_product_process.xml b/addons/mrp/process/stockable_product_process.xml new file mode 100644 index 00000000000..9c885d51942 --- /dev/null +++ b/addons/mrp/process/stockable_product_process.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/product/__terp__.py b/addons/product/__terp__.py index bbc4d667b75..1742af513ba 100644 --- a/addons/product/__terp__.py +++ b/addons/product/__terp__.py @@ -48,7 +48,8 @@ "update_xml" : [ "security/product_security.xml", "security/ir.model.access.csv", - "product_data.xml","product_report.xml", + "product_data.xml", + "product_report.xml", "product_view.xml", "pricelist_view.xml", "partner_view.xml", "product_wizard.xml", "process/product_process.xml" diff --git a/addons/product/report/product_label.xsl b/addons/product/report/product_label.xsl index f76cea07e94..81d317c0fb7 100644 --- a/addons/product/report/product_label.xsl +++ b/addons/product/report/product_label.xsl @@ -70,7 +70,6 @@ - , diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index 945db0e3498..8dfc3a340d3 100755 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -64,8 +64,8 @@ - - + + diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index d4d44f374e3..7082deef237 100755 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -21,21 +21,22 @@ - - - + + + + - + - + @@ -54,7 +55,6 @@ - @@ -63,39 +63,37 @@ - - - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index dae58ba269a..38a2fce7460 100755 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -14,6 +14,17 @@ + + + + + + + + + + + @@ -31,7 +42,7 @@ - + @@ -41,8 +52,8 @@ - - + + @@ -78,7 +89,7 @@ - + @@ -101,11 +112,23 @@ - + + + + + + + + + + + + + @@ -139,6 +162,15 @@ + + + + + + + + + @@ -205,6 +237,15 @@ + + + + + + + + + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index d371081d2c3..46e13d1d6d2 100755 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -33,6 +33,7 @@ + @@ -42,7 +43,7 @@ - + @@ -53,8 +54,8 @@ - - + + @@ -66,6 +67,7 @@ + diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml index 6ea2f7e3ede..861d21672ac 100755 --- a/addons/sale_crm/process/sale_crm_process.xml +++ b/addons/sale_crm/process/sale_crm_process.xml @@ -22,6 +22,7 @@ + diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index dc09385b09f..1d012329503 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -42,7 +42,6 @@ "report_stock_view.xml", "security/stock_security.xml", "security/ir.model.access.csv", - "process/stock_process.xml" ], "active": False, "installable": True diff --git a/addons/stock/process/stock_process.xml b/addons/stock/process/stock_process.xml deleted file mode 100755 index 8dce029be20..00000000000 --- a/addons/stock/process/stock_process.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file