Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
dd6f7d42
Commit
dd6f7d42
authored
Oct 10, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
py2/py3: unicode() does not exist in Python 3.
parent
a0123318
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
24 additions
and
8 deletions
+24
-8
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_viewAsODT.oot
...ateItem/portal_skins/erp5_invoicing/Invoice_viewAsODT.oot
+1
-0
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SaleInvoiceTransaction_getPrintout.zpt
...ins/erp5_invoicing/SaleInvoiceTransaction_getPrintout.zpt
+1
-0
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_viewAsODT.oot
...eItem/portal_skins/erp5_mrp/ProductionOrder_viewAsODT.oot
+1
-0
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionPackingList_viewAsODT.oot
...portal_skins/erp5_mrp/ProductionPackingList_viewAsODT.oot
+2
-1
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.oot
...kinTemplateItem/portal_skins/erp5_ods_style/form_view.oot
+1
-1
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.oot
...nTemplateItem/portal_skins/erp5_ods_style/report_view.oot
+2
-1
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/AccountingTransactionModule_viewPaySheetTransactionListAsODT.oot
...ingTransactionModule_viewPaySheetTransactionListAsODT.oot
+1
-0
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewAsODT.oot
...rtal_skins/erp5_payroll/PaySheetTransaction_viewAsODT.oot
+1
-0
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/payroll_odt_macro.zpt
...plateItem/portal_skins/erp5_payroll/payroll_odt_macro.zpt
+1
-0
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/payroll_odt_macro.zpt
...m/portal_skins/erp5_payroll_l10n_fr/payroll_odt_macro.zpt
+4
-3
bt5/erp5_printer/SkinTemplateItem/portal_skins/erp5_printer/SaleInvoiceTransaction_getEpsonPrintout.zpt
.../erp5_printer/SaleInvoiceTransaction_getEpsonPrintout.zpt
+1
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_viewAsODT.oot
...nTemplateItem/portal_skins/erp5_trade/Order_viewAsODT.oot
+1
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_viewAsODT.oot
...ateItem/portal_skins/erp5_trade/PackingList_viewAsODT.oot
+1
-0
product/ERP5Type/tests/testDynamicClassGeneration.py
product/ERP5Type/tests/testDynamicClassGeneration.py
+6
-2
No files found.
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/Invoice_viewAsODT.oot
View file @
dd6f7d42
...
...
@@ -4,6 +4,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/TradeModelLine_view/my_quantity/render_pdf;
price_renderer nocall:here/OrderLine_view/my_total_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())"
>
<office:scripts/>
<office:font-face-decls>
<style:font-face
style:name=
"StarSymbol"
svg:font-family=
"StarSymbol"
style:font-charset=
"x-symbol"
/>
...
...
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/SaleInvoiceTransaction_getPrintout.zpt
View file @
dd6f7d42
...
...
@@ -3,6 +3,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_quantity/render_pdf;
price_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_total_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language());"
>
<head>
<meta
charset=
"utf-8"
>
...
...
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_viewAsODT.oot
View file @
dd6f7d42
...
...
@@ -3,6 +3,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/Base_viewMRPFieldLibrary/my_quantity/render_pdf;
price_renderer nocall:here/Base_viewMRPFieldLibrary/my_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())">
<office:scripts/>
<office:font-face-decls>
...
...
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionPackingList_viewAsODT.oot
View file @
dd6f7d42
<office:document-content xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0' xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0' xmlns:number='urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0' xmlns:meta='urn:oasis:names:tc:opendocument:xmlns:meta:1.0' xmlns:tal='http://xml.zope.org/namespaces/tal' xmlns:table='urn:oasis:names:tc:opendocument:xmlns:table:1.0' xmlns:style='urn:oasis:names:tc:opendocument:xmlns:style:1.0' xmlns:script='urn:oasis:names:tc:opendocument:xmlns:script:1.0' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:math='http://www.w3.org/1998/Math/MathML' xmlns:draw='urn:oasis:names:tc:opendocument:xmlns:drawing:1.0' xmlns:form='urn:oasis:names:tc:opendocument:xmlns:form:1.0' xmlns:ooo='http://openoffice.org/2004/office' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:chart='urn:oasis:names:tc:opendocument:xmlns:chart:1.0' xmlns:i18n='http://xml.zope.org/namespaces/i18n' xmlns:dr3d='urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0' xmlns:fo='urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0' xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:dom='http://www.w3.org/2001/xml-events' xmlns:ooow='http://openoffice.org/2004/writer' xmlns:svg='urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0' xmlns:metal='http://xml.zope.org/namespaces/metal' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:oooc='http://openoffice.org/2004/calc' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' office:version='1.0'
tal:define='data_dict here/ProductionPackingList_getODTDataDict'>
tal:define='data_dict here/ProductionPackingList_getODTDataDict;
unicode python: unicode if bytes==str else lambda t, encoding: t;'>
<office:scripts/>
<office:font-face-decls>
<style:font-face svg:font-family='StarSymbol' style:name='StarSymbol' style:font-charset='x-symbol'/>
...
...
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/form_view.oot
View file @
dd6f7d42
<office:document-content xmlns:draw='urn:oasis:names:tc:opendocument:xmlns:drawing:1.0' xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0' xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0' xmlns:ooo='http://openoffice.org/2004/office' xmlns:number='urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:meta='urn:oasis:names:tc:opendocument:xmlns:meta:1.0' xmlns:table='urn:oasis:names:tc:opendocument:xmlns:table:1.0' xmlns:dr3d='urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0' xmlns:fo='urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0' xmlns:style='urn:oasis:names:tc:opendocument:xmlns:style:1.0' xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:form='urn:oasis:names:tc:opendocument:xmlns:form:1.0' xmlns:script='urn:oasis:names:tc:opendocument:xmlns:script:1.0' xmlns:ooow='http://openoffice.org/2004/writer' xmlns:svg='urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0' xmlns:chart='urn:oasis:names:tc:opendocument:xmlns:chart:1.0' xmlns:dom='http://www.w3.org/2001/xml-events' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:oooc='http://openoffice.org/2004/calc' xmlns:math='http://www.w3.org/1998/Math/MathML' xmlns:tal='http://xml.zope.org/namespaces/tal' xmlns:i18n='http://xml.zope.org/namespaces/i18n' xmlns:metal='http://xml.zope.org/namespaces/metal' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' office:version='1.0' tal:define="global frame_width python:25.8; render_prefix render_prefix|nothing" metal:define-macro="master" i18n:domain="erp5_ui">
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>
<office:body>
<office:body
tal:define="unicode python: unicode if bytes==str else lambda t, encoding: t;"
>
<office:spreadsheet>
<table:table table:style-name='ta1' table:print='false' tal:attributes="table:name python: unicode(here.getTitle(), 'utf-8')" i18n:attributes="table:name">
...
...
bt5/erp5_ods_style/SkinTemplateItem/portal_skins/erp5_ods_style/report_view.oot
View file @
dd6f7d42
<office:document-content xmlns:draw='urn:oasis:names:tc:opendocument:xmlns:drawing:1.0' xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0' xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0' xmlns:ooo='http://openoffice.org/2004/office' xmlns:number='urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:meta='urn:oasis:names:tc:opendocument:xmlns:meta:1.0' xmlns:table='urn:oasis:names:tc:opendocument:xmlns:table:1.0' xmlns:dr3d='urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0' xmlns:fo='urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0' xmlns:style='urn:oasis:names:tc:opendocument:xmlns:style:1.0' xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:form='urn:oasis:names:tc:opendocument:xmlns:form:1.0' xmlns:script='urn:oasis:names:tc:opendocument:xmlns:script:1.0' xmlns:ooow='http://openoffice.org/2004/writer' xmlns:svg='urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0' xmlns:chart='urn:oasis:names:tc:opendocument:xmlns:chart:1.0' xmlns:dom='http://www.w3.org/2001/xml-events' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:oooc='http://openoffice.org/2004/calc' xmlns:math='http://www.w3.org/1998/Math/MathML' xmlns:tal='http://xml.zope.org/namespaces/tal' xmlns:i18n='http://xml.zope.org/namespaces/i18n' xmlns:metal='http://xml.zope.org/namespaces/metal' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' office:version='1.0' tal:define="global frame_width python:25.8; global landscape python: int(request.get('landscape', 0) or 0)" metal:define-macro="master" i18n:domain="erp5_ui">
<tal:block metal:use-macro="here/style_macros/macros/style_macro"/>
<office:body>
<office:body
tal:define="unicode python: unicode if bytes==str else lambda t, encoding: t"
>
<office:spreadsheet>
<tal:block tal:define="rendered_report_item_list rendered_report_item_list | python:[];
report_item_list python: rendered_report_item_list or [];
dummy python: request.set('here', here);
unicode python: unicode if bytes==str else lambda t, encoding: t;
global sheet_per_report_section python: request.get('sheet_per_report_section', False); ">
<tal:block tal:condition="not: report_item_list">
<tal:block tal:condition="python: form.meta_type == 'ERP5 Report'">
...
...
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/AccountingTransactionModule_viewPaySheetTransactionListAsODT.oot
View file @
dd6f7d42
<office:document-content xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0' xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0' xmlns:number='urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0' xmlns:meta='urn:oasis:names:tc:opendocument:xmlns:meta:1.0' xmlns:tal='http://xml.zope.org/namespaces/tal' xmlns:table='urn:oasis:names:tc:opendocument:xmlns:table:1.0' xmlns:style='urn:oasis:names:tc:opendocument:xmlns:style:1.0' xmlns:script='urn:oasis:names:tc:opendocument:xmlns:script:1.0' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:math='http://www.w3.org/1998/Math/MathML' xmlns:draw='urn:oasis:names:tc:opendocument:xmlns:drawing:1.0' xmlns:form='urn:oasis:names:tc:opendocument:xmlns:form:1.0' xmlns:ooo='http://openoffice.org/2004/office' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:chart='urn:oasis:names:tc:opendocument:xmlns:chart:1.0' xmlns:i18n='http://xml.zope.org/namespaces/i18n' xmlns:dr3d='urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0' xmlns:fo='urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0' xmlns:xforms='http://www.w3.org/2002/xforms' xmlns:dom='http://www.w3.org/2001/xml-events' xmlns:ooow='http://openoffice.org/2004/writer' xmlns:svg='urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0' xmlns:metal='http://xml.zope.org/namespaces/metal' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:oooc='http://openoffice.org/2004/calc' tal:attributes='dummy python:request.RESPONSE.setHeader("Content-Type", "text/html;; charset=utf-8")' office:version='1.0'
tal:define="quantity_renderer nocall:here/Base_viewFieldLibrary/my_money_quantity/render_pdf;
price_renderer nocall:here/PaySheetTransaction_viewFieldLibrary/my_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())">
<office:scripts/>
<office:font-face-decls>
...
...
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/PaySheetTransaction_viewAsODT.oot
View file @
dd6f7d42
...
...
@@ -4,6 +4,7 @@
quantity_renderer nocall:here/Base_viewFieldLibrary/my_view_mode_money_quantity/render_pdf;
gross_category python:'base_amount/payroll/report/salary/gross';
price_renderer nocall:here/PaySheetTransaction_viewFieldLibrary/my_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())">
<office:scripts/>
<office:font-face-decls>
...
...
bt5/erp5_payroll/SkinTemplateItem/portal_skins/erp5_payroll/payroll_odt_macro.zpt
View file @
dd6f7d42
...
...
@@ -2,6 +2,7 @@
macro is found. It's used to display description field -->
<tal:block
tal:define="unicode python: unicode if bytes==str else lambda t, encoding: t;"
xmlns:draw='urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'
xmlns:office='urn:oasis:names:tc:opendocument:xmlns:office:1.0'
xmlns:text='urn:oasis:names:tc:opendocument:xmlns:text:1.0'
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/payroll_odt_macro.zpt
View file @
dd6f7d42
...
...
@@ -27,9 +27,10 @@
xmlns:metal='http://xml.zope.org/namespaces/metal'>
<tal:block metal:define-macro="other_informations"
tal:define="data_dict here/PaySheetTransaction_getOtherInformationsDataDict;
quantity_renderer nocall:here/Base_viewFieldLibrary/my_view_mode_money_quantity/render_pdf;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language());
hour_renderer nocall:here/AnnotationLine_viewFieldLibrary/my_work_time_annotation_line_quantity/render_pdf;">
quantity_renderer nocall:here/Base_viewFieldLibrary/my_view_mode_money_quantity/render_pdf;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language());
unicode python: unicode if bytes==str else lambda t, encoding: t;
hour_renderer nocall:here/AnnotationLine_viewFieldLibrary/my_work_time_annotation_line_quantity/render_pdf;">
<table:table-row table:style-name='Tableau3.8'>
<table:table-cell table:style-name='Tableau3.A8' office:value-type='string'>
<text:p text:style-name='Table_20_Contents' />
...
...
bt5/erp5_printer/SkinTemplateItem/portal_skins/erp5_printer/SaleInvoiceTransaction_getEpsonPrintout.zpt
View file @
dd6f7d42
...
...
@@ -3,6 +3,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_quantity/render_pdf;
price_renderer nocall:here/Base_viewTradeFieldLibrary/my_view_mode_total_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language());"
>
<head>
<meta
charset=
"utf-8"
>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Order_viewAsODT.oot
View file @
dd6f7d42
...
...
@@ -3,6 +3,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/TradeModelLine_view/my_quantity/render_pdf;
price_renderer nocall:here/OrderLine_view/my_total_price/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())">
<office:scripts/>
<office:font-face-decls>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/PackingList_viewAsODT.oot
View file @
dd6f7d42
...
...
@@ -3,6 +3,7 @@
set_precision python: request.set('precision', here.getQuantityPrecisionFromResource(here.getPriceCurrency()));
quantity_renderer nocall:here/TradeModelLine_view/my_quantity/render_pdf;
date_renderer nocall:here/OrderLine_view/my_start_date/render_pdf;
unicode python: unicode if bytes==str else lambda t, encoding: t;
default_language python:test(request.get('international_form'), 'en', here.Localizer.get_selected_language())">
<office:scripts/>
<office:font-face-decls>
...
...
product/ERP5Type/tests/testDynamicClassGeneration.py
View file @
dd6f7d42
...
...
@@ -1388,10 +1388,14 @@ class TestZodbPropertySheet(ERP5TypeTestCase):
with
self
.
assertRaises
(
TypeError
):
person
.
setSocialTitle
(
social_title_value
)
# Passing a unicode object to a not-Value setter should raise
with
self
.
assertRaises
(
TypeError
):
organisation
=
self
.
portal
.
organisation_module
.
newContent
()
person
.
setSubordination
(
unicode
(
organisation
.
getRelativeUrl
()))
if
six
.
PY2
:
# Passing a unicode object to a not-Value setter should raise
person
.
setSubordination
(
unicode
(
organisation
.
getRelativeUrl
()))
else
:
# Passing a bytes object to a not-Value setter should raise
person
.
setSubordination
(
organisation
.
getRelativeUrl
().
encode
())
from
Products.ERP5Type.Tool.ComponentTool
import
ComponentTool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment