议题审批

This commit is contained in:
李鹏宇
2024-08-15 16:03:34 +08:00
parent 0cf0e6d2ad
commit 5fb2b2abeb
6 changed files with 7 additions and 44 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class RoomBooking(models.Model):
})
# 企业用户发送通知
partner_ids = self.sudo().env['res.users'].search([('id', 'in', self.room_users_ids.ids)]).mapped('partner_id').ids
self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids,'room.message_yuthon_room_users_data')
self.sudo().with_context(lang=self.env.lang)._message_auto_subscribe_notify(partner_ids, 'room.message_yuthon_room_users_data')
# odoo发通知
def meeting_sign_in(self):
pass
@@ -7,12 +7,6 @@ class HrContract(models.Model):
_inherit = "hr.contract"
_description = "员工合同拓展"
first_party = fields.Selection([('thtz','天河投资'),
('thcj','天河城建'),
('thwg','天河物管'),
('thlc','天河粮储存')],
string='甲方')
party_b = fields.Char("乙方")
account = fields.Char("账户")
bank = fields.Char("开户行")
@@ -2,7 +2,8 @@
from odoo import api, fields, models, tools
from odoo.exceptions import ValidationError
class InheritSaleOrder(models.Model):
class ResPartner(models.Model):
_inherit = 'res.partner'
_description = "联系人拓展"
+3 -15
View File
@@ -2,28 +2,16 @@
from odoo import api, fields, models, tools
from odoo.exceptions import ValidationError
class SaleOrder(models.Model):
_inherit = "sale.order"
_description = "租赁合同拓展"
contract_id = fields.Char(string="合同编号", default=lambda self: self.env['ir.sequence'].next_by_code('sale_order_code'))
res_partner_ids = fields.One2many('res.partner', 'sale_order_id', string='关联联系人')
sale_order_details_ids = fields.One2many('sale.order.details', 'sale_order_id', string='承租方明细')
contract_code = fields.Char(string="合同编号", default=lambda self: self.env['ir.sequence'].next_by_code('sale_order_code'))
res_partner_ids = fields.One2many('res.partner', 'sale_order_id', string='承租方明细')
contract_documents_ids = fields.Many2many('documents.document', string="附件")
contract_confirm_date = fields.Datetime(string="合同签定日期")
handover_date = fields.Datetime(string="交接日期")
class SaleOrderDetails(models.Model):
_name = "sale.order.details"
_description = "承租方明细"
sale_order_id = fields.Many2one("sale.order", string='关联租赁合同')
unit_price = fields.Float(string='单价')
monthly_rent = fields.Float(string='月租金')
period_one = fields.Char(string='期间1')
period_two = fields.Char(string='期间2')
period_months = fields.Char(string='期间月数')
period_rent = fields.Float(string='期间租金')
@@ -5,14 +5,6 @@
<field name="model">hr.contract</field>
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='contract_type_id']" position="after">
<field name="first_party"/>
<field name="bank"/>
</xpath>
<xpath expr="//field[@name='date_end']" position="after">
<field name="party_b"/>
<field name="account"/>
</xpath>
</field>
</record>
</odoo>
@@ -6,7 +6,7 @@
<field name="inherit_id" ref="sale_renting.rental_order_primary_form_view"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="after">
<field name="contract_id"/>
<field name="contract_code"/>
<field name="contract_confirm_date"/>
<field name="handover_date"/>
<field name="contract_documents_ids">
@@ -31,18 +31,6 @@
</tree>
</field>
</page>
<page string="承租方明细">
<field name="sale_order_details_ids">
<tree>
<field name="unit_price"/>
<field name="monthly_rent" optional="show"/>
<field name="period_one" optional="show"/>
<field name="period_two" optional="show"/>
<field name="period_months" optional="show"/>
<field name="period_rent" optional="show"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>