This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @api.model | |
| def create(self, vals): | |
| if not self.check_access_rights('create', raise_exception=False): | |
| raise ValidationError(_("Sorry! you don't have the right permission to create this record")) | |
| # user has right permission, continue with operation | |
| return super(Customer, self).create(vals) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| base_url = self.get_base_url() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| self.env['ir.config_parameter'].get_param('web.base_url') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def action_add_bank(self): | |
| action = self.get_formview_action() | |
| action['target'] = 'new' | |
| action['default_bank_reference': self.bank_reference | |
| return action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def action_add_bank(self): | |
| return { | |
| 'name': 'Add New Bank', | |
| 'type': 'ir.actions.act_window', | |
| 'res_model': 'kyc.customer.bank', | |
| 'view_type': 'form', | |
| 'view_mode': 'form', | |
| 'view_id': form_view.id, | |
| 'res_id': self.id, | |
| 'target': 'new', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def action_add_bank(self): | |
| action = self.env.ref("kyc.add_bank_action").read()[0] | |
| action['target'] = 'new' | |
| action['context'] = { | |
| 'default_bank_reference': self.bank_reference | |
| } | |
| return action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select u.*, last_visited | |
| from users u, | |
| lateral( | |
| select concat(date, ' ', time) "last_visited" from site_visits | |
| where user_id = u.id | |
| order by id desc | |
| limit 1 | |
| ) last_visited | |
| where u.email = '[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select *, ( | |
| select concat(date, ' ', time) "last_visited" from site_visits | |
| where user_id = u.id | |
| order by id desc | |
| limit 1 | |
| ) "last_visited" | |
| from users u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name | ip_addresses | ||
|---|---|---|---|
| Cyb Tratton | [email protected] | 144.229.128.12 | |
| Phillie Godfray | [email protected] | 42.37.250.26 | |
| Ringo Bras | [email protected] | 27.78.199.6 | |
| Chrissy Daniells | [email protected] | ||
| Molly Domek | [email protected] |