议题管理
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import notice_category
|
||||
# from . import notice_category
|
||||
from . import issue_library
|
||||
|
||||
@@ -12,16 +12,57 @@ class IssueLibrary(models.Model):
|
||||
name = fields.Char(string='议题事项')
|
||||
issue_id = fields.Many2one('issue.library', string="上级议题", ondelete='cascade')
|
||||
issue_ids = fields.One2many('issue.library', 'issue_id', string='子议题')
|
||||
code = fields.Char(string='编号', required=True, copy=False, default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
code = fields.Char(string='编号', required=True, copy=False,
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('issue_library_code'))
|
||||
statu = fields.Selection([('will', '待上会'), ('done', '已上会'), ('cancel', '已取消')], default='will', string="议题状态")
|
||||
is_party = fields.Boolean(string="党之委会")
|
||||
is_class = fields.Boolean(string="班子会")
|
||||
is_boss = fields.Boolean(string="董事会")
|
||||
is_note = fields.Boolean(string="备案、核准")
|
||||
creart_datetime = fields.Datetime(string="创建时间", default=fields.Datetime.now)
|
||||
first_party = fields.Many2one('res.partner', string='甲方')
|
||||
first_b = fields.Many2one('res.partner', string='乙方')
|
||||
create_performance = fields.Datetime(string='开始履约日期')
|
||||
end_performance = fields.Datetime(string='结束履约日期')
|
||||
urgency = fields.Selection([('ordinary', '普通'),
|
||||
('normal', '一般'),
|
||||
('urgent', '紧急')], string="紧急度")
|
||||
employee_person = fields.Many2one('hr.employee', string="联系人")
|
||||
account = fields.Char(string="账户")
|
||||
bank = fields.Char(string="开户行")
|
||||
contract_amount = fields.Float(string="合同金额")
|
||||
procurement_method = fields.Selection([('Internal_bidding', '内部竞标简易程序'),
|
||||
('web_procurement', '网络采购'),
|
||||
('direct_procurement', '直接委托采购'),
|
||||
('singleness_procurement', '单一来源采购'),
|
||||
('clique_procurement', '集团摇珠采购')], string='采购方式')
|
||||
other_conventions = fields.Text(string='其他约定')
|
||||
payment_methods_ids = fields.One2many('payment.methods', 'issue_library_id', string='关联付款方式')
|
||||
notice_documents_ids = fields.Many2many('documents.document', string="议题管理文件")
|
||||
|
||||
def issue_cancel(self):
|
||||
self.write({"statu": "cancel"})
|
||||
|
||||
def on_meeting(self):
|
||||
self.write({"statu": "done"})
|
||||
|
||||
def all_meting_issue(self):
|
||||
pass
|
||||
|
||||
|
||||
class PaymentMethods(models.Model):
|
||||
_name = "payment.methods"
|
||||
_description = '付款方式'
|
||||
|
||||
money = fields.Float(string="金额")
|
||||
by_stages = fields.Char(string="分期")
|
||||
date = fields.Date(string="日期")
|
||||
has_acceptance_material = fields.Selection([('yes', '是'),
|
||||
('no', '否')], string="是否需要验收材料")
|
||||
main = fields.Text(string="备注")
|
||||
payment_methods = fields.Selection([('cash', '现金'),
|
||||
('to_the_public', '对公'),
|
||||
('wechat', '微信'),
|
||||
('alipay', '支付宝'),
|
||||
], string="支付方式")
|
||||
issue_library_id = fields.Many2one('issue.library', string='关联议题管理')
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_issue_library,issue_library,model_issue_library,base.group_user,1,1,1,1
|
||||
access_payment_methods,payment_methods,model_payment_methods,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -43,15 +43,45 @@
|
||||
<field name="code"/>
|
||||
<field name="issue_id"/>
|
||||
<field name="issue_ids" invisible="1"/>
|
||||
<field name="first_party"/>
|
||||
<field name="first_b"/>
|
||||
<field name="employee_person"/>
|
||||
<field name="contract_amount"/>
|
||||
<field name="procurement_method"/>
|
||||
<field name="urgency"/>
|
||||
<field name="account"/>
|
||||
<field name="bank"/>
|
||||
<field name="other_conventions"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="is_party"/>
|
||||
<field name="is_class"/>
|
||||
<field name="is_boss"/>
|
||||
<field name="is_note"/>
|
||||
<field name="create_performance"/>
|
||||
<field name="end_performance"/>
|
||||
<field name="creart_datetime"/>
|
||||
<field name="notice_documents_ids">
|
||||
<tree>
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string='付款方式'>
|
||||
<field name="payment_methods_ids">
|
||||
<tree editable="bottom">
|
||||
<field name="by_stages"/>
|
||||
<field name="money"/>
|
||||
<field name="date"/>
|
||||
<field name="has_acceptance_material"/>
|
||||
<field name="payment_methods"/>
|
||||
<field name="main"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="o_attachment_preview"/>
|
||||
<div class="oe_chatter">
|
||||
@@ -87,6 +117,14 @@
|
||||
<field name="search_view_id" ref="view_issue_library_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="all_meting_issue" model="ir.actions.server">
|
||||
<field name="name">批量上会</field>
|
||||
<field name="model_id" ref="yuthon_issue.model_issue_library"/>
|
||||
<field name="binding_model_id" ref="yuthon_issue.model_issue_library"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">records.all_meting_issue()</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="tianhe_issue_library_menu_root"
|
||||
name="议题管理"
|
||||
|
||||
Reference in New Issue
Block a user