mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update misc
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
'name': "odooAi Common Util and Tools,欧度智能基础功能及面板",
|
'name': "odooAi Common Util and Tools,欧度智能基础功能及面板",
|
||||||
'version': '24.11.08',
|
'version': '24.11.08',
|
||||||
'author': 'odooai.cn',
|
'author': 'odooai.cn',
|
||||||
'category': 'Base',
|
'category': 'Extra tools',
|
||||||
'website': 'https://www.odooai.cn',
|
'website': 'https://www.odooai.cn',
|
||||||
'live_test_url': 'https://demo.odooapp.cn',
|
'live_test_url': 'https://demo.odooapp.cn',
|
||||||
'license': 'LGPL-3',
|
'license': 'LGPL-3',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class AppController(http.Controller):
|
|||||||
# 返回这个图片的base64编码
|
# 返回这个图片的base64编码
|
||||||
return base64.b64encode(BytesIO(response.content).read())
|
return base64.b64encode(BytesIO(response.content).read())
|
||||||
|
|
||||||
@http.route(['/my/ua', '/wxa/ua', '/web/ua', '/web/ua/show'], auth='public', methods=['GET'])
|
@http.route(['/my/ua'], auth='public', methods=['GET'], sitemap=False)
|
||||||
def app_ua_show(self):
|
def app_ua_show(self):
|
||||||
# https://github.com/selwin/python-user-agents
|
# https://github.com/selwin/python-user-agents
|
||||||
ua_string = request.httprequest.headers.get('User-Agent')
|
ua_string = request.httprequest.headers.get('User-Agent')
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class IrMailServer(models.Model):
|
|||||||
if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1:
|
if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1:
|
||||||
pass
|
pass
|
||||||
elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
||||||
_logger.error(_("=================Email to ignore: %s") % email_to)
|
_logger.warning(_("=================Email to ignore: %s") % email_to)
|
||||||
raise AssertionError(_("Email to ignore: %s") % email_to)
|
raise AssertionError(_("Email to ignore: %s") % email_to)
|
||||||
|
|
||||||
return super(IrMailServer, self).send_email(message, mail_server_id, smtp_server, smtp_port,
|
return super(IrMailServer, self).send_email(message, mail_server_id, smtp_server, smtp_port,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class MailMail(models.Model):
|
|||||||
if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1:
|
if email_to.find('no-reply@odooai.cn') != -1 or email_to.find('postmaster-odoo@odooai.cn') != -1:
|
||||||
pass
|
pass
|
||||||
elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
elif email_to.find('example.com') != -1 or email_to.find('@sunpop.cn') != -1 or email_to.find('@odooapp.cn') != -1:
|
||||||
_logger.error(_("=================Email to ignore: %s") % email_to)
|
_logger.warning(_("=================Email to ignore: %s") % email_to)
|
||||||
self = self - m
|
self = self - m
|
||||||
if not self:
|
if not self:
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -10,10 +10,8 @@
|
|||||||
<xpath expr="//list" position="attributes">
|
<xpath expr="//list" position="attributes">
|
||||||
<attribute name="default_order">code</attribute>
|
<attribute name="default_order">code</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="field[@name='account_type']" position="after">
|
<xpath expr="//field[@name='account_type']" position="after">
|
||||||
<field name="parent_id" optional="show"/>
|
<field name="parent_id" optional="show"/>
|
||||||
<field name="group_id" optional="hide"/>
|
|
||||||
<field name="tag_ids" widget="many2many_tags" optional="show"/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@@ -22,9 +20,8 @@
|
|||||||
<field name="model">account.account</field>
|
<field name="model">account.account</field>
|
||||||
<field name="inherit_id" ref="account.init_accounts_tree"/>
|
<field name="inherit_id" ref="account.init_accounts_tree"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="field[@name='account_type']" position="after">
|
<xpath expr="//field[@name='account_type']" position="after">
|
||||||
<field name="group_id"/>
|
<field name="group_id"/>
|
||||||
<field name="tag_ids" widget="many2many_tags"/>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
Reference in New Issue
Block a user