From 93146912c0f157edb4d4f08b4b17871277bb9677 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Tue, 18 Jul 2023 10:51:31 +0700 Subject: Add cron xml airway bill and update model, api --- indoteknik_custom/models/airway_bill.py | 2 +- indoteknik_custom/views/airway_bill.xml | 47 +++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 18 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/airway_bill.py b/indoteknik_custom/models/airway_bill.py index d92b7e5e..7379049f 100644 --- a/indoteknik_custom/models/airway_bill.py +++ b/indoteknik_custom/models/airway_bill.py @@ -41,7 +41,7 @@ class AirwayBill(models.Model): self.ensure_one() return self._json_decode(self.response) - def _update_data_way_bill(self): + def _generate(self): # jne, pos, tiki, wahana, jnt, rpx, sap, sicepat, jet, dse, dan first # 51, 53, 54, 7, 57, 55, 59, 59, 27, 60, 62, 64 current_time = datetime.now() diff --git a/indoteknik_custom/views/airway_bill.xml b/indoteknik_custom/views/airway_bill.xml index 2107bdd7..4f4519db 100644 --- a/indoteknik_custom/views/airway_bill.xml +++ b/indoteknik_custom/views/airway_bill.xml @@ -41,31 +41,31 @@ - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - + + + @@ -82,6 +82,19 @@ tree,form + + Airway Bill: Generate + 1 + days + -1 + + + model._generate() + code + 75 + True + +