main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
3 changed files with 12 additions and 9 deletions
Showing only changes of commit 8881caccd0 - Show all commits

View File

@@ -3226,28 +3226,29 @@ class ContractDetail(ModelView):
category = fields.Integer("Category") category = fields.Integer("Category")
cd = fields.Many2One('contracts.start',"Contracts") cd = fields.Many2One('contracts.start',"Contracts")
party = fields.Many2One('party.party',"Party",domain=[('categories.parent', 'child_of', Eval('category'))],depends=['category']) party = fields.Many2One('party.party',"Party", required=True,domain=[('categories.parent', 'child_of', Eval('category'))],depends=['category'])
currency = fields.Many2One('currency.currency',"Currency") currency = fields.Many2One('currency.currency',"Currency", required=True)
incoterm = fields.Many2One('incoterm.incoterm',"Incoterm") incoterm = fields.Many2One('incoterm.incoterm',"Incoterm", required=True)
quantity = fields.Numeric("Quantity",digits=(1,5)) quantity = fields.Numeric("Quantity",digits=(1,5), required=True)
unit = fields.Many2One('product.uom',"Unit") unit = fields.Many2One('product.uom',"Unit", required=True)
qt_unit = fields.Many2One('product.uom',"Unit") qt_unit = fields.Many2One('product.uom',"Unit")
tol_min = fields.Numeric("Tol - in %") tol_min = fields.Numeric("Tol - in %", required=True)
tol_max = fields.Numeric("Tol + in %") tol_max = fields.Numeric("Tol + in %", required=True)
crop = fields.Many2One('purchase.crop',"Crop") crop = fields.Many2One('purchase.crop',"Crop")
del_period = fields.Many2One('product.month',"Delivery Period") del_period = fields.Many2One('product.month',"Delivery Period")
from_del = fields.Date("From") from_del = fields.Date("From")
to_del = fields.Date("To") to_del = fields.Date("To")
price = fields.Numeric("Price",digits=(1,4),states={'invisible': Eval('price_type') != 'priced'}) price = fields.Numeric("Price", required=True,digits=(1,4),states={'invisible': Eval('price_type') != 'priced'})
price_type = price_type = fields.Selection([ price_type = price_type = fields.Selection([
('cash', 'Cash Price'), ('cash', 'Cash Price'),
('priced', 'Priced'), ('priced', 'Priced'),
('basis', 'Basis'), ('basis', 'Basis'),
], 'Price type') ], 'Price type', required=True)
currency_unit = fields.Selection('get_currency_unit',string="Curr/Unit") currency_unit = fields.Selection('get_currency_unit',string="Curr/Unit")
reference = fields.Char("Reference") reference = fields.Char("Reference")
from_location = fields.Many2One('stock.location',"From location") from_location = fields.Many2One('stock.location',"From location")
to_location = fields.Many2One('stock.location',"To location") to_location = fields.Many2One('stock.location',"To location")
payment_term = fields.Many2One('account.invoice.payment_term',"Payment Term", required=True)
@classmethod @classmethod
def default_category(cls): def default_category(cls):

View File

@@ -53,6 +53,7 @@ class ContractFactory:
contract.crop = c.crop contract.crop = c.crop
contract.tol_min = c.tol_min contract.tol_min = c.tol_min
contract.tol_max = c.tol_max contract.tol_max = c.tol_max
contract.payment_term = c.payment_term
contract.reference = c.reference contract.reference = c.reference
contract.from_location = c.from_location contract.from_location = c.from_location
contract.to_location = c.to_location contract.to_location = c.to_location

View File

@@ -9,6 +9,7 @@
<field name="tol_min"/> <field name="tol_min"/>
<field name="tol_max"/> <field name="tol_max"/>
<field name="price_type"/> <field name="price_type"/>
<field name="payment_term"/>
<field name="incoterm"/> <field name="incoterm"/>
<field name="crop"/> <field name="crop"/>
<field name="del_period"/> <field name="del_period"/>