title: How can I call a Python script from within OpenERP?
body: <p>In my country every electronic invoice is required by law to include a field called "Control Code".</p>
  
  <p>The control code is computed by a series of calculations and algorithms using the invoice date, the invoice number and a few custom fields.</p>
  
  <p>Right now I already have a Python script that generates the control code, but it is a stand alone script, which requires you to manually insert the variables.</p>
  
  <p>I really would like to use this script inside an OpenERP module. I would like the script to:</p>
  
  <ol>
  <li><p>Validate an Invoice (with all the required fields) </p></li>
  <li><p>Populate the control code field on the invoice with the result of the Python script. </p></li>
  <li><p>Ensure the invoice is validated and the Field Control Code is stored in the invoice.</p></li>
  </ol>