Commit 6a67ddfa by 马丽华

Merge branch 'mlh_jzjx_project' into 'jzjx_project'

收入支出表增加索引

See merge request !23
parents 821fc21e 85b49815
...@@ -9,14 +9,14 @@ from odoo.exceptions import ValidationError ...@@ -9,14 +9,14 @@ from odoo.exceptions import ValidationError
class ProductIncomeExpense(models.Model): class ProductIncomeExpense(models.Model):
_name = "roke.product.income.expense" _name = "roke.product.income.expense"
business_date = fields.Date(string="业务日期") business_date = fields.Date(string="业务日期", index=True)
abstract = fields.Text(string="摘要") abstract = fields.Text(string="摘要", index=True)
income = fields.Float(string="收入") income = fields.Float(string="收入")
expenditure = fields.Float(string="支出") expenditure = fields.Float(string="支出")
balance = fields.Float(string="结余", compute="_compute_balance") balance = fields.Float(string="结余", compute="_compute_balance")
machinery_type = fields.Selection([("烘干桶", "烘干桶"), ("钣金", "钣金"), ("颗粒机", "颗粒机"), ("其他", "其他")], machinery_type = fields.Selection([("烘干桶", "烘干桶"), ("钣金", "钣金"), ("颗粒机", "颗粒机"), ("其他", "其他")],
default="其他", string="类型") default="其他", string="类型", index=True)
customer = fields.Char(string="客户") customer = fields.Char(string="客户", index=True)
@api.depends("income", "expenditure") @api.depends("income", "expenditure")
def _compute_balance(self): def _compute_balance(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment