Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
56936a1b
Commit
56936a1b
authored
14 years ago
by
Naresh Choksy
Browse files
Options
Downloads
Patches
Plain Diff
[IMP]:account installer
bzr revid: nch@tinyerp.com-20100503102801-p7fxk407o5s1ymyj
parent
a42aaf14
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
addons/account/account_installer.xml
+8
-7
8 additions, 7 deletions
addons/account/account_installer.xml
addons/account/installer.py
+8
-11
8 additions, 11 deletions
addons/account/installer.py
with
16 additions
and
18 deletions
addons/account/account_installer.xml
+
8
−
7
View file @
56936a1b
...
...
@@ -29,10 +29,13 @@
</xpath>
<group
colspan=
"8"
>
<field
name=
"charts"
colspan=
"8"
/>
<field
name=
"account_analytic_plans"
/>
<field
name=
"account_payment"
/>
<field
name=
"account_followup"
/>
<field
name=
"account_asset"
/>
<group
colspan=
"4"
groups=
"base.group_extended"
>
<separator
col=
"4"
colspan=
"4"
string=
"Install Extra Account Module"
/>
<field
name=
"account_analytic_plans"
/>
<field
name=
"account_payment"
/>
<field
name=
"account_followup"
/>
<field
name=
"account_asset"
/>
</group>
<group
colspan=
"4"
attrs=
"{'invisible':[('charts','=',False)]}"
>
<separator
col=
"4"
colspan=
"4"
string=
"Bank and Cost Account"
/>
<field
name=
"account_name"
colspan=
"2"
/>
...
...
@@ -40,9 +43,7 @@
<field
name=
"account_currency"
colspan=
"2"
widget=
"selection"
/>
</group>
<group
colspan=
"4"
>
<separator
col=
"4"
colspan=
"4"
string=
"Fiscal Year"
/>
<field
name=
"name"
/>
<field
name=
"code"
/>
<separator
col=
"4"
colspan=
"4"
string=
"Configure Fiscal Year"
/>
<field
name=
"date_start"
on_change=
"on_change_start_date(date_start)"
/>
<field
name=
"date_stop"
/>
<field
name=
"period"
colspan=
"4"
/>
...
...
This diff is collapsed.
Click to expand it.
addons/account/installer.py
+
8
−
11
View file @
56936a1b
...
...
@@ -60,21 +60,15 @@ class account_installer(osv.osv_memory):
'
account_asset
'
:
fields
.
boolean
(
'
Assets Management
'
,
help
=
"
Enables asset management in the accounting application,
"
"
including asset categories and usage periods.
"
),
'
name
'
:
fields
.
char
(
'
Name
'
,
required
=
True
,
size
=
64
,
help
=
"
Name of the fiscal year as displayed on screens.
"
),
'
code
'
:
fields
.
char
(
'
Code
'
,
required
=
True
,
size
=
64
,
help
=
"
Name of the fiscal year as displayed in reports.
"
),
'
date_start
'
:
fields
.
date
(
'
Start Date
'
,
required
=
True
),
'
date_stop
'
:
fields
.
date
(
'
End Date
'
,
required
=
True
),
'
period
'
:
fields
.
selection
([(
'
month
'
,
'
Month
'
),
(
'
3months
'
,
'
3 Month
s
'
)],
'
period
'
:
fields
.
selection
([(
'
month
'
,
'
Month
ly
'
),
(
'
3months
'
,
'
3 Month
ly
'
)],
'
Periods
'
,
required
=
True
),
'
account_name
'
:
fields
.
char
(
'
Name
'
,
size
=
128
),
'
account_type
'
:
fields
.
selection
([(
'
cash
'
,
'
Cash
'
),(
'
check
'
,
'
Check
'
),(
'
bank
'
,
'
Bank
'
)],
'
Type
'
,
size
=
32
),
'
account_currency
'
:
fields
.
many2one
(
'
res.currency
'
,
'
Currency
'
)
}
_defaults
=
{
'
code
'
:
lambda
*
a
:
time
.
strftime
(
'
%Y
'
),
'
name
'
:
lambda
*
a
:
time
.
strftime
(
'
%Y
'
),
'
date_start
'
:
lambda
*
a
:
time
.
strftime
(
'
%Y-01-01
'
),
'
date_stop
'
:
lambda
*
a
:
time
.
strftime
(
'
%Y-12-31
'
),
'
period
'
:
lambda
*
a
:
'
month
'
,
...
...
@@ -91,11 +85,14 @@ class account_installer(osv.osv_memory):
def
execute
(
self
,
cr
,
uid
,
ids
,
context
=
None
):
super
(
account_installer
,
self
).
execute
(
cr
,
uid
,
ids
,
context
=
context
)
for
res
in
self
.
read
(
cr
,
uid
,
ids
):
if
'
date1
'
in
res
and
'
date2
'
in
res
:
if
'
date_start
'
in
res
and
'
date_stop
'
in
res
:
name
=
res
[
'
date_start
'
][:
4
]
if
int
(
name
)
!=
int
(
res
[
'
date_stop
'
][:
4
]):
name
=
res
[
'
date_start
'
][:
4
]
+
'
-
'
+
res
[
'
date_stop
'
][:
4
]
code
=
res
[
'
date_start
'
][
2
:
4
]
+
'
-
'
+
res
[
'
date_stop
'
][
2
:
4
]
res_obj
=
self
.
pool
.
get
(
'
account.fiscalyear
'
)
name
=
res
[
'
name
'
]
vals
=
{
'
name
'
:
res
[
'
name
'
],
'
code
'
:
res
[
'
code
'
],
vals
=
{
'
name
'
:
name
,
'
code
'
:
code
,
'
date_start
'
:
res
[
'
date_start
'
],
'
date_stop
'
:
res
[
'
date_stop
'
],
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment