changes
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
# Part of the Fusion Plating product family.
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class FpReceivingLine(models.Model):
|
||||
@@ -31,3 +31,10 @@ class FpReceivingLine(models.Model):
|
||||
string='Condition', default='good',
|
||||
)
|
||||
notes = fields.Text(string='Notes')
|
||||
|
||||
@api.depends('part_number', 'part_catalog_id', 'received_qty', 'expected_qty')
|
||||
def _compute_display_name(self):
|
||||
for rec in self:
|
||||
label = rec.part_number or rec.part_catalog_id.display_name or 'Receiving Line'
|
||||
qty = '%d/%d' % (rec.received_qty or 0, rec.expected_qty or 0)
|
||||
rec.display_name = '%s (%s)' % (label, qty)
|
||||
|
||||
Reference in New Issue
Block a user