Showing posts with label OpenERP. Show all posts
Showing posts with label OpenERP. Show all posts

Sunday, 14 February 2016

How to send mail from Any Button in OpenERP/Odoo ?


mail.jpg

OpenERP enables utilizer to send and receive emails when an action is done from OpenERP. We can configure emails to be send when a sale is verify or invoice is paid etc. But to implements these type of functionality, we require to update the functions that is being called from these button actions.

We require to call the send_mail function in these button actions to send mail. OpenERP enables to send mail utilizing “Automated Actions” but we cannot configure it when a button action is done for example when a report is printed from a button action. This requires conversion in code.

We have developed a module in such a way that the utilizer will be able to configure to which button action mail is to be send. Utilizer requires some technical erudition about OpenERP like button denomination, button type etc. Module integrates an incipient menu in location “Settings -> Button Mail Configuration > Button Mail Configuration” where utilizer will be able to configure the button actions.

Wednesday, 20 January 2016

Create many2one and one2many relationship in OpenERP


openerp.jpeg
In OpenERP we can create many2one and one2many relationships between models very easily by creating many2one and one2many fields. You just need to declare a field in _columns and then using this field normally in the rest programming and views as we normally do.
I created a small module to explain called hospital, I have two objects patient and doctor. To establish relationship between these two entities or objects, create doctor_id field in patient model as many2one, and patient_id as one2many in doctor model.
The relationship can be explained as one doctor with many patients and many patients going to a single doctor.
Now create a many2one field as:
in class patient(osv.osv):
  1. 'doctor_id':fields.many2one('doctor','Doctor'),
and in class doctor(osv.osv):
  1. 'patient_id':fields.one2many('patient','doctor_id',),
Basic syntax for declaring a many2one field:
  1. fields.many2one(
  2.       'object.name',
  3.       'field name',
  4.       optional parameters)
where first parameter is the model to which the relation is to be created, and field name is the name for the field.
declaring a one2many field:

To view the full blog about Create many2one and one2many relationship in OpenERP please visit Findnerd.

Monday, 4 January 2016

How to execute command 'lessc' in odoo-9


index.png

If "Could not execute command 'lessc'" Error ocour while installing odoo-9 and the login page will not show clearly.
Then use this six command in terminal and run it one by one
1- sudo apt-get install nodejs
2- sudo apt-get install npm
3- sudo npm install -g less

Here is not the end.. To view the full blog about How to execute command 'lessc' in odoo-9 visit Findnerd.

You can also ask questions over Findnerd such as Android, C, Javascript, Java,iOS developer forum etc and also  have a look for its various replenishing features like Desktop Recording Tool, Project Management Tool etc.