From 2b2221585383327dfe3f040a841e7bed2301c120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WEB=E8=AE=B8=E4=BD=95=E5=93=B2=5Cxuhez?= Date: Thu, 31 Aug 2023 10:16:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?sf=E5=93=81=E7=89=8C=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E7=9A=84=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_base/static/src/scss/test.scss | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/sf_base/static/src/scss/test.scss b/sf_base/static/src/scss/test.scss index 3868fb09..8495e5cd 100644 --- a/sf_base/static/src/scss/test.scss +++ b/sf_base/static/src/scss/test.scss @@ -121,20 +121,12 @@ td.o_required_modifier { //font-weight: bold; } -.o_list_table th > div > i { - display: none !important; +.text-truncate { + overflow: unset !important; + text-overflow: unset !important; + white-space: unset !important; } -body .o_list_table th:nth-child(4) { - width: 100px !important; +.o_list_renderer .o_list_table tbody > tr > td:not(.o_list_record_selector):not(.o_handle_cell):not(.o_list_button):not(.o_list_record_remove) { + white-space: nowrap !important; } - -//body .o_list_table th:nth-child(5) { -// width: 500px !important; -//} - -.o_list_renderer .o_list_table tbody > tr > td:not(.o_list_record_selector):not(.o_handle_cell):not(.o_list_button):not(.o_list_record_remove).o_list_text { - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} \ No newline at end of file From d07098bae1b7fa4b878a15a97a0e5d871e29dc9e Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Thu, 31 Aug 2023 17:32:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E6=B2=A1=E6=9C=89=E5=9C=A8cloud=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=8A=A8=E6=80=81=E7=9A=84=E5=A4=B9=E5=85=B7=E5=92=8C?= =?UTF-8?q?=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99Bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index 8b95c5af..c29abbf4 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -472,3 +472,22 @@ class ReStockMove(models.Model): item.product_id.write({'register_state': '注册失败'}) except Exception as e: raise UserError("注册刀具到云端失败,请联系管理员!") + + +class ReStockQuant(models.Model): + _inherit = 'stock.quant' + + def action_apply_inventory(self): + inventory_diff_quantity = self.inventory_diff_quantity + super(ReStockQuant, self).action_apply_inventory() + if inventory_diff_quantity >= 1: + stock = self.env['stock.move'].search([('product_id', '=', self.product_id.id), ('is_inventory', '=', True), + ('reference', '=', '更新的产品数量'), ('state', '=', 'done')], + limit=1, order='id desc') + if self.product_id.categ_type == '夹具': + stock._register_fixture() + elif self.product_id.categ_type == '刀具': + stock._register_cutting_tool() + return True + +