1、优化货位看板的更换货位功能、添加按编码搜索功能;
This commit is contained in:
@@ -422,6 +422,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
@api.depends('integral_freight_barcode')
|
||||
def _compute_integral_product_id(self):
|
||||
for item in self:
|
||||
if item.integral_freight_barcode:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.integral_freight_barcode)])
|
||||
if location:
|
||||
item.integral_product_id = location.product_id.id
|
||||
@@ -441,6 +442,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
@api.depends('blade_freight_barcode')
|
||||
def _compute_blade_product_id(self):
|
||||
for item in self:
|
||||
if item.integral_freight_barcode:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.blade_freight_barcode)])
|
||||
if location:
|
||||
item.blade_product_id = location.product_id.id
|
||||
@@ -460,6 +462,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
@api.depends('bar_freight_barcode')
|
||||
def _compute_bar_product_id(self):
|
||||
for item in self:
|
||||
if item.integral_freight_barcode:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.bar_freight_barcode)])
|
||||
if location:
|
||||
item.bar_product_id = location.product_id.id
|
||||
@@ -479,6 +482,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
@api.depends('pad_freight_barcode')
|
||||
def _compute_pad_product_id(self):
|
||||
for item in self:
|
||||
if item.integral_freight_barcode:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.pad_freight_barcode)])
|
||||
if location:
|
||||
item.pad_product_id = location.product_id.id
|
||||
@@ -519,6 +523,7 @@ class FunctionalToolAssembly(models.Model):
|
||||
@api.depends('chuck_freight_barcode')
|
||||
def _compute_chuck_product_id(self):
|
||||
for item in self:
|
||||
if item.integral_freight_barcode:
|
||||
location = self.env['sf.shelf.location'].sudo().search([('barcode', '=', item.chuck_freight_barcode)])
|
||||
if location:
|
||||
item.chuck_product_id = location.product_id.id
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
'default_current_barcode':barcode,
|
||||
'default_current_product_id':product_id,
|
||||
}"
|
||||
class="btn-primary"/>
|
||||
class="btn-primary" attrs="{'invisible':[('location_status','!=','占用')]}"/>
|
||||
<field name="location_status" invisible="1"/>
|
||||
<button string="禁用货位" name="action_location_status_disable" type="object"
|
||||
class="oe_highlight"
|
||||
@@ -245,6 +245,7 @@
|
||||
<field name="model">sf.shelf.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="货位">
|
||||
<field name="barcode"/>
|
||||
<searchpanel class="account_root">
|
||||
<!-- <field name="location_type" icon="fa-filter"/> -->
|
||||
<!-- <field name="location_id" select="multi" icon="fa-filter"/> -->
|
||||
|
||||
Reference in New Issue
Block a user