summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2024-05-21 12:06:46 +0700
committerstephanchrst <stephanchrst@gmail.com>2024-05-21 12:06:46 +0700
commitb6a0434a4ff9fe580469cf79c30816697e36e48e (patch)
tree65a98fec764f9d9eeae9582d0a89abe32fca5441
parentb4448913dc446840c21d2403a58cd7edcc13be4a (diff)
add standalone button for get tracking awb in dunning run
-rwxr-xr-xindoteknik_custom/__manifest__.py1
-rw-r--r--indoteknik_custom/models/ged.py3
-rw-r--r--indoteknik_custom/views/dunning_run_ged.xml19
3 files changed, 23 insertions, 0 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py
index 68695b0e..fa0188e6 100755
--- a/indoteknik_custom/__manifest__.py
+++ b/indoteknik_custom/__manifest__.py
@@ -124,6 +124,7 @@
'views/res_partner_site.xml',
'views/apps_stored.xml',
'views/ged_tracking.xml',
+ 'views/dunning_run_ged.xml',
'report/report.xml',
'report/report_banner_banner.xml',
'report/report_banner_banner2.xml',
diff --git a/indoteknik_custom/models/ged.py b/indoteknik_custom/models/ged.py
index 2de88a8d..e1881c45 100644
--- a/indoteknik_custom/models/ged.py
+++ b/indoteknik_custom/models/ged.py
@@ -280,3 +280,6 @@ class DunningRunGed(models.Model):
dunning.date_terima_tukar_faktur = ged_tracking.delivered_date
dunning.copy_date_faktur()
return
+
+ def get_tracking_history_by_awb(self):
+ self._get_tracking_history(self.resi_tukar_faktur) \ No newline at end of file
diff --git a/indoteknik_custom/views/dunning_run_ged.xml b/indoteknik_custom/views/dunning_run_ged.xml
new file mode 100644
index 00000000..5b8c6a3c
--- /dev/null
+++ b/indoteknik_custom/views/dunning_run_ged.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <data>
+ <record id="ged_tracking_form_inherit" model="ir.ui.view">
+ <field name="name">Dunning Run GED</field>
+ <field name="model">dunning.run</field>
+ <field name="inherit_id" ref="indoteknik_custom.dunning_run_form"/>
+ <field name="arch" type="xml">
+ <field name="is_validated" position="before">
+ <button name="get_tracking_history_by_awb"
+ string="Get Tracking"
+ type="object"
+ class="oe_highlight oe_edit_only"
+ />
+ </field>
+ </field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file