@@ -198,7 +198,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="其他">
|
||||
<page string="请假情况">
|
||||
<field name="other_fee_ids" context="{'default_employee_id': employee_id}">
|
||||
<tree editable="bottom" delete="false" decoration-muted="is_void">
|
||||
<field name="employee_id" column_invisible="1"/>
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
'wizard/binding_information_wizard_views.xml',
|
||||
'wizard/property_rental_wizard_views.xml',
|
||||
'wizard/contract_signature_wizard_viwes.xml',
|
||||
'wizard/build_pop_wizard_viwes.xml',
|
||||
'wizard/property_meeting_wizard_views.xml',
|
||||
'views/property_menu_all.xml',
|
||||
],
|
||||
|
||||
@@ -16,6 +16,7 @@ class PropertyAccountingApproval(models.Model):
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
|
||||
company_a_id = fields.Many2one('yuthon.property.company', string="甲方")
|
||||
reason = fields.Text(string="正文")
|
||||
budget_list_id = fields.Many2one('ir.attachment', string="预算清单")
|
||||
project_content = fields.Char(string="工程内容")
|
||||
image = fields.Binary(string="维修前图片")
|
||||
@@ -24,6 +25,8 @@ class PropertyAccountingApproval(models.Model):
|
||||
contract_amount = fields.Float(string="合同金额")
|
||||
start_date = fields.Date(string="开始日期")
|
||||
end_date = fields.Date(string="结束日期")
|
||||
business_type = fields.Char(string="业务类型")
|
||||
payment_methods = fields.Selection([('onetime', '一次性'), ('installment', '分期')], string="付款方式")
|
||||
contract_id = fields.Many2one('ir.attachment', string="合同")
|
||||
accounting_way_ids = fields.One2many('accounting.way.line', 'accounting_id', string="关联支付方式明细行")
|
||||
lease_ids = fields.One2many('property.lease.contract.line', 'accounting_id', string="物业信息明细")
|
||||
@@ -38,6 +41,18 @@ class PropertyAccountingApproval(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
def build_pop(self):
|
||||
return {
|
||||
'name': '添加物业',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'build.pop.wizard',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_accounting_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AccountingWayLine(models.Model):
|
||||
_name = 'accounting.way.line'
|
||||
|
||||
@@ -13,9 +13,9 @@ class PropertyConstructionApproval(models.Model):
|
||||
name = fields.Char(string='标题')
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('property_construction_approval_code'))
|
||||
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="部门")
|
||||
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
|
||||
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门")
|
||||
company_id = fields.Many2one(related='user_id.employee_id.company_id', string="公司")
|
||||
company_a_id = fields.Many2one('yuthon.property.company', string="甲方")
|
||||
project_content = fields.Char(string="工程内容")
|
||||
company_b_id = fields.Many2one('property.construction.unit', string="乙方")
|
||||
@@ -42,6 +42,17 @@ class PropertyConstructionApproval(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
def build_pop(self):
|
||||
return {
|
||||
'name': '添加物业',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'build.pop.wizard',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_construction_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
class ConstructionWayLine(models.Model):
|
||||
_name = 'construction.way.line'
|
||||
|
||||
@@ -10,10 +10,10 @@ class PropertyDelegatedAgent(models.Model):
|
||||
_inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin']
|
||||
|
||||
name = fields.Char(string="合同编号")
|
||||
department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门")
|
||||
department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门")
|
||||
code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_delegated_agent_code'))
|
||||
users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
company_id = fields.Many2one(related='users_id.employee_id.company_id', string="公司")
|
||||
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id)
|
||||
company_id = fields.Many2one(related='user_id.employee_id.company_id', string="公司")
|
||||
company_a_id = fields.Many2one('yuthon.property.company', string="甲方")
|
||||
company_b_id = fields.Many2one('property.construction.unit', string="乙方")
|
||||
matters = fields.Text(string="事项")
|
||||
|
||||
@@ -39,6 +39,18 @@ class PropertyDesignApproval(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
def build_pop(self):
|
||||
return {
|
||||
'name': '添加物业',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'build.pop.wizard',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_design_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class DesignWayLine(models.Model):
|
||||
_name = 'design.way.line'
|
||||
|
||||
@@ -28,4 +28,16 @@ class PropertyProjectApproval(models.Model):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
def build_pop(self):
|
||||
return {
|
||||
'name': '添加物业',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'build.pop.wizard',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_project_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,18 @@ class PropertySupervisingApproval(models.Model):
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
def build_pop(self):
|
||||
return {
|
||||
'name': '添加物业',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'build.pop.wizard',
|
||||
'view_mode': 'form',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_supervising_id': self.id,
|
||||
}
|
||||
}
|
||||
|
||||
class SupervisingWayLine(models.Model):
|
||||
_name = 'supervising.way.line'
|
||||
_description = '施工支付方式'
|
||||
|
||||
@@ -103,5 +103,5 @@ access_yuthon_property_ledger, yuthon_property_ledger,model_yuthon_property_ledg
|
||||
access_property_lessee_analysis,property_lessee_analysis,model_property_lessee_analysis,base.group_user,1,1,1,1
|
||||
access_contract_signature_wizard,contract_signature_wizard,model_contract_signature_wizard,base.group_user,1,1,1,1
|
||||
access_payment_process,payment_process,model_payment_process,base.group_user,1,1,1,1
|
||||
|
||||
access_build_pop_wizard, build_pop_wizard,model_build_pop_wizard,base.group_user,1,1,1,1
|
||||
|
||||
|
||||
|
@@ -37,9 +37,6 @@
|
||||
<field name="name_title" readonly="1"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<field name="name" required="1" string="合同编号:"/>
|
||||
</group>
|
||||
<group string="审批事项">
|
||||
<field name="users_id"/>
|
||||
<field name="supervising_id"/>
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="users_id"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="property_address"/>
|
||||
<field name="reason"/>
|
||||
<field name="image"/>
|
||||
@@ -74,6 +75,8 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业信息">
|
||||
<button name="build_pop" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="accounting_id" column_invisible="1"/>
|
||||
@@ -89,7 +92,6 @@
|
||||
<tree editable="bottom">
|
||||
<field name="accounting_id" column_invisible="1"/>
|
||||
<field name="payment_nodes"/>
|
||||
<field name="coping_date"/>
|
||||
<field name="amount"/>
|
||||
<field name="remake"/>
|
||||
</tree>
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="property_address"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
@@ -72,6 +73,8 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业信息">
|
||||
<button name="build_pop" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="construction_id" column_invisible="1"/>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="users_id"/>
|
||||
<field name="property_address"/>
|
||||
<field name="reason"/>
|
||||
@@ -74,6 +75,8 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业信息">
|
||||
<button name="build_pop" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="design_id" column_invisible="1"/>
|
||||
@@ -89,7 +92,6 @@
|
||||
<tree editable="bottom">
|
||||
<field name="design_id" column_invisible="1"/>
|
||||
<field name="payment_nodes"/>
|
||||
<field name="coping_date"/>
|
||||
<field name="amount"/>
|
||||
<field name="remake"/>
|
||||
</tree>
|
||||
@@ -102,7 +104,7 @@
|
||||
</record>
|
||||
<record id="view_property_design_approval_action" model="ir.actions.act_window">
|
||||
<field name="name">建设工程设计合同审批</field>
|
||||
<field name="res_model">property.construction.approval</field>
|
||||
<field name="res_model">property.design.approval</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业信息">
|
||||
<button name="build_pop" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="project_id" column_invisible="1"/>
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="text"/>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="users_id"/>
|
||||
<field name="property_address"/>
|
||||
<field name="reason"/>
|
||||
@@ -76,6 +77,8 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="物业信息">
|
||||
<button name="build_pop" string="添加物业" type="object"
|
||||
class="btn-primary"/>
|
||||
<field name="lease_ids">
|
||||
<tree editable="bottom" create="false">
|
||||
<field name="supervising_id" column_invisible="1"/>
|
||||
@@ -103,7 +106,7 @@
|
||||
</record>
|
||||
<record id="view_property_supervising_approval_action" model="ir.actions.act_window">
|
||||
<field name="name">建设工程委托监理合同审批</field>
|
||||
<field name="res_model">property.construction.approval</field>
|
||||
<field name="res_model">property.supervising.approval</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -9,4 +9,5 @@ from . import property_management_wizard
|
||||
from . import click_reconciliation_wizard
|
||||
from . import accounts_wizard
|
||||
from . import binding_information_wizard
|
||||
from . import contract_signature_wizard
|
||||
from . import contract_signature_wizard
|
||||
from . import build_pop_wizard
|
||||
@@ -6,7 +6,43 @@ class BuildPopWizard(models.TransientModel):
|
||||
_name = 'build.pop.wizard'
|
||||
_description = '添加物业弹窗'
|
||||
|
||||
|
||||
property_ids = fields.Many2many('yuthon.property', string='物业')
|
||||
construction_id = fields.Many2one('property.construction.approval', string="关联建设工程造价咨询合同审批")
|
||||
project_id = fields.Many2one('property.project.approval', string="关联工程立项")
|
||||
design_id = fields.Many2one('property.design.approval', string="关联建设工程设计合同审批")
|
||||
accounting_id = fields.Many2one('property.accounting.approval', string="关联建设工程委托监理合同审批")
|
||||
supervising_id = fields.Many2one('property.supervising.approval', string="关联建设工程施工合同审批")
|
||||
|
||||
def confirm(self):
|
||||
pass
|
||||
# 收集所有选中物业的地址
|
||||
property_addresses = [
|
||||
prop.name
|
||||
for prop in self.property_ids
|
||||
if prop.name
|
||||
]
|
||||
concatenated_address = ', '.join(property_addresses)
|
||||
related_fields = [
|
||||
('construction_id', 'construction_id'),
|
||||
('project_id', 'project_id'),
|
||||
('design_id', 'design_id'),
|
||||
('accounting_id', 'accounting_id'),
|
||||
('supervising_id', 'supervising_id')
|
||||
]
|
||||
|
||||
for field, line_field in related_fields:
|
||||
record = getattr(self, field)
|
||||
if record:
|
||||
if hasattr(record, 'property_address'):
|
||||
record.write({'property_address': concatenated_address})
|
||||
|
||||
existing_lines = self.env['property.lease.contract.line'].search([
|
||||
(line_field, '=', record.id)
|
||||
])
|
||||
if existing_lines:
|
||||
existing_lines.unlink()
|
||||
|
||||
for prop in self.property_ids:
|
||||
self.env['property.lease.contract.line'].create({
|
||||
line_field: record.id,
|
||||
'address_id': prop.id,
|
||||
})
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="build_pop_wizard_form" model="ir.ui.view">
|
||||
<field name="name">build.pop.wizard.form</field>
|
||||
<field name="model">build.pop.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="property_ids" widget="many2many_tags"/>
|
||||
<field name="construction_id" invisible="1"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="design_id" invisible="1"/>
|
||||
<field name="accounting_id" invisible="1"/>
|
||||
<field name="supervising_id" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer>
|
||||
<button name="confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
<button string="返回" class="btn-secondary" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user