← Back to team overview

openerp-india team mailing list archive

[Bug 1073455] [NEW] mrp-report "product cost structure" XML conversion

 

Public bug reported:

in module mrp -> product -> report (branch 6.1)
when creating "Product cost structure" report, in a few situations the created XML causes the report-generation to cause traceback. The problem arised specifically when i. e. the company name contains special characters like the ampersand "&".
Method create_rml() expects correct XML and in this case the ampersand in the company name will make the rml-creation fail.
Solution is:
add method to_xml() to the company.name line (near code-line 116)
... this also would apply to all other textual "names" like product name and if someone would really use special chars like the ampersand in UOM the "uom.name" should also be wrapped "to_xml".

In addition the language-translation-method _() should be applied for all instances of names (company, product, uom...)
I have applied these changes to my local branch file "mrp/report/price.py" (working tree) but I am not sure about the process of committing this file... assistance on how to commit properly would be needed for me to share this code.

thank you! ...and hope it helps.

P. S. In summary this issue should then be solved when applied. The
attached file also includes changes I made to the format of the
generated XML. The file should be generally acceptable and as such can
be exchanged for the currently used one in the 6.1-branch (possibly also
in trunk).

** Affects: openobject-addons
     Importance: Undecided
         Status: New


** Tags: mrp report xml

** Attachment added: "file "mrp/report/price.py" applied XML-conversion to all textual entities, translations, xml-format"
   https://bugs.launchpad.net/bugs/1073455/+attachment/3419530/+files/price.py

** Description changed:

- in module mrp -> product (branch 6.1)
+ in module mrp -> product -> report (branch 6.1)
  when creating "Product cost structure" report, in a few situations the created XML causes the report-generation to cause traceback. The problem arised specifically when i. e. the company name contains special characters like the ampersand "&".
  Method create_rml() expects correct XML and in this case the ampersand in the company name will make the rml-creation fail.
  Solution is:
  add method to_xml() to the company.name line (near code-line 116)
  ... this also would apply to all other textual "names" like product name and if someone would really use special chars like the ampersand in UOM the "uom.name" should also be wrapped "to_xml".
  
  In addition the language-translation-method _() should be applied for all instances of names (company, product, uom...)
  I have applied these changes to my local branch file "mrp/report/price.py" (working tree) but I am not sure about the process of committing this file... assistance on how to commit properly would be needed for me to share this code.
  
  thank you! ...and hope it helps.
  
  P. S. In summary this issue should then be solved when applied. The
  attached file also includes changes I made to the format of the
  generated XML. The file should be generally acceptable and as such can
  be exchanged for the currently used one in the 6.1-branch (possibly also
  in trunk).

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1073455

Title:
  mrp-report "product cost structure" XML conversion

Status in OpenERP Addons (modules):
  New

Bug description:
  in module mrp -> product -> report (branch 6.1)
  when creating "Product cost structure" report, in a few situations the created XML causes the report-generation to cause traceback. The problem arised specifically when i. e. the company name contains special characters like the ampersand "&".
  Method create_rml() expects correct XML and in this case the ampersand in the company name will make the rml-creation fail.
  Solution is:
  add method to_xml() to the company.name line (near code-line 116)
  ... this also would apply to all other textual "names" like product name and if someone would really use special chars like the ampersand in UOM the "uom.name" should also be wrapped "to_xml".

  In addition the language-translation-method _() should be applied for all instances of names (company, product, uom...)
  I have applied these changes to my local branch file "mrp/report/price.py" (working tree) but I am not sure about the process of committing this file... assistance on how to commit properly would be needed for me to share this code.

  thank you! ...and hope it helps.

  P. S. In summary this issue should then be solved when applied. The
  attached file also includes changes I made to the format of the
  generated XML. The file should be generally acceptable and as such can
  be exchanged for the currently used one in the 6.1-branch (possibly
  also in trunk).

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1073455/+subscriptions


Follow ups

References