tag:blogger.com,1999:blog-55782546120209476452024-02-08T17:51:34.453+01:00Exploring OpenERP 5Intermediate level OpenERP 5 customization & development topics:) I'm also following the changes in trunk. Just a few sentences per day as I explore the areas of OpenERP that I didn't know before.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-5578254612020947645.post-79256898923438243822010-11-25T13:34:00.004+01:002010-11-25T13:51:40.184+01:00Asynchronous Messaging with OpenERPWe already have synchronous messaging with XML-RPC. Now a new module is created that provides a framework to make async messaging easy with OpenERP.<br /><br />The module should be used for building integration solutions based on messaging patterns.<br />It provides:<br /> - A framework for sending and receiving STOMP messages.<br /> - A serializator/deserializator that creates and reads an XML representation of any OpenERP object.<br />The module is based on <a href="mailto:cjalmeida@gvmail.br">Cloves J. G. de Almeida</a>'s mbi module, especially the XML serializator.<br /><br />There's also a demo module that has a pre-built interface to sending and receiving messages.<br /><br />I've put the modules async_messaging and async_messaging_demo in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a>.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com4tag:blogger.com,1999:blog-5578254612020947645.post-69521888211135621132010-08-23T16:26:00.002+02:002010-08-23T16:47:43.594+02:00Great improvements in label printingBased on the <a href="http://zikzakmedia.blogspot.com/2010/07/new-module-label.html">work of Zikzakmedia</a>, I extended the label printing capabilities of OpenERP. My goal was to provide quick high-volume product label printing.<br /><br />The following improvements were made:<br />-Better usability like label language selection and default label format for every template.<br />-Refactoring to make it possible to easily add printing engines.<br />-Added a mako-RML engine to the existing mako-XSL:RML engine that has more possibilities in label design and eliminates an extra step that could be source of errors.<br />-Added a mako-SLCS engine to print to Bixolon label printers.<br />-Added an editable grid to fill in with products and label quantities to print plus a button on pickings to automatically fill in this grid from their data.<br /><br />The modules that provide these functionalities: <br />-label: made by <a href="http://www.zikzakmedia.com/">Zikzakmedia</a> in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a>. Provides PDF printing with XSL:RML and RML.<br />-label_product in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a><br />-label_slcs in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a><br />-For label_slcs it is useful to install the printjob module from <a href="https://code.launchpad.net/%7Eopenerp-community/openobject-addons/trunk-addons-community">community addons</a> that could send the generated commands directly to the printer. It's made by <a href="http://www.pegueroles.com">Pegueroles SCP</a> & <a href="http://www.nan-tic.com/">NaN</a>.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com4tag:blogger.com,1999:blog-5578254612020947645.post-46924010557134158782010-08-17T14:02:00.002+02:002010-08-17T14:07:11.015+02:00base_report_unicode v1.2The base_report_unicode module has been updated to support <b>, <i> (bold and italic) tags. OpenERP by default ignores those if used with TrueType fonts. <br />The DejaVu fonts are also updated to the latest versions.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com7tag:blogger.com,1999:blog-5578254612020947645.post-5484858970034316382010-08-16T16:18:00.000+02:002010-08-16T16:19:41.695+02:00Restrict access to moves, pickings and locationsI've just published a new module in <a href="https://code.launchpad.net/%7Eopenerp-community/openobject-addons/trunk-addons-community">community addons</a><br /><br />This module allows filtering of pickings and stock inventories by location. It's useful to restrict stock workers to only see those pickings that are relevant to them.<br /><br />Technically: pickings get their unused location_id, location_dest_id fields redefined to be filled in from their moves' data. Inventories get a location_ids field from their lines' data.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-18879628847041104082010-08-13T12:54:00.003+02:002010-08-30T08:54:41.021+02:00Product related price list itemsI've just published a new module called product_related_pricelis_items in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a><br /><br />A convenience wizard on the product form to show and edit only the price list items that are relevant. This means that you can choose a price list version from the product form and you get an editable grid with only those items that are defined for that product or it's categories (including some parents) or aren't restricted at all.<br /><br />NOTE: Needs the --enable-code-actions parameter for the server.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com4tag:blogger.com,1999:blog-5578254612020947645.post-91142953068789585582010-08-12T13:22:00.001+02:002010-08-13T10:51:10.542+02:00Customer credit limit control moduleI've just published a new module in <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">stable 5.0 extra addons</a><br /><br />The Sale Order confirming button checks if the partner's<br />receivables minus payables plus the order's total<br />exceeds her credit limit.<br />If it does, it doesn't let the user to confirm the order.<br />Managers have an extra button to bypass the check but<br />of course the credit limit itself could be lifted, too.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com2tag:blogger.com,1999:blog-5578254612020947645.post-68908268316370123382010-08-12T12:50:00.004+02:002010-08-13T10:50:50.384+02:00System backup tool for OpenERPI've just published a new module in <a href="https://code.launchpad.net/%7Eopenerp-community/openobject-addons/trunk-addons-community">community addons</a><br /><br />This is a system backup tool that can be run from the OpenERP<br />user interface. It is meant for system administrators.<br />It doesn't do the backup itself but provides a convenient<br />framework to run python backup scripts. There are several<br />example scripts provided that can be run outside OpenERP<br />so they can be easily tested.<br />Backup scripts are called Tasks and they don't do device<br />mounting and unmounting but that's provided by the scripts<br />in the object Target.<br />The result of a backup operation is called a Job. There are<br />tar and rsync kind of jobs supported.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com2tag:blogger.com,1999:blog-5578254612020947645.post-50590311610802230682009-07-14T15:14:00.004+02:002009-11-16T14:32:15.935+01:00Data export to OpenOffice.org CalcIt was already possible to export data from the GTK client to MS Excel in a similar way to the CSV export. I've implemented this export functionality for OpenOffice.org Calc. The code is in this bug report: <a href="https://bugs.launchpad.net/bugs/399278">https://bugs.launchpad.net/bugs/399278</a><br /><br />Update: Tiny refused to include this functionality in the GTK client but the KDE client did it!dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-24773619998858366152009-06-01T15:14:00.004+02:002009-06-01T15:17:09.735+02:00product_price_update v1.05Please note that product_price_update has been moved to extra-addons. This new version doesn't update the product if the newly calculated price == old price.<br />The new behavior is useful for synchronizing applications that check the last write date. Maybe the speed has been improved, too.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-37931150566411972682009-05-26T13:12:00.002+02:002009-05-26T13:15:10.437+02:00For Kubuntu usersHave you ever wondered why some of the labels are left untranslated in the GTK client? Install the language-pack-gnome-YOURLANG-base package...dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-17543187952714405832009-05-14T10:43:00.005+02:002010-06-29T08:10:08.175+02:00base_report_unicode v1.1The base_report_unicode module has been updated to work with the new report engine that's in v5.0 for some weeks now. The module has been moved to trunk-extra-addons from the community-addons.<br /><br />Update: This module is now in the <a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">5.0-extra branch</a>.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com6tag:blogger.com,1999:blog-5578254612020947645.post-59795172942331047452009-04-16T14:26:00.004+02:002009-11-16T14:35:14.758+01:00Running OpenERP on Ubuntu 9.04The OpenERP server has some compatibility problems because it works only with python 2.5 and the deprecated PyXML library. Ubuntu 9.04 has python 2.6 as default and a broken PyXML (python-xml) package. Depedencies on the deprecated PyXML should be removed from OpenERP, anyway. The following instructions require more than basic level linux skills.<br /><ol><li>Solve the python 2.5 problem: Make sure you have python2.5 installed. sudo apt-get install python2.5 Then you have to be sure that the server starts with python2.5, not python (that's the 2.6 version). So if you have an openerp-server script, change the 'exec /usr/bin/python ./openerp-server.py' to 'exec /usr/bin/python2.5 ./openerp-server.py'</li><li>Solve python-xml. A file is missing from the python-xml package, boolean.so .That has to be compiled from source and copied to /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils . The instructions for compiling would be too long to describe here; If you write me here or on the irc channel, I'll send you my already compiled version or describe the necessary steps in detail.</li></ol>p.s. I've just created a <a href="https://blueprints.launchpad.net/openobject-server/+spec/python-2.6-support">blueprint</a> for python 2.6 support.<br /><br />Update: Finally the deprecated libs were removed, the latest bzr 5.0 and trunk work on new Ubuntus.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com11tag:blogger.com,1999:blog-5578254612020947645.post-85548910467400047532009-04-03T13:06:00.004+02:002009-04-03T13:11:54.559+02:00New module: base_report_unicodeThe final solution to the unicode printing problem many times mentioned in this blog! Simply install this module and your reports will have the truetype fonts needed. That's all, no patching, no tinkering with reportlab and the fonts:)<br />I've uploaded this module to the <a href="https://code.launchpad.net/%7Eopenerp-community/openobject-addons/trunk-addons-community">community addons</a> mentioned in the previous post.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com26tag:blogger.com,1999:blog-5578254612020947645.post-8290429810505296812009-04-03T12:41:00.006+02:002009-11-19T15:12:09.038+01:00Where are the modules?Just a reminder how the OpenObject module repositories are set up.<br />There are 3 categories with 3 levels of code quality review requirements:<br /><a href="https://code.launchpad.net/%7Eopenerp/openobject-addons/5.0">The stable 5.0 official addons</a><br /><a href="https://code.launchpad.net/%7Eopenerp/openobject-addons/trunk">The development official addons<br /></a> are the modules bundled with OpenERP and these represent the core functionality. The OpenERP Quality Team is responsible.<br /><a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/stable_5.0-extra-addons">The stable 5.0 extra addons</a><br /><a href="https://code.launchpad.net/%7Eopenerp-commiter/openobject-addons/trunk-extra-addons">The development extra addons</a><br />is a large collection (~300) of modules from many contributors. They are usually of good quality but the strict review process is not needed. Members of the OpenERP Commiters team can upload here. OpenERP Commiters are more experienced users & developers.<br /><a href="https://code.launchpad.net/%7Eopenerp-community/openobject-addons/trunk-addons-community">The community addons</a><br />is a new repository. This is going to be a repository where everyone can upload his/her modules if he wants to make it publicly available. The OpenERP Community team is open to everyone.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com1tag:blogger.com,1999:blog-5578254612020947645.post-58647236293302938122009-04-02T12:51:00.003+02:002009-04-02T16:35:42.619+02:00Easier unicode reportsSome of you might remember the <a href="http://exploringopenerp.blogspot.com/2009/01/unicode-reports-with-reportlab.html">unicode reports problem</a> that was my first post on this blog. Now I made a better solution. This automatically replaces the old fonts' names with the unicode ones in memory. The report files don't have to be modified.<br />The wiki mentioned in the original post has been updated with the new instructions.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-72849805906056209562009-03-02T17:52:00.003+01:002009-03-02T18:02:08.078+01:00New module: product_price_updateI have rewritten the extra-addons/product_listprice_upgrade module, it can be downloaded with 'bzr branch <tt>lp:~gdukai/openobject-addons/product_price_update'.</tt><p> It has several improvements over the original:<br />-Possible to update any price type not just the list price.<br />-Correctly uses recursion and checks to update a price only one time even if parent and child categories are selected.<br />-Rewritten using the new osv_memory objects (the old module used wizard.interface).<br />-Corrects a menu duplication.</p><p>If you don't know what it is for, read <a href="http://exploringopenerp.blogspot.com/2009/03/better-price-control.html">my previous post</a>. This module could also be interesting to see how the old type wizard looks like reimplemented in osv_memory.<br /></p>dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com2tag:blogger.com,1999:blog-5578254612020947645.post-62466101643735929812009-03-02T17:30:00.003+01:002009-03-02T18:04:50.819+01:00Better price controlThe basic setup of OpenERP has a very simple pricelist setup: manually set the list prices of the products and use them for the sales orders. Many companies use a cost price + margin% = list price formula. To work like this, we could easly modify the default public pricelist (sales pricelist) to be based on the cost price and add some percentage to that.<br />But this is usually not enough, for two reasons:<br /><ul><li>The prices calculated by the sales pricelist can only be seen when creating new sales order lines. Nothing updates the list price field on the products.</li><li>The sales prices change with every purchase because it changes the cost price they are based on. Many companies don't want to change prices every hour or so.</li></ul>The solution: use the product_listprice_upgrade module in extra-addons. We need the original public pricelist that is based on the list price. Plus we have to create a new one of the type 'internal' and set it up to be based on the cost price + margin formula. The wizard in the listprice_upgrade module under the Pricelist menu will update the list price for the products we choose. This has to be run every time we decide to have new list prices.<br /><br />p.s. There's a better module than product_listprice_upgrade, <a href="http://exploringopenerp.blogspot.com/2009/03/new-module-productpriceupdate.html">read this post</a>.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-58678599159120353862009-02-23T20:34:00.005+01:002009-02-27T14:38:27.690+01:00The wiki is going to be deletedAs some of us have already noticed, the old wiki links that start with <a href="http://openerp.com/">openerp.com</a> are not valid any more. That's easy to solve, the wiki has moved to <a href="http://openobject.com/wiki">openobject.com/wiki</a>, the links have to be corrected. The more important thing is that the wiki pages are going to be removed, so take a backup now if you need that content! Some of the wiki pages are copied to <a href="http://doc.openerp.com/">doc.openerp.com</a>, some not. It depends on Tiny sprl to decide.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-84341978578080738542009-02-23T20:07:00.003+01:002009-02-27T14:38:13.738+01:00Securing web remote accessToday I had to set up remote access to the test database we are using. Both the GTK client and the Web client can be used over SSL (I didn't try Koo because it's not ported to OpenERP 5 yet). I chose to set up the Web client for two reasons: I've read in some forum posts that it's better for slow connection remote sites and because I needed real security after enabling connections from the wide Internet to my OpenERP server. As the Web client doesn't use SSL on it's own, an Apache server has to be set up with mod_proxy and mod_ssl. A description is<a href="http://doc.openerp.com/install/linux/web/index.html#configure-https"> in the documentiation</a>. That's not enough! With this all the users are exposed to the Internet so I decided to require a certificate login for the browsers. With that only those can access the OpenERP Web client who received a client certificate from me. For this to work, a few more lines are needed in the apache config:<br />In the VirtualHost:<br /><blockquote><br /> SSLCertificateKeyFile path/server.key<br /> SSLCACertificateFile path/ca.crt<br />SSLVerifyClient require<br /> SSLVerifyDepth 10<br /></blockquote><br />And the Proxy section:<br /><blockquote><br /> Order deny,allow<br /> Allow from all<br /> SSLRequireSSL<br /></blockquote><br />Of course, the self-signed certificate authority, the server key and the client keys are all have to be set up correctly, that's a little more difficult...dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com2tag:blogger.com,1999:blog-5578254612020947645.post-74877636603336229202009-02-23T19:45:00.004+01:002009-02-27T14:37:26.360+01:00The new wizards: osv_memoryWith v5 a new wizard solution has appeared in OpenERP, the osv_memory objects. The good thing about them is that they behave like the other osv objects so we don't have to learn new tricks to use them. A good introduction can be found <a href="http://openobject.com/forum/topic8583.html">in this forum topic</a>, in Fabien's post. The bad thing is that they also have some tricks and those are not documented. If you search the forums you'll find mostly questions not answers. In the source code, most of the wizards are still the old wizard.interface type, the new osv_memories are mainly used for module installation configuration dialogs. Despite these problems I'll stay with osv_memory and hopefully I'll never have to learn the old way:)dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-51083562252707482712009-02-18T19:19:00.003+01:002009-02-18T19:28:33.901+01:005.0 branches created todayThis morning the new and long awaited 5.0 branches have appeared on launchpad. But it looks like the addons doesn't have a new branch yet. <a href="https://code.launchpad.net/%7Eopenerp">Take a look!</a> I'm thinking of staying with the trunk, maybe the changes in the next version won't be so radical.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-22214245845748939902009-02-10T21:15:00.004+01:002009-02-27T14:36:19.312+01:00Function calculated fields with stored valuesFunction fields which store the calculations results are important to make function fields fast enough not only with test data but also with bigger databases. In v5 the recalculation of stored functions can be triggered by the changes (write, create) in other objects and that makes them really useful.<br />There's an example in account.invoice where the fields amount_untaxed, amount_tax and amount_total are computed by the same function, _amount_all. An shortened example:<br /><blockquote> 'amount_total': fields.function(_amount_all, method=True, digits=(16,2), string='Total',<br /> store={<br /> 'account.invoice.line': (_get_invoice_line, None, 20),<br /> },),</blockquote>This means that if an account.invoice.line changes, _get_invoice_line is invoked with the line's id. _get_invoice_line has to return an id of the main object, account.invoice. _amount_all will receive that id and compute the value to be stored in the field.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-51991182462958610932009-02-09T20:38:00.003+01:002009-02-27T14:35:59.863+01:00OpenERP vs SQL-LedgerNow that OpenERP 5 is out a new webpage was launched where ERP solutions are compared. This gave me the thought to write about my own experience. As a developer and maintainer of a heavily customized SQL-Ledger/Lx-Office hybrid I can say that a comparison is not really possible. OpenERP is so much better that they are not in the same category... Now I can develop so smart and complex modules that earlier I could only dream about;) And the really strange is that these complex modules start working in a reasonably short time.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-15938844867156104542009-02-03T08:44:00.001+01:002009-02-03T08:46:05.090+01:00A release is comingOpenERP 5.0 seems to be very close. This week only bugfixes and minor improvements were committed in trunk.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0tag:blogger.com,1999:blog-5578254612020947645.post-84358473655881238412009-01-28T12:05:00.003+01:002009-02-27T14:35:06.583+01:00Books and other useful documentationVisit the <a href="http://doc.openerp.com/">OpenObject Documentation</a> site, there you can find the OpenERP books and other valuable documentation. The <a href="http://doc.openerp.com/book/index.html#books-link">OpenERP Book</a> on the main page is the book that we could buy in the webshop extended with two chapters, stock and production management. The whole site is in development, changing rapidly but for us who needed this information yesterday it's already a good solution. The whole thing can be downloaded from <a href="https://code.launchpad.net/%7Eopenerp-community/openobject-doc/features">a launchpad site</a>. The source is in rst format and <a href="http://sphinx.pocoo.org/">Sphinx >0.5</a> can generate html, latex and pdf from it.dukaihttp://www.blogger.com/profile/06166452682317447628noreply@blogger.com0