From f318dc758bdf66e215c1ad3181e4eff0c3650069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E5=B0=A7?= Date: Mon, 25 Nov 2024 17:18:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=9D=AF=E6=96=99=E9=87=87?= =?UTF-8?q?=E8=B4=AD=E5=8D=95=E6=A0=B9=E6=8D=AE=E9=87=87=E8=B4=AD=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 5 ----- sf_sale/models/__init__.py | 1 + sf_sale/models/stock_move.py | 9 +++++++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 sf_sale/models/stock_move.py diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 8b80e1e7..42141da9 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -981,11 +981,6 @@ class ReStockMove(models.Model): res['retrospect_ref'] = production.product_id.name return res - def _single_manufactuing_mo_generate_origin(self, res): - """ - 单个制造订单的完成move单据修改来源为该制造订单关联的销售订单下所有成品相同的制造订单 - """ - class ReStockQuant(models.Model): _inherit = 'stock.quant' diff --git a/sf_sale/models/__init__.py b/sf_sale/models/__init__.py index 97400237..30552565 100644 --- a/sf_sale/models/__init__.py +++ b/sf_sale/models/__init__.py @@ -4,4 +4,5 @@ from . import quick_easy_order_old from . import auto_quatotion_common from . import parser_and_calculate_work_time from . import preload_datas_functions +from . import stock_move diff --git a/sf_sale/models/stock_move.py b/sf_sale/models/stock_move.py new file mode 100644 index 00000000..de522509 --- /dev/null +++ b/sf_sale/models/stock_move.py @@ -0,0 +1,9 @@ +from odoo import models, fields, api + +class StockMove(models.Model): + _inherit = 'stock.move' + + @api.model + def _prepare_merge_negative_moves_excluded_distinct_fields(self): + excluded_fields = super()._prepare_merge_negative_moves_excluded_distinct_fields() + ['pruchase_type'] + return excluded_fields \ No newline at end of file