How to hide Edit button based on state in Odoo 10

This can be done by inserting conditional CSS. Frist add a html field with sanitize option set to False: x_css = fields.Html( string='CSS', sanitize=False, compute='_compute_css', store=False, ) Then add a compute method with your own dependances and conditions: # Modify the "depends" @api.depends('state_str_modify_me') def _compute_css(self): for application in self: # Modify below condition if application.state_str_modify_me= … Continue reading How to hide Edit button based on state in Odoo 10

Odoo multiple condition in domain

You should also write like this, <field name="x" attrs="{'readonly': [('participate_process', '=', False), '|', ('state', '=', 'fine'), ('state','!=', 'ok')]}" > it will be converted to like this. Where participate_process = False and (state = 'fine' or state != 'ok') https://stackoverflow.com/questions/45506255/odoo-multiple-condition-in-domain-error/45518277 https://www.surekhatech.com/blog/working-with-domain-and-polish-notations-in-od-1

Menghapus Karakter yang Tidak Diinginkan dari String PHP

Dalam bahasa pemrograman PHP, terdapat fungsi strip_tags() yang bisa digunakan untuk menghilangkan tag dari HTML, XML dan juga PHP. Namun ada kalanya kita membutuhkan fungsi untuk menghilangkan karakter-karakter lain sehingga karakter yang tersisa hanyalah alphabet atau hanya angka. Untuk menghilangkan karakter-karakter yang tidak diinginkan tersebut kita bisa menggunakan regular expression yaitu preg_replace dengan menyesuaikan karakter apa saja yang hendak … Continue reading Menghapus Karakter yang Tidak Diinginkan dari String PHP

How to compress and uncompress files and folders in the Terminal

ZIP – Cross Platform First up is ZIP one of the most commonly used compression techniques used across all platforms To compress zip -r archive_name.zip folder_to_compress To extract unzip archive_name.zip If you want to make a zip without those invisible Mac resource files such as “_MACOSX” or “._Filename” and .ds store files, use the “-X” … Continue reading How to compress and uncompress files and folders in the Terminal

REST API + CODEIGNITER

http://programmerblog.net/create-restful-web-services-in-codeigniter/ https://trinitytuts.com/build-first-web-service-php/ https://belajarphp.net/membuat-rest-api-codeigniter/https://www.codepolitan.com/rest-api-server-sederhana-dengan-codeigniter-58901f324a29fhttp://programmerblog.net/create-restful-web-services-in-codeigniter/https://trinitytuts.com/build-first-web-service-php/http://teknosains.com/i/membuat-simple-web-service-dengan-php-pdo-json