mirror of
https://github.com/bringout/oca-ocb-mrp.git
synced 2026-04-24 04:31:59 +02:00
Initial commit: Mrp packages
This commit is contained in:
commit
50d736b3bd
739 changed files with 538193 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class StockQuant(models.Model):
|
||||
_inherit = 'stock.quant'
|
||||
|
||||
is_subcontract = fields.Boolean(store=False, search='_search_is_subcontract')
|
||||
|
||||
def _search_is_subcontract(self, operator, value):
|
||||
if operator not in ['=', '!='] or not isinstance(value, bool):
|
||||
raise UserError(_('Operation not supported'))
|
||||
|
||||
return [('location_id.is_subcontracting_location', operator, value)]
|
||||
Loading…
Add table
Add a link
Reference in a new issue