book neu
This commit is contained in:
parent
92e5dd6026
commit
a9f3eb12b4
14 changed files with 292 additions and 2 deletions
|
@ -2,3 +2,5 @@ syntax: glob
|
||||||
build/*
|
build/*
|
||||||
dist/*
|
dist/*
|
||||||
mds_cashbook.egg-info/*
|
mds_cashbook.egg-info/*
|
||||||
|
locale/convert_de2en.py
|
||||||
|
__pycache__/*
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
# This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
# The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
# full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
|
from .book import Book
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
|
Book,
|
||||||
module='cashbook', type_='model')
|
module='cashbook', type_='model')
|
||||||
|
|
20
book.py
Normal file
20
book.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
# The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
# full copyright notices and license terms.
|
||||||
|
|
||||||
|
from trytond.model import ModelView, ModelSQL, fields
|
||||||
|
|
||||||
|
|
||||||
|
class Book(ModelSQL, ModelView):
|
||||||
|
'Account'
|
||||||
|
__name__ = 'cashbook.book'
|
||||||
|
|
||||||
|
name = fields.Char(string='Name', required=True)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def __setup__(cls):
|
||||||
|
super(Book, cls).__setup__()
|
||||||
|
cls._order.insert(0, ('name', 'ASC'))
|
||||||
|
|
||||||
|
# end Book
|
67
book.xml
Normal file
67
book.xml
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- views -->
|
||||||
|
<record model="ir.ui.view" id="book_view_list">
|
||||||
|
<field name="model">cashbook.book</field>
|
||||||
|
<field name="type">tree</field>
|
||||||
|
<field name="priority" eval="10"/>
|
||||||
|
<field name="name">book_list</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id="book_view_form">
|
||||||
|
<field name="model">cashbook.book</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="priority" eval="20"/>
|
||||||
|
<field name="name">book_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- action view-->
|
||||||
|
<record model="ir.action.act_window" id="act_book_view">
|
||||||
|
<field name="name">Account</field>
|
||||||
|
<field name="res_model">cashbook.book</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view" id="act_book_view-1">
|
||||||
|
<field name="sequence" eval="10"/>
|
||||||
|
<field name="view" ref="book_view_list"/>
|
||||||
|
<field name="act_window" ref="act_book_view"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view" id="act_book_view-2">
|
||||||
|
<field name="sequence" eval="20"/>
|
||||||
|
<field name="view" ref="book_view_form"/>
|
||||||
|
<field name="act_window" ref="act_book_view"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- permission -->
|
||||||
|
<!-- anon: deny all -->
|
||||||
|
<record model="ir.model.access" id="access_book-anon">
|
||||||
|
<field name="model" search="[('model', '=', 'cashbook.book')]"/>
|
||||||
|
<field name="perm_read" eval="False"/>
|
||||||
|
<field name="perm_write" eval="False"/>
|
||||||
|
<field name="perm_create" eval="False"/>
|
||||||
|
<field name="perm_delete" eval="False"/>
|
||||||
|
</record>
|
||||||
|
<!-- admin: read/write -->
|
||||||
|
<record model="ir.model.access" id="access_book-group_admin">
|
||||||
|
<field name="model" search="[('model', '=', 'cashbook.book')]"/>
|
||||||
|
<field name="group" ref="res.group_admin"/>
|
||||||
|
<field name="perm_read" eval="True"/>
|
||||||
|
<field name="perm_write" eval="True"/>
|
||||||
|
<field name="perm_create" eval="True"/>
|
||||||
|
<field name="perm_delete" eval="True"/>
|
||||||
|
</record>
|
||||||
|
<!-- cashbook: read -->
|
||||||
|
<record model="ir.model.access" id="access_book-group_cashbook">
|
||||||
|
<field name="model" search="[('model', '=', 'cashbook.book')]"/>
|
||||||
|
<field name="group" ref="group_cashbook"/>
|
||||||
|
<field name="perm_read" eval="True"/>
|
||||||
|
<field name="perm_write" eval="False"/>
|
||||||
|
<field name="perm_create" eval="False"/>
|
||||||
|
<field name="perm_delete" eval="False"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
13
group.xml
Normal file
13
group.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record model="res.group" id="group_cashbook">
|
||||||
|
<field name="name">Cashbook</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
14
icon.xml
Normal file
14
icon.xml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<record model="ir.ui.icon" id="notebook_icon">
|
||||||
|
<field name="name">mds-notebook</field>
|
||||||
|
<field name="path">icon/notebook1.svg</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
64
icon/notebook1.svg
Normal file
64
icon/notebook1.svg
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:svg="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:ns1="http://sozi.baierouge.fr" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg2" viewBox="0 0 64 64" version="1.1">
|
||||||
|
<g id="layer1" transform="translate(0 -988.36)">
|
||||||
|
<g id="g2945">
|
||||||
|
<path id="rect3663" d="m11 991.36h49v60h-49v-60z" fill-opacity=".13725"/>
|
||||||
|
<path id="rect2818" d="m12 4v58h42v-58h-42zm3 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2zm0 5h2v2h-2v-2z" fill="#fefde6" transform="translate(0 988.36)"/>
|
||||||
|
<path id="path3694" fill="#6dc5dd" d="m18 998.36v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36zm0 5v1h36v-1h-36z"/>
|
||||||
|
<path id="rect3691" d="m21 992.36h1v58h-1v-58z" fill="#f77462"/>
|
||||||
|
<path id="rect2885" d="m12 1049.4h42v2h-42v-2z" fill="#bebebe"/>
|
||||||
|
<rect id="rect3661" height="2" width="1" y="1049.4" x="21" fill="#9f482d"/>
|
||||||
|
<g id="g2909" fill="#404040" transform="translate(1,1)">
|
||||||
|
<rect id="rect2889" y="996.36" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2891" y="1001.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2893" y="1006.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2895" y="1011.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2897" y="1016.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2899" y="1021.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2901" y="1026.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2903" y="1031.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2905" y="1036.4" width="8" height="2" x="7"/>
|
||||||
|
<rect id="rect2907" y="1041.4" width="8" height="2" x="7"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<metadata>
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work>
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<cc:license rdf:resource="http://creativecommons.org/licenses/publicdomain/"/>
|
||||||
|
<dc:publisher>
|
||||||
|
<cc:Agent rdf:about="http://openclipart.org/">
|
||||||
|
<dc:title>Openclipart</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:publisher>
|
||||||
|
<dc:title>note book</dc:title>
|
||||||
|
<dc:date>2013-08-31T21:45:35</dc:date>
|
||||||
|
<dc:description>note book</dc:description>
|
||||||
|
<dc:source>https://openclipart.org/detail/182788/bloc-notes-by-crisg-182788</dc:source>
|
||||||
|
<dc:creator>
|
||||||
|
<cc:Agent>
|
||||||
|
<dc:title>crisg</dc:title>
|
||||||
|
</cc:Agent>
|
||||||
|
</dc:creator>
|
||||||
|
<dc:subject>
|
||||||
|
<rdf:Bag>
|
||||||
|
<rdf:li>draw</rdf:li>
|
||||||
|
<rdf:li>drawing</rdf:li>
|
||||||
|
<rdf:li>icon</rdf:li>
|
||||||
|
<rdf:li>note</rdf:li>
|
||||||
|
<rdf:li>notebook</rdf:li>
|
||||||
|
<rdf:li>notepad</rdf:li>
|
||||||
|
<rdf:li>notes</rdf:li>
|
||||||
|
</rdf:Bag>
|
||||||
|
</dc:subject>
|
||||||
|
</cc:Work>
|
||||||
|
<cc:License rdf:about="http://creativecommons.org/licenses/publicdomain/">
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
|
||||||
|
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
|
||||||
|
</cc:License>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
43
locale/de.po
Normal file
43
locale/de.po
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
# res.group #
|
||||||
|
#############
|
||||||
|
msgctxt "model:res.group,name:group_cashbook"
|
||||||
|
msgid "Cashbook"
|
||||||
|
msgstr "Kassenbuch"
|
||||||
|
|
||||||
|
|
||||||
|
##############
|
||||||
|
# ir.ui.menu #
|
||||||
|
##############
|
||||||
|
msgctxt "model:ir.ui.menu,name:menu_cashbook"
|
||||||
|
msgid "Cashbook"
|
||||||
|
msgstr "Kassenbuch"
|
||||||
|
|
||||||
|
msgctxt "model:ir.ui.menu,name:menu_account"
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Konto"
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
# ir.action #
|
||||||
|
#############
|
||||||
|
msgctxt "model:ir.action,name:act_book_view"
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Konto"
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
# cashbook.book #
|
||||||
|
#################
|
||||||
|
msgctxt "model:cashbook.book,name:"
|
||||||
|
msgid "Account"
|
||||||
|
msgstr "Konto"
|
||||||
|
|
||||||
|
msgctxt "field:cashbook.book,name:"
|
||||||
|
msgid "Name"
|
||||||
|
msgstr "Name"
|
34
menu.xml
Normal file
34
menu.xml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<!-- menu: /Cashbook -->
|
||||||
|
<menuitem id="menu_cashbook" name="Cashbook" icon="mds-notebook" />
|
||||||
|
|
||||||
|
<record model="ir.ui.menu-res.group" id="menu_cashbook-group_admin">
|
||||||
|
<field name="menu" ref="menu_cashbook"/>
|
||||||
|
<field name="group" ref="res.group_admin"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.menu-res.group" id="menu_cashbook-group_cashbook">
|
||||||
|
<field name="menu" ref="menu_cashbook"/>
|
||||||
|
<field name="group" ref="group_cashbook"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- menu: /Cashbook/Account -->
|
||||||
|
<menuitem id="menu_account" action="act_book_view" icon="tryton-list"
|
||||||
|
parent="menu_cashbook" sequence="10"/>
|
||||||
|
|
||||||
|
<record model="ir.ui.menu-res.group" id="menu_account-group_admin">
|
||||||
|
<field name="menu" ref="menu_account"/>
|
||||||
|
<field name="group" ref="res.group_admin"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.menu-res.group" id="menu_account-group_cashbook">
|
||||||
|
<field name="menu" ref="menu_account"/>
|
||||||
|
<field name="group" ref="group_cashbook"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
10
message.xml
Normal file
10
message.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tryton>
|
||||||
|
<data>
|
||||||
|
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</tryton>
|
2
setup.py
2
setup.py
|
@ -97,7 +97,7 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
||||||
package_data={
|
package_data={
|
||||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
||||||
+ ['tryton.cfg', 'locale/*.po', 'tests/*.py',
|
+ ['tryton.cfg', 'locale/*.po', 'tests/*.py',
|
||||||
'view/*.xml',
|
'view/*.xml', 'icon/*.svg',
|
||||||
'versiondep.txt', 'README.rst']),
|
'versiondep.txt', 'README.rst']),
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -3,3 +3,7 @@ version=6.0.0
|
||||||
depends:
|
depends:
|
||||||
res
|
res
|
||||||
xml:
|
xml:
|
||||||
|
icon.xml
|
||||||
|
group.xml
|
||||||
|
book.xml
|
||||||
|
menu.xml
|
||||||
|
|
8
view/book_form.xml
Normal file
8
view/book_form.xml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<form>
|
||||||
|
<label name="name"/>
|
||||||
|
<field name="name"/>
|
||||||
|
</form>
|
7
view/book_list.xml
Normal file
7
view/book_list.xml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
||||||
|
The COPYRIGHT file at the top level of this repository contains the
|
||||||
|
full copyright notices and license terms. -->
|
||||||
|
<tree>
|
||||||
|
<field name="name"/>
|
||||||
|
</tree>
|
Loading…
Reference in a new issue