@@ -55,6 +55,7 @@
|
||||
<attribute name="widget">false</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='contract_type_id']" position="after">
|
||||
<field name="state"/>
|
||||
<field name="termination_date"/>
|
||||
<field name="reason_suspension" required="termination_date" invisible="not termination_date"/>
|
||||
<field name="salary_day" invisible="not is_internship"/>
|
||||
|
||||
@@ -33,7 +33,7 @@ class YuthonVacationReports(models.Model):
|
||||
compensatory_leave = fields.Integer(string="调休", compute='_compute_other_leave', store=True, group_operator=None)
|
||||
leave_of_absence = fields.Float(string="事假", digits=(16, 3), compute='_compute_other_leave', store=True,
|
||||
group_operator=None)
|
||||
statutory_leave = fields.Integer(string="加班时(法定假)", compute='_compute_other_leave', store=True, group_operator=None)
|
||||
statutory_leave = fields.Integer(string="加班时(法定)", compute='_compute_other_leave', store=True, group_operator=None)
|
||||
cop_leave = fields.Float(string='补休', digits=(16, 3), compute='_compute_other_leave', store=True,
|
||||
group_operator=None)
|
||||
duty_off_leave = fields.Integer(string='值班调休', compute='_compute_other_leave', store=True, group_operator=None)
|
||||
|
||||
@@ -50,35 +50,50 @@
|
||||
<field name="name" required="1" placeholder="请输入标题"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group string="审批事项">
|
||||
<field name="users_id"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="real_duration"/>
|
||||
<field name="issues_result" invisible="is_issues == False"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<group string="审批事项" col="2">
|
||||
<group>
|
||||
<field name="users_id"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="reason_application"/>
|
||||
<field name="real_duration"/>
|
||||
<field name="issues_result" invisible="is_issues == False"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="start_time" options="{'rounding': 0}"/>
|
||||
<label for="start_time"/>
|
||||
<div class="d-inline-flex w-100">
|
||||
<field name="start_time" string="开始日期:" class="me-2"
|
||||
style="max-width: 12rem !important;"/>
|
||||
<field name="start_week" string=" " class="ms-2"
|
||||
style="max-width: 5rem !important;"/>
|
||||
</div>
|
||||
<label for="end_time"/>
|
||||
<div class="d-inline-flex w-100">
|
||||
<field name="end_time" string="结束日期:" class="me-2"
|
||||
style="max-width: 12rem !important;"/>
|
||||
<field name="end_week" string=" " class="ms-2"
|
||||
style="max-width: 5rem !important;"/>
|
||||
</div>
|
||||
<field name="end_time" options="{'rounding': 0}"/>
|
||||
<field name="type_overtime"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="start_week" string=" "/>
|
||||
<field name="end_week" string=" "/>
|
||||
</group>
|
||||
<group>
|
||||
<button name="open_record" type="object" string="考勤记录" class="oe_highlight"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="duration"/>
|
||||
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="overtime_hours" readonly="1"/>
|
||||
<field name="meal" required="1"/>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="duration"/>
|
||||
<field name="employee_ids" widget="many2many_tags" options="{'no_create': True}"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
<field name="overtime_hours" readonly="1"/>
|
||||
<field name="meal" required="1"/>
|
||||
</group>
|
||||
<group/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
'wizard/accounts_wizard_views.xml',
|
||||
'wizard/binding_information_wizard_views.xml',
|
||||
'wizard/property_rental_wizard_views.xml',
|
||||
'wizard/contract_signature_wizard_viwes.xml',
|
||||
'wizard/property_meeting_wizard_views.xml',
|
||||
'views/property_menu_all.xml',
|
||||
],
|
||||
|
||||
@@ -188,6 +188,7 @@ class PropertyLeaseContract(models.Model):
|
||||
asset_valuation_id = fields.Many2one('ir.attachment', string="资产评估结果明细表")
|
||||
lease_contract = fields.Many2one('ir.attachment', string="合同/协议")
|
||||
confirmation_transaction_id = fields.Many2one('ir.attachment', string="成交确认书")
|
||||
contract_signature_id = fields.Many2one('ir.attachment', string="合同签名附件")
|
||||
responsibility_book_id = fields.Many2one('ir.attachment', string="安全生产责任书(住宅)")
|
||||
other_ment_ids = fields.Many2many(
|
||||
'ir.attachment',
|
||||
@@ -220,6 +221,16 @@ class PropertyLeaseContract(models.Model):
|
||||
reconciliation_count = fields.Integer(string="对账数量", compute='_compute_reconciliation_count')
|
||||
process_count = fields.Integer(string="流程数量", compute='_compute_process_count')
|
||||
|
||||
def contract_signature(self):
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': '合同签订',
|
||||
"target": "new",
|
||||
'res_model': 'contract.signature.wizard',
|
||||
'view_mode': 'form',
|
||||
'context': {'default_contract_id': self.id}
|
||||
}
|
||||
|
||||
def _compute_contract_count(self):
|
||||
for record in self:
|
||||
record.contract_count = self.env['property.accounts.receivable'].search_count([('contract_id', '=', record.id)])
|
||||
|
||||
@@ -101,5 +101,6 @@ access_accounts_wizard, accounts_wizard,model_accounts_wizard,base.group_user,1,
|
||||
access_binding_information_wizard,binding_information_wizard,model_binding_information_wizard,base.group_user,1,1,1,1
|
||||
access_yuthon_property_ledger, yuthon_property_ledger,model_yuthon_property_ledger,base.group_user,1,1,1,1
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
@@ -405,6 +405,8 @@
|
||||
decoration-danger="contact_state == 'terminate'"
|
||||
decoration-warning="contact_state == 'complete'"
|
||||
decoration-muted="contact_state == 'early_termination'"/>
|
||||
<field name="contract_date" column_invisible="1"/>
|
||||
<button name="contract_signature" type="object" class="btn-primary" string="合同签订" invisible="contract_date"/>
|
||||
<button name="put_evaluation_plan" type="object" class="btn-primary" string="评估推送"
|
||||
invisible="contact_state == 'ing'"/>
|
||||
<!-- <button name="button_lease_extension" type="object" class="btn-primary" string="续租"/>-->
|
||||
@@ -768,6 +770,7 @@
|
||||
<field name="license_id" widget="preview_many2one"/>
|
||||
<field name="legal_entity_id" widget="preview_many2one"/>
|
||||
<field name="lease_contract" widget="preview_many2one"/>
|
||||
<field name="contract_signature_id" widget="preview_many2one" invisible="not contract_date"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="power_attorney_id" widget="preview_many2one"/>
|
||||
|
||||
@@ -8,4 +8,5 @@ from . import property_meeting_wizard
|
||||
from . import property_management_wizard
|
||||
from . import click_reconciliation_wizard
|
||||
from . import accounts_wizard
|
||||
from . import binding_information_wizard
|
||||
from . import binding_information_wizard
|
||||
from . import contract_signature_wizard
|
||||
@@ -0,0 +1,22 @@
|
||||
from odoo import models, fields, api, _, SUPERUSER_ID
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
import xlrd
|
||||
import base64
|
||||
import datetime
|
||||
from datetime import datetime
|
||||
import pandas as pd
|
||||
|
||||
|
||||
class ContractSignatureWizard(models.TransientModel):
|
||||
_name = 'contract.signature.wizard'
|
||||
_description = '合同签订'
|
||||
|
||||
signature_date = fields.Date(string='签订日期')
|
||||
contract_id = fields.Many2one('property.lease.contract', string='合同')
|
||||
contract_signature_id = fields.Many2one('ir.attachment', string="合同签订附件")
|
||||
|
||||
def action_confirm(self):
|
||||
if self.contract_id:
|
||||
self.contract_id.write({'contract_date': self.signature_date,
|
||||
'contract_signature_id': self.contract_signature_id.id
|
||||
})
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<record id="view_contract_signature_wizard" model="ir.ui.view">
|
||||
<field name="name">contract.signature.wizard</field>
|
||||
<field name="model">contract.signature.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="合同签订">
|
||||
<group>
|
||||
<field name="contract_id"/>
|
||||
<field name="signature_date"/>
|
||||
<field name="contract_signature_id" widget="preview_many2one"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="action_confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
<button string="取消" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -6,6 +6,7 @@ class StockPicking(models.Model):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
document_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
employee_id = fields.Many2one('hr.employee', string="领用人")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
<field name="document_ids" widget="preview_many2many" required="1"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||
<attribute name="name">供应商</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="inherit_stock_picking_tree" model="ir.ui.view">
|
||||
@@ -17,15 +20,30 @@
|
||||
<field name="model">stock.picking</field>
|
||||
<field name="inherit_id" ref="stock.vpicktree"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="before">
|
||||
<field name="origin"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='name']" position="attributes">
|
||||
<attribute name="string">编号</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location_dest_id']" position="attributes">
|
||||
<attribute name="string">目的位置</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="attributes">
|
||||
<attribute name="string">验收人</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="attributes">
|
||||
<attribute name="string">经手人</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="employee_id"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='picking_type_id']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location_id']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='location_dest_id']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='scheduled_date']" position="attributes">
|
||||
<attribute name="column_invisible">1</attribute>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user