Merge pull request #3403 from expsa/applepay_fast_checkout_refactor
[FIX] affiliate_management: access rights
This commit is contained in:
commit
b9290076f0
|
|
@ -27,17 +27,17 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
def _get_program(self):
|
||||
# _logger.info("-----_get_program-----%r-----",self.env['affiliate.program'].search([]))
|
||||
# self.remove_prgm()
|
||||
return self.env['affiliate.program'].search([], limit=1).id
|
||||
return self.env['affiliate.program'].sudo().search([], limit=1).id
|
||||
|
||||
def remove_prgm(self):
|
||||
# _logger.info("----remove_prgm--env['affiliate.program']------%r-----",self.env['affiliate.program'].search([]))
|
||||
prgm = self.env['affiliate.program'].search([])
|
||||
prgm = self.env['affiliate.program'].sudo().search([])
|
||||
for p in prgm:
|
||||
p.unlink()
|
||||
|
||||
@api.model
|
||||
def _get_banner(self):
|
||||
return self.env['affiliate.banner'].search([], limit=1).id
|
||||
return self.env['affiliate.banner'].sudo().search([], limit=1).id
|
||||
|
||||
affiliate_program_id = fields.Many2one('affiliate.program', string=" Affiliate Program")
|
||||
enable_ppc = fields.Boolean(string="Enable PPC", default=True)
|
||||
|
|
@ -136,7 +136,7 @@ class AffiliateConfiguration(models.TransientModel):
|
|||
def website_constant(self):
|
||||
res = {}
|
||||
IrDefault = self.env['ir.default'].sudo()
|
||||
aff_prgmObj = self.env['affiliate.program'].search([], limit=1)
|
||||
aff_prgmObj = self.env['affiliate.program'].sudo().search([], limit=1)
|
||||
res.update(
|
||||
work_title=aff_prgmObj.work_title or "The process is very simple. Simply, signup/login to your affiliate portal, pick your affiliate link and place them into your website/blogs and watch your account balance grow as your visitors become our customers, as :",
|
||||
work_text=aff_prgmObj.work_text or "<ol><li><p style='text-align: left; margin-left: 3em;'>Visitor clicks on affiliate links posted on your website/blogs.</p></li><li><p style='text-align: left; margin-left: 3em;'>A cookie is placed in their browser for tracking purposes.</p></li><li><p style='text-align: left; margin-left: 3em;'>The visitor browses our site and may decide to order. </p></li><li><p style='text-align: left; margin-left: 3em;'>If the visitor orders, the order will be registered as a sale for you and you will receive a commission for this sale.</p></li></ol>",
|
||||
|
|
|
|||
Loading…
Reference in New Issue