@api.one @api.constrains('order_line') def _check_tanggal_rencana(self): query = """ SELECT shl.start_time as tgl_rencana_produksi FROM survey_harian_line shl WHERE shl.survey_id = %s ORDER BY shl.start_time DESC """ self.env.cr.execute(query,(self.id,)) survey_harian_line = self.env.cr.dictfetchall() if survey_harian_line: for s in survey_harian_line: tgl_rencana_produksi = s['tgl_rencana_produksi'] self.tgl_rencana_produksi = tgl_rencana_produksi
Category: Coding
Info Percodingan
Balikan fungsi F1, F2, dll di ubuntu 16.04
Press Fn > Esc / FnLock
Open Chat AI
SQL AI
How to Only Allow Numbers in a Text Box using jQuery
$(document).ready(function () { $('.numberonly').keypress(function (e) { var charCode = (e.which) ? e.which : event.keyCode if (String.fromCharCode(charCode).match(/[^0-9]/g)) return false; }); });
Python Openpyxl
Python Openpyxl Introduction Python provides the Openpyxl module, which is used to deal with Excel files without involving third-party Microsoft application software. By using this module, we can have control over excel without open the application. It is used to perform excel tasks such as read data from excel file, or write data to the excel … Continue reading Python Openpyxl
Export – Import XLSX File in Odoo 10
Import XLSX Files in Odoo Using Openpyxl Technical To import data into Odoo, we need to select the file in .csv or .xlsx format and upload it. To know how to import data into Odoo, check out this blog: How to import data in Odoo In this blog I am going to share a simple way … Continue reading Export – Import XLSX File in Odoo 10
Get All Datetime Part in Python
from datetime import datetime currentSecond= datetime.now().second currentMinute = datetime.now().minute currentHour = datetime.now().hour currentDay = datetime.now().day currentMonth = datetime.now().month currentYear = datetime.now().year ========================================================================= from datetime import datetime current_month = datetime.now().strftime('%m') // 02 //This is 0 padded current_month_text = datetime.now().strftime('%h') // Feb current_month_text = datetime.now().strftime('%B') // February current_day = datetime.now().strftime('%d') // 23 //This is also padded current_day_text … Continue reading Get All Datetime Part in Python
Build a chat app with Laravel
https://pusher.com/tutorials/chat-laravel/ https://appdividend.com/2022/03/01/laravel-vue-chat-application/ https://laracasts.com/discuss/channels/laravel/laravel-real-time-chat-app https://laracasts.com/discuss/channels/general-discussion/is-there-any-live-chat-plugins-for-laravel https://centrifugal.dev/blog/2021/12/14/laravel-multi-room-chat-tutorial https://getstream.io/blog/support-chat-laravel-react-hooks/
Create CSV File from Custom Array using Maatwebsite
https://www.itsolutionstuff.com/post/laravel-create-csv-file-from-custom-array-using-maatwebsiteexample.html https://docs.laravel-excel.com/2.1/export/array.html https://stackoverflow.com/questions/70234881/laravel-export-excel-from-array-return-empty-file https://laraveldaily.com/laravel-excel-3-0-export-custom-array-excel/
