域名获取修改

This commit is contained in:
guanhuan
2024-09-29 16:47:35 +08:00
parent 198296f0f8
commit 11100c9260
3 changed files with 6 additions and 9 deletions

View File

@@ -19,9 +19,8 @@ class SFMessagePurchase(models.Model):
return contents
def request_url(self, id):
we_config_info = self.env['we.config'].sudo().search([], limit=1)
redirect_domain = self.env['we.app'].sudo().search([('id', '=', we_config_info.odoo_app_id.id)]).redirect_domain
full_url = 'https://%s/' % redirect_domain
url = self.env['ir.config_parameter'].get_param('web.base.url')
full_url = 'https://%s/' % url
action_id = self.env.ref('purchase.purchase_form_action').id
menu_id = self.env['ir.model.data'].search([('name', '=', 'module_website_payment')]).id
# 查询参数

View File

@@ -52,9 +52,8 @@ class SFMessageStockPicking(models.Model):
return res
def request_url(self):
we_config_info = self.env['we.config'].sudo().search([], limit=1)
redirect_domain = self.env['we.app'].sudo().search([('id', '=', we_config_info.odoo_app_id.id)]).redirect_domain
full_url = 'https://%s/' % redirect_domain
url = self.env['ir.config_parameter'].get_param('web.base.url')
full_url = 'https://%s/' % url
action_id = self.env.ref('stock.stock_picking_type_action').id
menu_id = self.env['ir.model.data'].search([('name', '=', 'module_theme_treehouse')]).id
# 查询参数

View File

@@ -62,9 +62,8 @@ class SFMessageWork(models.Model):
return res
def request_url(self):
we_config_info = self.env['we.config'].sudo().search([], limit=1)
redirect_domain = self.env['we.app'].sudo().search([('id', '=', we_config_info.odoo_app_id.id)]).redirect_domain
full_url = 'https://%s/' % redirect_domain
url = self.env['ir.config_parameter'].get_param('web.base.url')
full_url = 'https://%s/' % url
action_id = self.env.ref('sf_manufacturing.mrp_workorder_action_tablet').id
menu_id = self.env['ir.model.data'].search([('name', '=', 'module_stock_dropshipping')]).id
# 查询参数