Multi-Supplier Purchase Requisitions

One problem about existing PR module of OpenERP is that, it is too simple and in most case does not enough for real life business. Standard PR allow user to select only 1 supplier per creation of the purchase quotation.

Ecosoft has developed a new extension to PR module which will make it more flexible and easy to use and is now freely available at (search for purchase_requisition_multi_supplier).

Here is how the standard OpenERP’s PR works,

  1. User fill in PR with required products
  2. Click [Request a Quotation] button and select supplier
  3. Quotation created to this supplier with all product lines from PR
  4. Repeat the steps to create more quotations for other suppliers, add or remove products each time if not exact same products to issue for next supplier



As you can see, this is a bit cumbersome, given that a PR request from 1 user can consist of many product of which might be valid only to some supplier. And that, user might not know that from when they request for products.

To make it more flexible, the new addon allow user (and/or purchase manager) to select multiple suppliers in each line of products, also with the option to group, split, overwrite supplier. Clicking [Request a Quotation] button will create multiple purchase quotations each with valid supplier in one go.

Here is how the Multi-Supplier PR works,

  1. User fill in PR with required products
  2. User / Purchase Manager, who knows supplier to source for product select 1 or multiple suppliers in each product line.
  3. User can first select only the product line to make quotation then click [Request a Quotation], the wizard show options to,
    • Grouping: to group product with same supplier to the same quotation, otherwise will split one by one
    • Overwrite Supplier: to not use the supplier in product line, but rightly select from here (same as standard)
  4. Multiple quotations created to appropriate suppliers with all product lines being specified, in one go!


Schedule Backup and Restore Database with contrab_config

Backup and Restore Database with ease, contrab_config is the new module developed by Ecosoft and is now freely available at (search for contrab_config).

The difference between this schedule backup addons and others is that, this addon will write a crontab scheduler to run at OS level. This can ensure that, no matter OpenERP server is running or not, the backup and restore process still works!


This module do the following,

  1. On scheduled time, backup database <DB>
  2. Restore it as <DB>_TEST
  3. Update company logo in <DB>_TEST with the new image (i.e., with TEST mark)

By default simply install this module and it should work. If you need more configuration, you might need to do more setup.

Note: crontab scheduler will be created only when State = Confirmed and Active = True

Setup Procedure

Menu -> Setting/Technical/Scheduler/Crontab Configuration


  1. Crontab Name – name of crontab
  2. Description – more information
  3. Scheduling – crontab scheduling
    • Minute: 0-59
    • Hour: 0-23
    • Day: 1-31
    • Month: 1-12
    • Weekday: 0-6, where 0 = Sunday
  4. Execute Directory – OpenERP’s root path to be used for log file, Temp File, DB Backup File and etc (depends on type of program)
  5. Command – command to run the program in command line interface pattern, require full path.
  6. Active – when True, will create crontab scheduler in OS. When False will delete it.
  7. Status
    • Draft
    • Confirmed
    • Cancelled
  8. Attach File – Additional files, to be used in process (optional)


Reset Document Sequence for new year

Documents such as invoice, accounting vouchers required number series based on the financial years, it start with 1 every first day of the new fiscal year. For example, 2013, you run to number INV/2013/0986. On the new year, you may want it to reset to INV/2014/0001.

Overview of steps

  1. First, make sure the new Fiscal Year has been created, e.g., FY14
  2. Copy the old sequence to create a new sequence, reset the next number to 1. E.g., copy sequence Sales Journal -> Sales Journal (FY14)
  3. In Fiscal Year tab of original sequence Sales Journal, setup the next year sequence FY to Sales Journal (FY14)

There is a good tutorial here explain how to do it already, this tutorial is pretty much the same, except we want to do many sequence all at once using import file.


  • Lets first export all sequence that we want to reset. Go to Sequences window (Setting > Configuration > Sequences & Identifiers) and make advance filter for,
  • Next Number > 1 and Prefix contains “(year)”
  • Use that exported data to create CSV import file for all sequence FY14. Import this CSV file to Sequences window. Following is the example.
name implementation code number_next padding number_increment prefix
Purchase Journal (FY14) No gap 1 5 1 SINV/%(year)s/
Sales Journal (FY14) No gap 1 5 1 INV/%(year)s/
Sales Refund Journal (FY14) No gap 1 5 1 CN/%(year)s/
  • Create CSV file to setup the next year sequence FY to the original sequences. Import this file to Sequences window. Following is the example,
id name fiscal_ids/fiscalyear_id fiscal_ids/sequence_id
__export__.ir_sequence_36 Purchase Journal 2014 Purchase Journal (FY14)
__export__.ir_sequence_35 Sales Journal 2014 Sales Journal (FY14)
__export__.ir_sequence_37 Sales Refund Journal 2014 Sales Refund Journal (FY14)

You can now check whether the original sequence’s fiscal year tab has point to the new sequence for the new fiscal year. Then try changing the server date and see the effect.


  • OpenERP only allow resetting of Sequence only for document with Journal, i.e., Invoices, Voucher. For non Journal document, like Sales Order there is no context[‘fiscalyear_id’] passed, so it not works.
  • We have make a small module ir_sequence_fy_alldoc, to ensure that if context[‘fiscalyear_id’] is not passed, use today to get the Fiscal Year.