From dec5d3a4e5d09462fcd7a703f14509a502e88b3c Mon Sep 17 00:00:00 2001 From: huimark Date: Sat, 19 Dec 2020 17:43:23 +0800 Subject: [PATCH] 'modifications' --- estate-property/__manifest__.py | 2 +- .../models - \345\211\257\346\234\254.py" | 18 ++++++++++++ estate-property/models/models.py | 29 ++++++++++--------- 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 "estate-property/models/models - \345\211\257\346\234\254.py" diff --git a/estate-property/__manifest__.py b/estate-property/__manifest__.py index 8b0ba0c..c7b88c6 100644 --- a/estate-property/__manifest__.py +++ b/estate-property/__manifest__.py @@ -3,7 +3,7 @@ 'name': "estate-property", 'summary': """ - 超级好用的地产管理软件 + 超级好用的地产管理软件xiahui """, 'description': """ diff --git "a/estate-property/models/models - \345\211\257\346\234\254.py" "b/estate-property/models/models - \345\211\257\346\234\254.py" new file mode 100644 index 0000000..42438e3 --- /dev/null +++ "b/estate-property/models/models - \345\211\257\346\234\254.py" @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +# from odoo import models, fields, api + + +# class estate-property(models.Model): +# _name = 'estate-property.estate-property' +# _description = 'estate-property.estate-property' + +# name = fields.Char() +# value = fields.Integer() +# value2 = fields.Float(compute="_value_pc", store=True) +# description = fields.Text() +# +# @api.depends('value') +# def _value_pc(self): +# for record in self: +# record.value2 = float(record.value) / 100 diff --git a/estate-property/models/models.py b/estate-property/models/models.py index 42438e3..c5773d0 100644 --- a/estate-property/models/models.py +++ b/estate-property/models/models.py @@ -1,18 +1,21 @@ # -*- coding: utf-8 -*- -# from odoo import models, fields, api +from odoo import models, fields, api -# class estate-property(models.Model): -# _name = 'estate-property.estate-property' -# _description = 'estate-property.estate-property' +class estateproperty(models.Model): + _name = 'estateproperty.ep' +# _description = 'estate-property.estate-property' -# name = fields.Char() -# value = fields.Integer() -# value2 = fields.Float(compute="_value_pc", store=True) -# description = fields.Text() -# -# @api.depends('value') -# def _value_pc(self): -# for record in self: -# record.value2 = float(record.value) / 100 + name = fields.Char() + date = fields.Date() + description = fields.Text() + +# value = fields.Integer() +# value2 = fields.Float(compute="_value_pc", store=True) +# description = fields.Text() + +# @api.depends('value') +# def _value_pc(self): +# for record in self: +# record.value2 = float(record.value) / 100