mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
* stock_account_quant_merge (#199) [ADD] stock_account_quant_merge * OCA Transbot updated translations from Transifex * [9.0][stock_account_quant_merge] Migration to 9.0
20 lines
539 B
Python
20 lines
539 B
Python
# -*- coding: utf-8 -*-
|
|
# © 2016-17 Eficent Business and IT Consulting Services S.L.
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from openerp import api, models
|
|
|
|
|
|
class StockQuant(models.Model):
|
|
_inherit = 'stock.quant'
|
|
|
|
@api.multi
|
|
def _mergeable_domain(self):
|
|
domain = super(StockQuant, self)._mergeable_domain()
|
|
|
|
if self.product_id.cost_method == 'real':
|
|
domain += [('cost', '=', self.cost),
|
|
('in_date', '=', self.in_date)]
|
|
|
|
return domain
|