Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

How to use api returns in OpenERP(Odoo)?

Api unity of returned value will return a RecordSet of specified model based on original returned value: In below code i have explain api_returns @api.returns('res.partner') def afun(self): ... return x # a RecordSet Note- And if an old API functi

How to use api.onchange in OpenERP(Odoo)?

Api.onchange will trigger the call to the decorated function if any of the fields specified in the decorator is changed in the form: In below code you can use in your .py file. @api.onchange('fieldx') def do_stuff(self): if self.fieldx == x: self.fi

How to use api.depends in OpenERP(Odoo)?

Api.depends will trigger the call to the decorated function if any of the fields specified in the decorator is altered by ORM or changed in the form: In below code you can use in your .py file. @api.depends('name', 'an_other_field') def afun(self):

How to use greetingswidget in OpenERP/Odoo ?

If you want to use greetingswidget in OpenERP(Odoo) follow the below mentioned code and paste it in your wizard .js file: local.HomePage = instance.Widget.extend({ start: function() { this.$el.append("Hello dear Odoo user!"); va

How to copy image in NSPasteBoard

To copy the image on NSPasteBoard following code can be used: - (IBAction)paste:sender { NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; NSArray *classArray = [NSArray arrayWithObject:[NSImage class]]; NSDiction

How to validate that string is email address or not.

During User registration it is very necessary to check that entered email id is valid or not. To check that following code will help you. - (BOOL)validateEmailWithString:(NSString*)email { NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za

How to pass the method name as argument string

Sometime we don't know name of the method at compile time. So pass the method name as argument and use the following lines of code. NSString *methodname=@"calltest"; SEL aSelector = NSSelectorFromString(methodname); NSInvocation *inv = [NSInvocatio

Delete Directory and Files Recursively Through php Script

Hello all, If you want to delete all directory and files recursively by using php script, for this please follow the below mentioned code. <?php function deleteDirectory($filename) { if(is&#95;dir($filename)) $handle = opendir($filename); i

How to Override Inline CSS Styles

Inline styles have the highest priority of all CSS. In general, I would recommend you avoid using them and place your CSS declarations in external files. However, you may not have that luxury if you are working on a legacy system or do not have direc

How to use another model in your model?

Hi if you want a condition where you want to load another model inside you model. you can do as I code follow App::import('Model', 'MyModel'); $my_model = new MyModel(); Or you can write $this->SomeModel->MyModel if you have already this

1 294 408
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: