质量模块和库存扫码
This commit is contained in:
18
stock_barcode/models/stock_location.py
Normal file
18
stock_barcode/models/stock_location.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, api
|
||||
|
||||
|
||||
class Location(models.Model):
|
||||
_inherit = 'stock.location'
|
||||
_barcode_field = 'barcode'
|
||||
|
||||
@api.model
|
||||
def _search(self, args, offset=0, limit=None, order=None, count=False, access_rights_uid=None):
|
||||
args = self.env.company.nomenclature_id._preprocess_gs1_search_args(args, ['location', 'location_dest'])
|
||||
return super()._search(args, offset=offset, limit=limit, order=order, count=count, access_rights_uid=access_rights_uid)
|
||||
|
||||
@api.model
|
||||
def _get_fields_stock_barcode(self):
|
||||
return ['barcode', 'display_name', 'name', 'parent_path', 'usage']
|
||||
Reference in New Issue
Block a user