← Back to team overview

openerp-india team mailing list archive

[Bug 1069001] Re: Wrong return string in rml_tag preprocessing

 

Hi Jignesh,

I'm not sure how you checked, but here you go:

Platform Ubuntu 12.04 LTS
Openobject-server 6.0.4 (6.1 shares the same code)
report_designer module installed

1 Open Sales Order - Quotation/Order report through Open/LibreOffice.
2 Scroll to [[ format(o.note or '') ]]
3 Prepend with [[ setTag('para','xpre') ]], resulting in [[ setTag('para','xpre') ]][[ format(o.note or '') ]]
4 Send to server
5 Try to generate a sales order

This is reproducible over all reports I checked, I just stumbled upon this while modifying Sales Order.
Applying the patch solves the problem.
Also note that using the xpre tag this way does not work according to specs, as utils.str2xml() effectively cancels all attempts to embed tags in data.

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

Title:
  Wrong return string in rml_tag preprocessing

Status in OpenERP Server:
  Incomplete

Bug description:
  The code for setTag() handling in preprocess.py returns an invalid
  "empty" clause for further processing, causing parsing errors on later
  code.

  Example:
  [[ setTag('para','xpre') ]][[ variable ]]
  Generates an exception:
    Syntax error: " '' ]][[ variable "

  This is caused by rml_tag returning "[[ '' ]]"

  Converting this "empty" clause to an empty string solves the error.

  Attached a patch to the 6.0 tree.

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


References