Accept Merge Request #1915: (feature/制造功能优化 -> develop)
Merge Request: 修复模板不能下载问题 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1915?initial=true
This commit is contained in:
@@ -412,7 +412,13 @@ class ImportComplexModelWizard(models.TransientModel):
|
||||
# )
|
||||
|
||||
def download_excel_template(self):
|
||||
excel_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') + '/quality_control/static/src/binary/出厂检验报告上传模版.xlsx'
|
||||
base_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url') + '/quality_control/static/src/binary/出厂检验报告上传模版.xlsx'
|
||||
|
||||
# 只有当原始 URL 使用 http 时才替换为 https
|
||||
if base_url.startswith("http://"):
|
||||
excel_url = base_url.replace("http://", "https://")
|
||||
else:
|
||||
excel_url = base_url
|
||||
value = dict(
|
||||
type='ir.actions.act_url',
|
||||
target='self',
|
||||
|
||||
Reference in New Issue
Block a user