20.01.26
This commit is contained in:
65
modules/purchase_trade/weight_report.py
Normal file
65
modules/purchase_trade/weight_report.py
Normal file
@@ -0,0 +1,65 @@
|
||||
from trytond.model import ModelSQL, ModelView, fields
|
||||
from trytond.pool import Pool
|
||||
import datetime
|
||||
|
||||
class WeightReport(ModelSQL, ModelView):
|
||||
'Weight Report'
|
||||
__name__ = 'weight.report'
|
||||
|
||||
# Identification
|
||||
lab = fields.Char('Laboratory', required=True)
|
||||
|
||||
# Report Information
|
||||
reference = fields.Char('Reference')
|
||||
file_no = fields.Char('File Number')
|
||||
report_date = fields.Date('Report Date')
|
||||
|
||||
# Contract Information
|
||||
contract_no = fields.Char('Contract Number')
|
||||
invoice_no = fields.Char('Invoice Number')
|
||||
lc_no = fields.Char('LC Number')
|
||||
origin = fields.Char('Origin')
|
||||
commodity = fields.Char('Commodity')
|
||||
|
||||
# Parties Information
|
||||
seller = fields.Many2One('party.party','Seller', required=True)
|
||||
buyer = fields.Many2One('party.party','Buyer', required=True)
|
||||
carrier = fields.Many2One('party.party','Carrier')
|
||||
|
||||
# Shipment Information
|
||||
vessel = fields.Many2One('trade.vessel','Vessel')
|
||||
bl_no = fields.Char('B/L Number')
|
||||
bl_date = fields.Date('B/L Date')
|
||||
port_loading = fields.Many2One('stock.location','Port of Loading')
|
||||
port_destination = fields.Many2One('stock.location','Port of Destination')
|
||||
arrival_date = fields.Date('Arrival Date')
|
||||
weighing_place = fields.Char('Weighing Place')
|
||||
weighing_method = fields.Char('Weighing Method')
|
||||
bales = fields.Integer('Number of Bales')
|
||||
|
||||
# Weights Information
|
||||
gross_landed_kg = fields.Numeric('Gross Landed (kg)', digits=(16, 2))
|
||||
tare_kg = fields.Numeric('Tare Weight (kg)', digits=(16, 2))
|
||||
net_landed_kg = fields.Numeric('Net Landed (kg)', digits=(16, 2))
|
||||
invoice_net_kg = fields.Numeric('Invoice Net (kg)', digits=(16, 2))
|
||||
gain_loss_kg = fields.Numeric('Gain/Loss (kg)', digits=(16, 2))
|
||||
gain_loss_percent = fields.Numeric('Gain/Loss (%)', digits=(16, 2))
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._order = [('created_date', 'DESC')]
|
||||
# cls._buttons.update({
|
||||
# 'import_json': {},
|
||||
# 'export_json': {},
|
||||
# })
|
||||
|
||||
# @classmethod
|
||||
# @ModelView.button_action('weight_report.act_import_json')
|
||||
# def import_json(cls, reports):
|
||||
# pass
|
||||
|
||||
# @classmethod
|
||||
# @ModelView.button_action('weight_report.act_export_json')
|
||||
# def export_json(cls, reports):
|
||||
# pass
|
||||
Reference in New Issue
Block a user