sf优化
This commit is contained in:
@@ -16,4 +16,14 @@
|
||||
<attribute name="t-attf-style">#{"background: transparent url('/dashboard') no-repeat scroll center center / cover;" if response_template == 'web.login' or 'auth_signup.signup' else ''}</attribute>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<template id="update_login_layout" name="Update Login Layout" inherit_id="web.login_layout">
|
||||
<xpath expr="//div[@t-if='not disable_footer']" position="replace">
|
||||
<div class="text-center small mt-4 pt-3 border-top" t-if="not disable_footer">
|
||||
<a href="https://www.jikimo.com" target="_blank">Powered by <span>Jikimo</span></a>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
</odoo>
|
||||
@@ -86,7 +86,7 @@ class MachineTool(models.Model):
|
||||
brand_id = fields.Many2one('sf.machine.brand', string='品牌')
|
||||
state = fields.Selection(
|
||||
[("正常", "正常"), ("故障", "故障"), ("不可用", "不可用")],
|
||||
default='正常', string="状态")
|
||||
default='正常', string="机床状态")
|
||||
|
||||
# 一个机床对应一個加工工厂,一个加工工厂对应多个机床
|
||||
factory_id = fields.Many2one('res.partner', string='所属工厂',
|
||||
@@ -95,7 +95,7 @@ class MachineTool(models.Model):
|
||||
supplier_id = fields.Many2one('res.partner', string='制造商',
|
||||
domain="[('is_vendor', '=', True)]")
|
||||
registration_date = fields.Date('注册日期')
|
||||
|
||||
state_zc = fields.Selection([("已注册", "已注册"), ("未注册", "未注册")], string="注册状态", default='未注册')
|
||||
active = fields.Boolean('有效', default=True)
|
||||
|
||||
@api.constrains('rotate_speed')
|
||||
@@ -198,6 +198,7 @@ class MachineTool(models.Model):
|
||||
r = requests.post(strurl, json={}, data={'kw': kw, 'token': token}, headers=headers)
|
||||
ret = r.json()
|
||||
self.code = ret['message']
|
||||
self.state_zc = "已注册"
|
||||
if r == 200:
|
||||
return "机床注册成功"
|
||||
else:
|
||||
|
||||
@@ -347,8 +347,7 @@
|
||||
<field name="name"/>
|
||||
<field name="brand_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="factory_id"/>
|
||||
<field name="registration_date"/>
|
||||
<field name="state_zc"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -365,6 +364,7 @@
|
||||
<group>
|
||||
<field name="MTcode" string="编码"/>
|
||||
|
||||
|
||||
<field name="brand_id"
|
||||
required="1"
|
||||
domain="[('tag_ids', '=', '机床')]"
|
||||
|
||||
Reference in New Issue
Block a user