add cenhomes addons
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
||||
@@ -0,0 +1,43 @@
|
||||
from odoo import models
|
||||
|
||||
|
||||
class CustomPartner(models.Model):
|
||||
_inherit = "res.partner"
|
||||
|
||||
def xxxxxx(self):
|
||||
record_url = f"https://cenhomes.vn"
|
||||
client_action = {
|
||||
'name': 'Send zalo ZNS',
|
||||
'view_mode': 'form',
|
||||
'view_id': self.env.ref('custom_sms.custom_sms_form_tiennv').id,
|
||||
'res_model': 'sms.composer',
|
||||
# 'res_id': self.id,
|
||||
# 'views': [(False, "form")],
|
||||
'target': 'new',
|
||||
'type': 'ir.actions.act_window',
|
||||
'context': {
|
||||
'default_res_model': 'res.partner',
|
||||
'default_res_id': self.id,
|
||||
'default_composition_mode': 'comment',
|
||||
'default_number_field_name': 'mobile' if self.mobile else 'phone',
|
||||
}
|
||||
}
|
||||
# type ir.actions.act_window,
|
||||
# target: "new",
|
||||
# name: this.title,
|
||||
# res_model: "sms.composer",
|
||||
# views: [[false, "form"]],
|
||||
# context: {
|
||||
# ...this.user.context,
|
||||
# default_res_model: this.props.record.resModel,
|
||||
# default_res_id: this.props.record.resId,
|
||||
# default_number_field_name: this.props.name,
|
||||
# default_composition_mode: 'comment',
|
||||
return client_action
|
||||
|
||||
|
||||
class SMSComposerCustom(models.TransientModel):
|
||||
_inherit = 'sms.composer'
|
||||
|
||||
def action_send_sms_zns(self):
|
||||
print(11111)
|
||||
Reference in New Issue
Block a user