Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
85b49815
Commit
85b49815
authored
Sep 10, 2025
by
malihua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收入支出表增加索引
parent
821fc21e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
roke_product_income_expense/models/product_income_expense.py
+4
-4
No files found.
roke_product_income_expense/models/product_income_expense.py
View file @
85b49815
...
...
@@ -9,14 +9,14 @@ from odoo.exceptions import ValidationError
class
ProductIncomeExpense
(
models
.
Model
):
_name
=
"roke.product.income.expense"
business_date
=
fields
.
Date
(
string
=
"业务日期"
)
abstract
=
fields
.
Text
(
string
=
"摘要"
)
business_date
=
fields
.
Date
(
string
=
"业务日期"
,
index
=
True
)
abstract
=
fields
.
Text
(
string
=
"摘要"
,
index
=
True
)
income
=
fields
.
Float
(
string
=
"收入"
)
expenditure
=
fields
.
Float
(
string
=
"支出"
)
balance
=
fields
.
Float
(
string
=
"结余"
,
compute
=
"_compute_balance"
)
machinery_type
=
fields
.
Selection
([(
"烘干桶"
,
"烘干桶"
),
(
"钣金"
,
"钣金"
),
(
"颗粒机"
,
"颗粒机"
),
(
"其他"
,
"其他"
)],
default
=
"其他"
,
string
=
"类型"
)
customer
=
fields
.
Char
(
string
=
"客户"
)
default
=
"其他"
,
string
=
"类型"
,
index
=
True
)
customer
=
fields
.
Char
(
string
=
"客户"
,
index
=
True
)
@api.depends
(
"income"
,
"expenditure"
)
def
_compute_balance
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment