添加功能
This commit is contained in:
@@ -93,12 +93,12 @@
|
||||
name="建设工程"
|
||||
parent="yuthon_property_menu_root"/>
|
||||
<menuitem id="property_construction_unit_menu"
|
||||
sequence="1"
|
||||
sequence="20"
|
||||
name="施工单位"
|
||||
parent="yuthon_property_estate_works_menu"
|
||||
action="view_property_construction_unit_action"/>
|
||||
<menuitem id="property_accounting_unit_menu"
|
||||
sequence="5"
|
||||
sequence="30"
|
||||
name="核算单位"
|
||||
parent="yuthon_property_estate_works_menu"
|
||||
action="view_property_accounting_unit_action"/>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
'views/inherit_yuthon_property_views.xml',
|
||||
'views/property_project_works_viwes.xml',
|
||||
'views/property_sporadic_works_views.xml',
|
||||
'views/property_delegated_agent_views.xml',
|
||||
'wizard/property_contract_wizard.xml',
|
||||
'wizard/choose_contract_wizard_views.xml',
|
||||
'wizard/property_rental_wizard_views.xml',
|
||||
|
||||
@@ -254,4 +254,9 @@
|
||||
<field name="code">property_sporadic_works_code</field>
|
||||
<field name="prefix">LS%(y)s%(month)s%(day)s</field>
|
||||
</record>
|
||||
<record id="property_delegated_agent_sequence" model="ir.sequence">
|
||||
<field name="name">委托代理编号</field>
|
||||
<field name="code">property_delegated_agent_code</field>
|
||||
<field name="prefix">LS%(y)s%(month)s%(day)s</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -39,4 +39,5 @@ from . import property_intention_approval
|
||||
from . import property_transfer_approval
|
||||
from . import inherit_yuthon_property
|
||||
from . import property_sporadic_works
|
||||
from . import property_project_works
|
||||
from . import property_project_works
|
||||
from . import property_delegated_agent
|
||||
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models, fields, api, exceptions, _
|
||||
|
||||
|
||||
class PropertyDelegatedAgent(models.Model):
|
||||
_name = 'property.delegated.agent'
|
||||
_description = '委托代理'
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="名称")
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_delegated_agent_code'))
|
||||
annual = fields.Char(string="年度")
|
||||
contract_date = fields.Date(string="合同有效期")
|
||||
signing_date = fields.Date(string="签订日期")
|
||||
payment_date = fields.Date(string="付款日期")
|
||||
consult_fee = fields.Float(string="咨询费")
|
||||
quotations_list_id = fields.Many2one('ir.attachment', string="报价清单")
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ access_property_subset_contract,property_subset_contract,model_property_subset_c
|
||||
access_property_sporadic_works,property_sporadic_works,model_property_sporadic_works,base.group_user,1,1,1,1
|
||||
access_payment_methods_line,payment.methods.line,model_payment_methods_line,base.group_user,1,1,1,1
|
||||
access_property_project_works,property_project_works,model_property_project_works,base.group_user,1,1,1,1
|
||||
access_property_delegated_agent,property_delegated_agent,model_property_delegated_agent,base.group_user,1,1,1,1
|
||||
|
||||
access_property_contract_line,property_contract_line,model_property_contract_line,base.group_user,1,1,1,1
|
||||
access_choose_property_wizard,choose_property_wizard,model_choose_property_wizard,base.group_user,1,1,1,1
|
||||
|
||||
|
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_property_delegated_agent_tree" model="ir.ui.view">
|
||||
<field name="name">property.delegated.agent.tree</field>
|
||||
<field name="model">property.delegated.agent</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="委托代理">
|
||||
<field name="name"/>
|
||||
<field name="annual"/>
|
||||
<field name="contract_date"/>
|
||||
<field name="payment_date"/>
|
||||
<field name="consult_fee"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_delegated_agent_form" model="ir.ui.view">
|
||||
<field name="name">property.delegated.agent.form</field>
|
||||
<field name="model">property.delegated.agent</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="委托代理">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="code" readonly="1" string="流水号:"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1>
|
||||
<field name="name" required="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="annual"/>
|
||||
<field name="contract_date"/>
|
||||
<field name="signing_date"/>
|
||||
<field name="payment_date"/>
|
||||
<field name="consult_fee"/>
|
||||
<field name="quotations_list_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_property_delegated_agent_action" model="ir.actions.act_window">
|
||||
<field name="name">委托代理</field>
|
||||
<field name="res_model">property.delegated.agent</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -351,18 +351,19 @@
|
||||
action="action_property_meter_water"/>
|
||||
|
||||
<!--建筑工程流程-->
|
||||
<menuitem id="yuthon_property_building_process_menu"
|
||||
sequence="20"
|
||||
name="流程"
|
||||
parent="yuthon_property.yuthon_property_estate_works_menu"/>
|
||||
<menuitem id="property_sporadic_works_menu"
|
||||
sequence="1"
|
||||
name="零星工程"
|
||||
parent="yuthon_property_building_process_menu"
|
||||
parent="yuthon_property.yuthon_property_estate_works_menu"
|
||||
action="view_property_sporadic_works_action"/>
|
||||
<menuitem id="property_project_works_menu"
|
||||
sequence="5"
|
||||
name="项目工程"
|
||||
parent="yuthon_property_building_process_menu"
|
||||
parent="yuthon_property.yuthon_property_estate_works_menu"
|
||||
action="property_project_works_action"/>
|
||||
<menuitem id="property_delegated_agent_menu"
|
||||
sequence="10"
|
||||
name="委托代理"
|
||||
parent="yuthon_property.yuthon_property_estate_works_menu"
|
||||
action="view_property_delegated_agent_action"/>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user