diff --git a/jikimo_frontend/static/src/list/custom_width.js b/jikimo_frontend/static/src/list/custom_width.js index 31fd23ca..785bedb5 100644 --- a/jikimo_frontend/static/src/list/custom_width.js +++ b/jikimo_frontend/static/src/list/custom_width.js @@ -66,8 +66,8 @@ patch(ListRenderer.prototype, 'jikimo_frontend.ListRenderer', { // } // 判断 this.state.columns 是否存在且长度大于零 - if (this.state.columns && this.state.columns.length > 0 && - this.state.columns[0].name === "sequence") { + if (this.state.columns && this.state.columns.length > 0 + && this.state.columns[0].name === "sequence") { widths[1] = { type: "relative", value: 0.1 }; } diff --git a/sf_bf_connect/models/jd_eclp.py b/sf_bf_connect/models/jd_eclp.py index 493e739f..1b3c10ab 100644 --- a/sf_bf_connect/models/jd_eclp.py +++ b/sf_bf_connect/models/jd_eclp.py @@ -40,6 +40,13 @@ class JdEclp(models.Model): # bill = fields.Many2one('ir.attachment', string='物流面单', compute='query_bill_pdf') # bill_show = fields.Binary(string='物流面单展示', readonly=True, related='self.bill.datas') bill_show = fields.Binary(string='物流面单展示', readonly=True) + check_out = fields.Char(string='查询是否为出库单', compute='_check_is_out') + + @api.depends('name') + def _check_is_out(self): + if self.name: + is_check_out = self.name.split('/') + self.check_out = is_check_out[1] @api.depends('carrier_tracking_ref') def query_bill_pdf(self): diff --git a/sf_bf_connect/views/view.xml b/sf_bf_connect/views/view.xml index a8236456..c4f0e446 100644 --- a/sf_bf_connect/views/view.xml +++ b/sf_bf_connect/views/view.xml @@ -1,14 +1,27 @@ + + 增加一个check_out字段 + stock.picking + + + + + + + + 物流 stock.picking - -