09.03.26
This commit is contained in:
@@ -235,11 +235,14 @@ class PurchaseCertificationWeightBasis(ModelSQL,ModelView):
|
||||
__name__ = 'purchase.weight.basis'
|
||||
name = fields.Char("Name")
|
||||
qt_type = fields.Many2One('lot.qt.type',"Associated type to final invoice")
|
||||
description = fields.Char("Description")
|
||||
|
||||
class PurchaseAssociation(ModelSQL,ModelView):
|
||||
"Association"
|
||||
__name__ = 'purchase.association'
|
||||
name = fields.Char("Name")
|
||||
party = fields.Many2One('party.party',"Party")
|
||||
description = fields.Char("Description")
|
||||
|
||||
class PurchaseCrop(ModelSQL,ModelView):
|
||||
"Crop"
|
||||
@@ -283,6 +286,7 @@ class Purchase(metaclass=PoolMeta):
|
||||
operator = fields.Many2One('party.party',"Operator")
|
||||
our_reference = fields.Char("Our Reference")
|
||||
company_visible = fields.Function(fields.Boolean("Visible"),'get_company_info')
|
||||
lc_date = fields.Date("LC date")
|
||||
|
||||
def get_company_info(self,name):
|
||||
return (self.company.party.name == 'MELYA')
|
||||
@@ -530,41 +534,6 @@ class Line(metaclass=PoolMeta):
|
||||
value=attribute.format(value)
|
||||
))
|
||||
return " | ".join(filter(None, values))
|
||||
# attributes = fields.Dict('product.attribute', 'Attributes',
|
||||
# domain=[
|
||||
# ('sets', '=', Eval('product._parent_template', {}).get('attribute_set',
|
||||
# Eval('attribute_set', -1))),
|
||||
# ],
|
||||
# states={
|
||||
# 'readonly': (~Eval('attribute_set')
|
||||
# & ~Eval('product._parent_template', {}).get('attribute_set')),
|
||||
# },
|
||||
# depends={'product.template'},
|
||||
# help="Add attributes to the variant.")
|
||||
|
||||
# attributes_name = fields.Function(fields.Char(
|
||||
# "Attributes Name",
|
||||
# states={
|
||||
# 'invisible': ~Eval('attribute_set'),
|
||||
# }),
|
||||
# 'on_change_with_attributes_name')
|
||||
|
||||
# @fields.depends('product', 'attributes')
|
||||
# def on_change_with_attributes_name(self, name=None):
|
||||
# if not self.product.attribute_set or not self.attributes:
|
||||
# return
|
||||
|
||||
# def key(attribute):
|
||||
# return getattr(attribute, 'sequence', attribute.name)
|
||||
|
||||
# values = []
|
||||
# for attribute in sorted(self.product.attribute_set.attributes, key=key):
|
||||
# if attribute.name in self.attributes:
|
||||
# value = self.attributes[attribute.name]
|
||||
# values.append(gettext('product_attribute.msg_label_value',
|
||||
# label=attribute.string,
|
||||
# value=attribute.format(value)))
|
||||
# return " | ".join(filter(None, values))
|
||||
|
||||
@classmethod
|
||||
def default_price_type(cls):
|
||||
|
||||
Reference in New Issue
Block a user