How to upgrade code for Terms and Conditions module from V7 to V8? [+-95% done]
Today I'm in need of the 'Terms and Conditions' module, but sadly this is not supported in Odoo V8.
Due to this reason I have chosen to rewrite the module to make it work in V8. I've managed to update the code to work with V8 but when I add a new file it is not being added to the PDF...
I've updated the code in the file report_sxw.py in the agaplan_terms_and_conditions.py file and this now looks like this:
from openerp.osv import osv
from openerp import pooler
from openerp.report.report_sxw import report_sxw
from openerp.tools.safe_eval import safe_eval
#from tools.safe_eval import safe_eval
from cStringIO import StringIO
from StringIO import StringIO
from pyPdf import PdfFileWriter, PdfFileReader
"agaplan_terms_and_conditions needs pyPdf",
"""To install the module "agaplan_terms_and_conditions" please ask your administrator to install the pyPdf package."""
# We store the original function
openerp_create_single_pdf = report_sxw.create_single_pdf
This is all that had to be upgraded. Can anybody tell me why the files are not added to the PDF? The module is giving no errors and is just running smooth. I can add new terms, save them and everything is fine but it is just not printing the extra pages.
Does anybody have any idea or help? I'm out of ideas.
Edit: After trying out the --debug-level and closefully monitoring the only unusual thing I could find was this:
openerp.addons.base.ir.ir_sequence: ir_sequence.get() and ir_sequence.get_id() are deprecated. Please use ir_sequence.next_by_code() or ir_sequence.next_by_id().
Could this be the problem why it is not modified? I do not know how or where to fix this though..
The updated code, for V8, will be shared with the public and will be sent to Odoo so they hopefully add it to the apps for v8.
With kind regards