summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-05-22 02:15:56 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-05-22 02:15:56 +0000
commitad1325d80785f236a32bff2f2645fe8c85c50efb (patch)
tree85d8772e1af6ef37a0bfe3bc19064258b7bea39d
parentf6c324302fb2a6490c9c95836887e2c58d684e86 (diff)
parent4f5594be8d73f88fbb42671525d0d2c6ed977abe (diff)
Merged in production (pull request #143)
Production
-rw-r--r--indoteknik_api/controllers/api_v1/sale_order.py11
-rwxr-xr-xindoteknik_custom/__manifest__.py3
-rwxr-xr-xindoteknik_custom/models/__init__.py2
-rw-r--r--indoteknik_custom/models/dunning_run.py1
-rw-r--r--indoteknik_custom/models/external_api.py21
-rw-r--r--indoteknik_custom/models/ged.py291
-rwxr-xr-xindoteknik_custom/models/product_template.py12
-rwxr-xr-xindoteknik_custom/models/sale_order.py9
-rw-r--r--indoteknik_custom/models/stock_picking.py5
-rwxr-xr-xindoteknik_custom/security/ir.model.access.csv7
-rw-r--r--indoteknik_custom/views/apps_stored.xml45
-rw-r--r--indoteknik_custom/views/dunning_run.xml2
-rw-r--r--indoteknik_custom/views/dunning_run_ged.xml27
-rw-r--r--indoteknik_custom/views/ged_tracking.xml117
14 files changed, 541 insertions, 12 deletions
diff --git a/indoteknik_api/controllers/api_v1/sale_order.py b/indoteknik_api/controllers/api_v1/sale_order.py
index 948ecd03..8d3d0218 100644
--- a/indoteknik_api/controllers/api_v1/sale_order.py
+++ b/indoteknik_api/controllers/api_v1/sale_order.py
@@ -52,7 +52,6 @@ class SaleOrder(controller.Controller):
params = self.get_request_params(kw, {
'partner_id': ['number'],
'name': [],
- 'site': [],
'limit': ['default:0', 'number'],
'offset': ['default:0', 'number'],
'context': []
@@ -81,11 +80,11 @@ class SaleOrder(controller.Controller):
('partner_purchase_order_name', 'ilike', '%' + name + '%')
]
- if params['value']['site']:
- site = params['value']['site'].replace(' ', '%')
- domain += [
- ('partner_id.site_id.name', 'ilike', '%' + site + '%')
- ]
+ # if params['value']['site']:
+ # site = params['value']['site'].replace(' ', '%')
+ # domain += [
+ # ('partner_id.site_id.name', 'ilike', '%' + site + '%')
+ # ]
sale_orders = request.env['sale.order'].search(
domain, offset=offset, limit=limit)
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py
index f1f3f9b6..fa0188e6 100755
--- a/indoteknik_custom/__manifest__.py
+++ b/indoteknik_custom/__manifest__.py
@@ -122,6 +122,9 @@
'views/stock_quant.xml',
'views/purchasing_job_state.xml',
'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/__init__.py b/indoteknik_custom/models/__init__.py
index 160d2af3..33aa0784 100755
--- a/indoteknik_custom/models/__init__.py
+++ b/indoteknik_custom/models/__init__.py
@@ -111,3 +111,5 @@ from . import report_stock_forecasted
from . import web_logging
from . import sales_order_fullfillment
from . import res_partner_site
+from . import external_api
+from . import ged
diff --git a/indoteknik_custom/models/dunning_run.py b/indoteknik_custom/models/dunning_run.py
index abfd68be..4e04c03c 100644
--- a/indoteknik_custom/models/dunning_run.py
+++ b/indoteknik_custom/models/dunning_run.py
@@ -3,6 +3,7 @@ from odoo.exceptions import AccessError, UserError, ValidationError
from datetime import timedelta
import logging
+
_logger = logging.getLogger(__name__)
diff --git a/indoteknik_custom/models/external_api.py b/indoteknik_custom/models/external_api.py
new file mode 100644
index 00000000..ff7281c5
--- /dev/null
+++ b/indoteknik_custom/models/external_api.py
@@ -0,0 +1,21 @@
+from odoo import fields, models, api
+import requests
+import urllib.parse
+from odoo.exceptions import UserError
+import json
+
+
+class AppsStored(models.Model):
+ _name = 'apps.stored'
+
+ app_name = fields.Char(string='App Name')
+ description = fields.Char(string='Description')
+
+
+class TokenStorage(models.Model):
+ # _name = 'token.stored'
+ _inherit = 'token.storage'
+
+ app_id = fields.Many2one('apps.stored', string='App')
+ messages = fields.Char(string='Messages')
+ status = fields.Char(string='Status')
diff --git a/indoteknik_custom/models/ged.py b/indoteknik_custom/models/ged.py
new file mode 100644
index 00000000..a2e8bc3c
--- /dev/null
+++ b/indoteknik_custom/models/ged.py
@@ -0,0 +1,291 @@
+from odoo import models, fields
+from datetime import datetime, timedelta
+import requests
+import urllib.parse
+from odoo.exceptions import UserError
+import json
+
+#dev
+# url_token = 'https://stagging-api.ged.co.id/api/GetToken'
+# url_tracking = 'https://stagging-api.ged.co.id/api/TrackingAwb'
+# username = 'mandiri@gmail.co.id'
+# password = 'nPcWh8Up75ai5CW'
+# x_ged_key = 'Mandiriind'
+# x_ged_password = 'M4ndir1ind0n3si4ap1'
+
+#production
+url_token = 'https://gedapi.ged.co.id/api/GetToken'
+url_tracking = 'https://gedapi.ged.co.id/api/TrackingAwb'
+username = 'stephan@indoteknik.co.id'
+password = 'faCE2HFFKdzhvPW'
+x_ged_key = 'Indoteknikdotcom'
+x_ged_password = 'Ind0t3kn1kdotc0m4p1'
+
+
+class GedTracking(models.Model):
+ _name = 'ged.tracking'
+ _order = 'awb_no desc'
+ _rec_name = 'awb_no'
+
+ status = fields.Char(string='Status')
+ messages = fields.Char(string='Messages')
+ awb_no = fields.Char(string='AWB No')
+ reff_no = fields.Char(string='Reff No')
+ consignee_name = fields.Char(string='Consignee Name')
+ consignee_contact = fields.Char(string='Consignee Contact')
+ consignee_phone = fields.Char(string='Consignee Phone')
+ consignee_address = fields.Char(string='Consignee Address')
+ moda = fields.Char(string='Moda')
+ service = fields.Char(string='Service')
+ package = fields.Char(string='Package')
+ height = fields.Char(string='Height')
+ width = fields.Char(string='Width')
+ length = fields.Char(string='Length')
+ coli = fields.Char(string='Coli')
+ kg = fields.Char(string='KG')
+ origin = fields.Char(string='Origin')
+ destination = fields.Char(string='Destination')
+ receiver_name = fields.Char(string='Receiver Name')
+ receiver_relationship = fields.Char(string='Receiver Relationship')
+ delivered_date = fields.Char(string='Delivered Date')
+ photo_pod = fields.Char(string='Photo POD')
+ photo_signature = fields.Char(string='Photo Signature')
+ photo_location = fields.Char(string='Photo Location')
+ photo_receiver = fields.Char(string='Photo Receiver')
+ last_user_input = fields.Char(string='Last User Input')
+ last_created_at = fields.Char(string='Last Created At')
+ last_location = fields.Char(string='Last Location')
+ last_description = fields.Char(string='Last Description')
+ last_status_detail = fields.Char(string='Last Status Detail')
+ last_status = fields.Char(string='Last Status')
+ tracking_line = fields.One2many('ged.tracking.line', 'ged_tracking_id', string='Tracking Lines', auto_join=True)
+ dunning_id = fields.Many2one('dunning.run', string='Dunning Run')
+
+
+class GedTrackingLine(models.Model):
+ _name = 'ged.tracking.line'
+
+ ged_tracking_id = fields.Many2one('ged.tracking', string='Ged Tracking ID', required=True, ondelete='cascade',
+ index=True, copy=False)
+ user_input = fields.Char(string='User Input')
+ created_at = fields.Char(string='Created At')
+ location = fields.Char(string='Location')
+ description = fields.Char(string='Description')
+ status_detail = fields.Char(string='Status Detail')
+ status = fields.Char(string='Status')
+ receiver_name = fields.Char(string='Receiver Name')
+ receiver_relationship = fields.Char(string='Receiver Relationship')
+ photo_pod = fields.Char(string='Photo POD')
+ photo_signature = fields.Char(string='Photo Signature')
+ photo_location = fields.Char(string='Photo Location')
+ photo_receiver = fields.Char(string='Photo Receiver')
+ gps = fields.Char(string='GPS')
+ dunning_id = fields.Many2one('dunning.run', string='Dunning Run')
+
+
+class GedTrackingLog(models.Model):
+ _name = 'ged.tracking.log'
+
+ responses = fields.Char(string='Responses')
+ body = fields.Char(string='Body')
+
+
+class GedApi(models.Model):
+ _name = 'ged.api'
+
+ def _get_token(self):
+ headers = {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json',
+ }
+ json_data = {
+ 'data': {
+ 'email': username,
+ 'password': password,
+ },
+ }
+ response = requests.post(url_token, headers=headers, json=json_data)
+
+ status = response.json()['status']
+ messages = response.json()['messages']
+ token = response.json()['token']
+ expired = response.json()['expired']
+ date_expired = datetime.strptime(expired, '%y-%m-%d %H:%M:%S')
+ date_expired = date_expired.strftime('%Y-%m-%d %H:%M:%S')
+
+ param = {
+ "status": status,
+ "messages": messages,
+ "access_token": token,
+ "expired_date": date_expired,
+ "app_id": 1,
+ "source": "GED"
+ }
+ self.env['token.storage'].create([param])
+ return token
+
+ def get_tracking_awb(self, dunning_run):
+ # current_time = datetime.now()
+ # current_time = current_time.strftime('%Y-%m-%d %H:%M:%S')
+ # query = [('app_id', '=', 1), ('expired_date', '>', current_time)]
+ # token_data = self.env['token.storage'].search(query, order='expired_date desc', limit=1)
+ # if not token_data:
+ # token_data = self._get_token()
+ # token = token_data
+ # else:
+ # token = token_data.access_token
+
+ token = self._get_token()
+ headers = {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json',
+ 'X-Ged-Key': x_ged_key,
+ 'X-Ged-Password': x_ged_password,
+ 'Authorization': 'Bearer '+token
+ }
+ json_data = {
+ 'data': {
+ 'awb': dunning_run.resi_tukar_faktur
+ }
+ }
+ response = requests.post(url_tracking, headers=headers, json=json_data)
+ log = {
+ 'body': str(json_data),
+ 'responses': str(response.json())
+ }
+ self.env['ged.tracking.log'].create(log)
+
+ info_awb = response.json()['infoawb']
+ last_status = response.json()['laststatus']
+ status = response.json()['status']
+ messages = response.json()['messages']
+ awb_no = info_awb['awb_no']
+ reff_no = info_awb['reff_no']
+ consignee_name = info_awb['consignee_name']
+ consignee_contact = info_awb['consignee_contact']
+ consignee_phone = info_awb['consignee_phone']
+ consignee_address = info_awb['consignee_address']
+ moda = info_awb['moda']
+ service = info_awb['service']
+ package = info_awb['package']
+ height = info_awb['height']
+ width = info_awb['width']
+ length = info_awb['length']
+ coli = info_awb['coli']
+ kg = info_awb['kg']
+ origin = info_awb['origin']
+ destination = info_awb['destination']
+ receiver_name = info_awb['receiver_name']
+ receiver_relationship = info_awb['receiver_relationship']
+ delivered_date = info_awb['delivered_date']
+ photo_pod = info_awb['photo_pod']
+ photo_signature = info_awb['photo_signature']
+ photo_location = info_awb['photo_location']
+ photo_receiver = info_awb['photo_receiver']
+ last_user_input = last_status['user_input']
+ last_created_at = last_status['created_at']
+ last_location = last_status['location']
+ last_description = last_status['description']
+ last_status_detail = last_status['status_detail']
+ header_last_status = last_status['status']
+
+ param_header = {
+ 'status': status,
+ 'messages': messages,
+ 'awb_no': awb_no,
+ 'reff_no': reff_no,
+ 'consignee_name': consignee_name,
+ 'consignee_contact': consignee_contact,
+ 'consignee_phone': consignee_phone,
+ 'consignee_address': consignee_address,
+ 'moda': moda,
+ 'service': service,
+ 'package': package,
+ 'height': height,
+ 'width': width,
+ 'length': length,
+ 'coli': coli,
+ 'kg': kg,
+ 'origin': origin,
+ 'destination': destination,
+ 'receiver_name': receiver_name,
+ 'receiver_relationship': receiver_relationship,
+ 'delivered_date': delivered_date,
+ 'photo_pod': photo_pod,
+ 'photo_signature': photo_signature,
+ 'photo_location': photo_location,
+ 'photo_receiver': photo_receiver,
+ 'last_user_input': last_user_input,
+ 'last_created_at': last_created_at,
+ 'last_location': last_location,
+ 'last_description': last_description,
+ 'last_status_detail': last_status_detail,
+ 'last_status': header_last_status,
+ 'dunning_id': dunning_run.id
+ }
+
+ ged_tracking = self.env['ged.tracking'].create(param_header)
+
+ for line in response.json()['data']:
+ ged_tracking_id = ged_tracking.id
+ user_input = line['user_input']
+ created_at = line['created_at']
+ location = line['location']
+ description = line['description']
+ status_detail = line['status_detail']
+ status = line['status']
+
+ param_line = {
+ 'ged_tracking_id': ged_tracking_id,
+ 'user_input': user_input,
+ 'created_at': created_at,
+ 'location': location,
+ 'description': description,
+ 'status_detail': status_detail,
+ 'status': status,
+ 'dunning_id': dunning_run.id
+ }
+ self.env['ged.tracking.line'].create(param_line)
+
+ return ged_tracking
+
+
+class DunningRunGed(models.Model):
+ _inherit = 'dunning.run'
+
+ last_status_awb = fields.Char(string='Last Status AWB')
+ ged_tracking = fields.One2many('ged.tracking', 'dunning_id', string='GED Tracking', auto_join=True)
+ ged_tracking_line = fields.One2many('ged.tracking.line', 'dunning_id', string='GED Tracking Line', auto_join=True)
+
+ def _get_tracking_history(self, test_awb_number):
+ if test_awb_number > 0:
+ query = [
+ ('last_status_awb', '!=', 'POD Return'),
+ ('resi_tukar_faktur', '=', test_awb_number),
+ ('shipper_faktur_id', '=', 123)
+ ]
+ else:
+ query = [
+ ('last_status_awb', '!=', 'POD Return'),
+ ('resi_tukar_faktur', '!=', False),
+ ('shipper_faktur_id', '=', 123),
+ ('date_terima_tukar_faktur', '=', False)
+ ]
+ dunnings = self.env['dunning.run'].search(query, limit=50)
+
+ for dunning in dunnings:
+ current_tracking = self.env['ged.tracking'].search([('awb_no', '=', dunning.resi_tukar_faktur)], limit=1)
+ if current_tracking:
+ current_tracking.unlink()
+ # else:
+ ged_api = self.env['ged.api']
+ ged_tracking = ged_api.get_tracking_awb(dunning)
+ if ged_tracking:
+ dunning.last_status_awb = ged_tracking.last_status
+ if ged_tracking.last_status == 'POD Return':
+ 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/models/product_template.py b/indoteknik_custom/models/product_template.py
index 8494e18a..97ad07a7 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -350,6 +350,18 @@ class ProductProduct(models.Model):
is_edited = fields.Boolean(string='Is Edited')
qty_sold = fields.Float(string='Sold Quantity', compute='_get_qty_sold')
+ def update_internal_reference_variants(self, limit=100):
+ variants = self.env['product.product'].search([
+ ('default_code', '=', False),
+ ('type', '=', 'product'),
+ ('active', '=', True)
+ ], limit=limit, order='write_date desc')
+ for variant in variants:
+ if not variant.default_code:
+ variant.default_code = 'ITV.'+str(variant.id)
+
+ _logger.info('Updated variant %s' % variant.name)
+
def _get_po_suggest(self, qty_purchase):
if self.qty_available_bandengan < qty_purchase:
return 'harus beli'
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index aa34b0f4..d246f37f 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -20,7 +20,7 @@ class SaleOrder(models.Model):
], string='Approval Status', readonly=True, copy=False, index=True, tracking=3)
carrier_id = fields.Many2one('delivery.carrier', string='Shipping Method', tracking=3)
have_visit_service = fields.Boolean(string='Have Visit Service', compute='_have_visit_service', help='To compute is customer get visit service')
- delivery_amt = fields.Float('Delivery Amt')
+ delivery_amt = fields.Float(string='Delivery Amt', copy=False)
shipping_cost_covered = fields.Selection([
('indoteknik', 'Indoteknik'),
('customer', 'Customer')
@@ -582,7 +582,12 @@ class SaleOrder(models.Model):
if order.amount_untaxed == 0:
order.total_percent_margin = 0
continue
- order.total_percent_margin = round((order.total_margin / order.amount_untaxed) * 100, 2)
+ if order.shipping_cost_covered == 'indoteknik':
+ delivery_amt = order.delivery_amt
+ else:
+ delivery_amt = 0
+ order.total_percent_margin = round((order.total_margin / (order.amount_untaxed-delivery_amt)) * 100, 2)
+ # order.total_percent_margin = round((order.total_margin / (order.amount_untaxed)) * 100, 2)
@api.onchange('sales_tax_id')
def onchange_sales_tax_id(self):
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 22aceaf4..62d86911 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -88,8 +88,9 @@ class StockPicking(models.Model):
@api.onchange('carrier_id')
def constrains_carrier_id(self):
- if not self.env.user.is_logistic_approver:
- raise UserError('Hanya Logistic yang bisa mengubah shipping method')
+ if self.carrier_id:
+ if not self.env.user.is_logistic_approver:
+ raise UserError('Hanya Logistic yang bisa mengubah shipping method')
def do_unreserve(self):
res = super(StockPicking, self).do_unreserve()
diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv
index f03e0118..a5605f3b 100755
--- a/indoteknik_custom/security/ir.model.access.csv
+++ b/indoteknik_custom/security/ir.model.access.csv
@@ -110,4 +110,9 @@ access_cust_commision,access.cust.commision,model_cust_commision,,1,1,1,1
access_report_stock_report_product_product_replenishment,access.report.stock.report_product_product_replenishment,model_report_stock_report_product_product_replenishment,,1,1,1,1
access_sales_order_fullfillment,access.sales.order.fullfillment,model_sales_order_fullfillment,,1,1,1,1
access_purchasing_job_state,access.purchasing.job.state,model_purchasing_job_state,,1,1,1,1
-access_res_partner_site,access.res_partner_site,model_res_partner_site,,1,1,1,1 \ No newline at end of file
+access_res_partner_site,access.res_partner_site,model_res_partner_site,,1,1,1,1
+access_apps_stored,access.apps.stored,model_apps_stored,,1,1,1,1
+access_ged_api,access.ged.api,model_ged_api,,1,1,1,1
+access_ged_tracking,access.ged.tracking,model_ged_tracking,,1,1,1,1
+access_ged_tracking_line,access.ged.tracking.line,model_ged_tracking_line,,1,1,1,1
+access_ged_tracking_log,access.ged.tracking.log,model_ged_tracking_log,,1,1,1,1
diff --git a/indoteknik_custom/views/apps_stored.xml b/indoteknik_custom/views/apps_stored.xml
new file mode 100644
index 00000000..5472dc20
--- /dev/null
+++ b/indoteknik_custom/views/apps_stored.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <record id="apps_stored_tree" model="ir.ui.view">
+ <field name="name">apps.stored.tree</field>
+ <field name="model">apps.stored</field>
+ <field name="arch" type="xml">
+ <tree>
+ <field name="app_name"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="apps_stored_form" model="ir.ui.view">
+ <field name="name">apps.stored.form</field>
+ <field name="model">apps.stored</field>
+ <field name="arch" type="xml">
+ <form>
+ <sheet string="Apps Stored">
+ <div class="oe_button_box" name="button_box"/>
+ <group>
+ <group>
+ <field name="app_name"/>
+ <field name="description"/>
+ </group>
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="apps_stored_action" model="ir.actions.act_window">
+ <field name="name">Apps Stored</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">apps.stored</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem id="menu_apps_stored"
+ name="Apps Stored"
+ action="apps_stored_action"
+ parent="contacts.res_partner_menu_config"
+ sequence="101"
+ />
+
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/dunning_run.xml b/indoteknik_custom/views/dunning_run.xml
index ac080fcf..9994d28d 100644
--- a/indoteknik_custom/views/dunning_run.xml
+++ b/indoteknik_custom/views/dunning_run.xml
@@ -74,7 +74,7 @@
</group>
</group>
<notebook>
- <page string="Invoices">
+ <page id="invoice_tab" string="Invoices">
<field name="dunning_line"/>
</page>
</notebook>
diff --git a/indoteknik_custom/views/dunning_run_ged.xml b/indoteknik_custom/views/dunning_run_ged.xml
new file mode 100644
index 00000000..ecda228d
--- /dev/null
+++ b/indoteknik_custom/views/dunning_run_ged.xml
@@ -0,0 +1,27 @@
+<?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>
+ <page id="invoice_tab" position="after">
+ <page string="Tracking">
+ <field name="ged_tracking"/>
+ </page>
+ <page string="Tracking Line">
+ <field name="ged_tracking_line"/>
+ </page>
+ </page>
+ </field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/indoteknik_custom/views/ged_tracking.xml b/indoteknik_custom/views/ged_tracking.xml
new file mode 100644
index 00000000..850788c3
--- /dev/null
+++ b/indoteknik_custom/views/ged_tracking.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<odoo>
+ <record id="ged_tracking_tree" model="ir.ui.view">
+ <field name="name">ged.tracking.tree</field>
+ <field name="model">ged.tracking</field>
+ <field name="arch" type="xml">
+ <tree create="false" edit="false">
+ <field name="awb_no"/>
+ <field name="consignee_name"/>
+ <field name="consignee_contact"/>
+ <field name="consignee_phone"/>
+ <field name="consignee_address"/>
+ <field name="receiver_name"/>
+ <field name="receiver_relationship"/>
+ <field name="delivered_date"/>
+ <field name="last_description"/>
+ <field name="last_status"/>
+ <field name="last_status_detail"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="ged_tracking_line_tree" model="ir.ui.view">
+ <field name="name">ged.tracking.line.tree</field>
+ <field name="model">ged.tracking.line</field>
+ <field name="arch" type="xml">
+ <tree create="false" edit="false">
+ <field name="user_input"/>
+ <field name="created_at"/>
+ <field name="location"/>
+ <field name="description"/>
+ <field name="status_detail"/>
+ <field name="status"/>
+ <field name="receiver_name"/>
+ <field name="receiver_relationship"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="ged_tracking_form" model="ir.ui.view">
+ <field name="name">ged.tracking.form</field>
+ <field name="model">ged.tracking</field>
+ <field name="arch" type="xml">
+ <form create="false" edit="false">
+ <sheet string="GED Tracking">
+ <div class="oe_button_box" name="button_box"/>
+ <group>
+ <group>
+ <field name="awb_no"/>
+ <field name="reff_no"/>
+ <field name="consignee_name"/>
+ <field name="consignee_contact"/>
+ <field name="consignee_phone"/>
+ <field name="consignee_address"/>
+ <field name="moda"/>
+ <field name="service"/>
+ <field name="package"/>
+ <field name="height"/>
+ <field name="width"/>
+ <field name="length"/>
+ <field name="coli"/>
+ <field name="kg"/>
+ <field name="origin"/>
+ <field name="destination"/>
+ </group>
+ <group>
+ <field name="receiver_name" readonly="1"/>
+ <field name="receiver_relationship"/>
+ <field name="delivered_date"/>
+ <field name="photo_pod"/>
+ <field name="photo_signature"/>
+ <field name="photo_location"/>
+ <field name="photo_receiver"/>
+ <field name="last_user_input"/>
+ <field name="last_location"/>
+ <field name="last_description"/>
+ <field name="last_status_detail"/>
+ <field name="last_status"/>
+ </group>
+ </group>
+ <notebook>
+ <page string="Line">
+ <field name="tracking_line"/>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_ged_tracking_filter" model="ir.ui.view">
+ <field name="name">ged.tracking.list.select</field>
+ <field name="model">ged.tracking</field>
+ <field name="priority" eval="15"/>
+ <field name="arch" type="xml">
+ <search string="Search GED Tracking">
+ <field name="awb_no"/>
+ <field name="consignee_name"/>
+ <field name="consignee_contact"/>
+ </search>
+ </field>
+ </record>
+
+ <record id="ged_tracking_action" model="ir.actions.act_window">
+ <field name="name">GED Tracking</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">ged.tracking</field>
+ <field name="search_view_id" ref="view_ged_tracking_filter"/>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <menuitem id="menu_ged_tracking"
+ name="GED Tracking"
+ action="ged_tracking_action"
+ parent="account.menu_finance_reports"
+ sequence="251"/>
+</odoo> \ No newline at end of file