Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Accounting Periods
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
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
XCG
Odoo modules
Accounting Periods
Commits
d26c58c4da07
Commit
d26c58c4da07
authored
6 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Demo fiscal year & periods
parent
629ccfafd166
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
__manifest__.py
+4
-0
4 additions, 0 deletions
__manifest__.py
demo/account_fiscalyear_and_periods.xml
+116
-0
116 additions, 0 deletions
demo/account_fiscalyear_and_periods.xml
with
120 additions
and
0 deletions
__manifest__.py
+
4
−
0
View file @
d26c58c4
...
...
@@ -46,5 +46,9 @@
'
views/account_fiscalyear.xml
'
,
],
'
demo
'
:
[
'
demo/account_fiscalyear_and_periods.xml
'
,
],
'
installable
'
:
True
,
}
This diff is collapsed.
Click to expand it.
demo/account_fiscalyear_and_periods.xml
0 → 100644
+
116
−
0
View file @
d26c58c4
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Load default fiscal years and periods when building a demo database. This
matters when running automated tests. -->
<!-- The defs below are similar to those in odoo8/addons/account/demo/account_demo.xml. -->
<record
id=
"data_fiscalyear"
model=
"account.fiscalyear"
>
<field
name=
"name"
eval=
"'Fiscal Year X '+time.strftime('%Y')"
/>
<field
name=
"code"
eval=
"'FY'+time.strftime('%Y')"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-01-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-12-31'"
/>
</record>
<record
id=
"period_1"
model=
"account.period"
>
<field
name=
"code"
eval=
"'01/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 01/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-01-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-01-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_2"
model=
"account.period"
>
<field
name=
"code"
eval=
"'02/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 02/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-02-01'"
/>
<!-- Last day of February: 1 day before March 1st. -->
<field
name=
"date_stop"
eval=
"(DateTime.today().replace(month=3, day=1) - timedelta(days=1)).strftime('%Y-%m-%d')"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_3"
model=
"account.period"
>
<field
name=
"code"
eval=
"'03/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 03/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-03-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-03-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_4"
model=
"account.period"
>
<field
name=
"code"
eval=
"'04/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 04/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-04-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-04-30'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_5"
model=
"account.period"
>
<field
name=
"code"
eval=
"'05/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 05/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-05-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-05-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_6"
model=
"account.period"
>
<field
name=
"code"
eval=
"'06/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 06/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-06-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-06-30'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_7"
model=
"account.period"
>
<field
name=
"code"
eval=
"'07/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 07/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-07-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-07-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_8"
model=
"account.period"
>
<field
name=
"code"
eval=
"'08/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 08/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-08-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-08-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_9"
model=
"account.period"
>
<field
name=
"code"
eval=
"'09/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 09/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-09-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-09-30'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_10"
model=
"account.period"
>
<field
name=
"code"
eval=
"'10/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 10/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-10-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-10-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_11"
model=
"account.period"
>
<field
name=
"code"
eval=
"'11/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 11/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-11-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-11-30'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
<record
id=
"period_12"
model=
"account.period"
>
<field
name=
"code"
eval=
"'12/'+time.strftime('%Y')"
/>
<field
name=
"name"
eval=
"'X 12/'+time.strftime('%Y')"
/>
<field
name=
"fiscalyear_id"
ref=
"data_fiscalyear"
/>
<field
name=
"date_start"
eval=
"time.strftime('%Y')+'-12-01'"
/>
<field
name=
"date_stop"
eval=
"time.strftime('%Y')+'-12-31'"
/>
<field
name=
"company_id"
ref=
"base.main_company"
/>
</record>
</odoo>
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