Commit Graph
1166 Commits
Author SHA1 Message Date
Harry (OpenERP) 506b249a0f [MERGE] merged from trunk-addons branch
bzr revid: hmo@tinyerp.com-20100713115800-yhnlwf0rachbddat
2010-07-13 17:28:00 +05:30
P. Christeas 6eebca04d6 Document API: node_content.open_data(), for FTP
A crude way to get the data of a content node, using StringIO.

bzr revid: p_christ@hol.gr-20100713103053-hklth9rugddm6ajl
2010-07-13 13:30:53 +03:00
P. Christeas a7eaf3bfc9 Document: fix the context logic of content nodes
Content nodes should have meaningful context and perhaps an active id
'act_id', which will be used in the report or other generation fn().
The dctx mechanism of nodes was built for that, use it.

bzr revid: p_christ@hol.gr-20100713103030-irueg85zizlp42ju
2010-07-13 13:30:30 +03:00
P. Christeas 990cdf4c94 Document: dynamic content file for static dirs.
A dynamic content definition *can* be attached to a static directory,
in which case the content should be generated based on the dctx
dictionary of the dir.

bzr revid: p_christ@hol.gr-20100713103024-l3nylpvx4ib6s4ii
2010-07-13 13:30:24 +03:00
P. Christeas d9553df1a2 Document: node context shall not be the context of orm methods.
The orm methods are called with some rich context, which need not be used
as the context of node structure. In the future, we might want to selectively
pass context values from orm to node.

bzr revid: p_christ@hol.gr-20100713103005-p0y6ptjoshomu0tv
2010-07-13 13:30:05 +03:00
P. Christeas 2d3d861a3e Document directory: "find_all" field for resource dirs.
A (mis-)feature of the previous code was that in resource directories, it
would only list attachments that would have those dirs as parents. This
means that we couldn't have another categorisation, that would yield some
of the same attachments.

bzr revid: p_christ@hol.gr-20100713102958-nk40nckc41uxyzri
2010-07-13 13:29:58 +03:00
P. Christeas 6586f41062 Document nodes: import the errno, as in 9e6e98fbf132f1
bzr revid: p_christ@hol.gr-20100713102800-kfdmkfnvj0uxduo0
2010-07-13 13:28:00 +03:00
P. Christeas e6cb0e4cf5 Revert "Document API: meaningful error, when asking for directory data content."
This reverts commit 9e6e98fbf132f1c7ef795dee9d0eb3193332a5ee.

bzr revid: p_christ@hol.gr-20100713102744-rnu3vq3a2wjqmbyf
2010-07-13 13:27:44 +03:00
rpa (Open ERP) 723c5df587 [FIX]: document: Fixed error in document yaml
bzr revid: rpa@tinyerp.com-20100713095006-6wii7got8r4jszf1
2010-07-13 15:20:06 +05:30
P. Christeas 8dc0cc8a32 Document API: a little better messages, allow create_child() w/o data.
bzr revid: p_christ@hol.gr-20100712192949-nre9wzvx6utz3b3l
2010-07-12 22:29:49 +03:00
P. Christeas 385aaa2467 Document API: define node_class.create_child() and collection
Allow clients to call those fn()s for the wrong nodes, just to get an
NotImplementedError.

bzr revid: p_christ@hol.gr-20100712192808-d0x2qud1p5q26fb8
2010-07-12 22:28:08 +03:00
Harry (OpenERP) 831a292458 [MERGE]
bzr revid: hmo@tinyerp.com-20100712074657-wiqjddnycxzq2qz5
2010-07-12 13:16:57 +05:30
P. Christeas 19e5b1e3d0 Document: index the content, when a descriptor closes (eg. FTP)
bzr revid: p_christ@hol.gr-20100711142617-ib7nj3sg7nr5jp4a
2010-07-11 17:26:17 +03:00
P. Christeas a6010e22a2 Document: implement permission checks based on group_ids.
Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100711142612-2erl7ia2j9fke1e0
2010-07-11 17:26:12 +03:00
P. Christeas 661a6818d8 Document API: framework for permisssion bits.
The nodes may have extra permission attributes, rather than the ir.rule
system. Store those bits in a 'uidperms' attribute of each node.

bzr revid: p_christ@hol.gr-20100711142527-5o4v68yeuhgqvog4
2010-07-11 17:25:27 +03:00
Harry (OpenERP) fad9edc19e [MERGE]
bzr revid: hmo@tinyerp.com-20100711060646-gwp6039vsln1x30a
2010-07-11 11:36:46 +05:30
Harry (OpenERP) 230340bbbf [FIx] calendar: clean
bzr revid: hmo@tinyerp.com-20100709101952-l7twepqlkbkqp2dn
2010-07-09 15:49:52 +05:30
P. Christeas d6f1e1f29f Document API: fix typo from last commit.
bzr revid: p_christ@hol.gr-20100709082645-nlkq6j9tadhnj1xy
2010-07-09 11:26:45 +03:00
P. Christeas 60727b0cb0 Document: fix db storage (the new, raw engine)
The correct way to pass the raw file data into the db is through the
psycopg2.Binary() pseydo-type.

bzr revid: p_christ@hol.gr-20100709082351-rg1vle2d4mpzh056
2010-07-09 11:23:51 +03:00
P. Christeas e2c068b7ba Document storage: support move of files (for filestore, db)
bzr revid: p_christ@hol.gr-20100709082341-x7bedn540ev34lzs
2010-07-09 11:23:41 +03:00
P. Christeas 0d6e0a9a02 Document: support Moving of files.
bzr revid: p_christ@hol.gr-20100709082316-d8qedrjabckypt88
2010-07-09 11:23:16 +03:00
P. Christeas 3580708a49 Document API: minor cleanup, better debugging of nodes.
Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100708225327-v1j77d8yh348dv4s
2010-07-09 01:53:27 +03:00
P. Christeas 7cd4d1db7a Document API: support for simple directory rename
bzr revid: p_christ@hol.gr-20100708225229-tzodkbf0h0ma080d
2010-07-09 01:52:29 +03:00
P. Christeas e55d772ed1 Document API: meaningful error, when asking for directory data content.
Instead of the TypeError, which would be ignored by the FTP implementation,
raise an IOError.

Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100708225141-opsfz22wx6c762nh
2010-07-09 01:51:41 +03:00
P. Christeas 03865bc917 Document: Less dir, storage options, cleanup views.
The 'virtual' storage is now hidden. An extra 'db64' type, hidden, is
supported in the code, for v5-compatible databases (until we migrate
the db_datas column of them). The 'at_record' directory type is gone.

A module in extra-addons will permit the compatible behaviour, for those
experts.

bzr revid: p_christ@hol.gr-20100708225042-fp3zcwmw4zp3ee04
2010-07-09 01:50:42 +03:00
P. Christeas 1927431e0b Document: remove debug calls from trunk code.
That code would only work in trunk-xrg.

bzr revid: p_christ@hol.gr-20100706232700-x56f57gqhzupfphq
2010-07-07 02:27:00 +03:00
P. Christeas 67386ec78b Document: fix typo in test.yml
bzr revid: p_christ@hol.gr-20100706121047-p2nex1m3g86nirt6
2010-07-06 15:10:47 +03:00
P. Christeas e8bf4a4f18 Document: fix the get_partner_id functionality
Was blocking document.create()

bzr revid: p_christ@hol.gr-20100706121045-mblekyw8nlkiy1r0
2010-07-06 15:10:45 +03:00
P. Christeas 50070dfa13 Document API: have node.get_uri(), unix permissions and user/group
These attributes will help the FTP display the files correctly.

bzr revid: p_christ@hol.gr-20100702215102-0yx9y2psp32ha33u
2010-07-03 00:51:02 +03:00
Harry (OpenERP) 3f4c75919c Document: fix creating of node_res_obj without data .
bzr revid: p_christ@hol.gr-20100702215058-5h49fw2dzox3022h
2010-07-03 00:50:58 +03:00
P. Christeas 6ebec0292d Document API: fix node_dir._file_get()
Directory _file_get was in the wrong place, causing the root folder to fail,
once it was associated with dynamic context.

bzr revid: p_christ@hol.gr-20100702092732-jx8tisemq7iqxtb3
2010-07-02 12:27:32 +03:00
P. Christeas a72a73acdd Document: remove trailing whitespace
bzr revid: p_christ@hol.gr-20100702085401-8c8hwv9831jcwzts
2010-07-02 11:54:01 +03:00
P. Christeas be2f5723c9 Document, ftp: switch to new series of tests.
bzr revid: p_christ@hol.gr-20100702084535-6yz0f5xfsvh4jl9b
2010-07-02 11:45:35 +03:00
apa a1b689ec85 [IMP]:auction,event,document:changed dashboard menu
bzr revid: apa@apa-20100702055227-m09wye2iz49y2rx0
2010-07-02 11:22:27 +05:30
P. Christeas 49bf479c18 Document storage: implementation of simple rename
Conflicts:

	document/document_storage.py

bzr revid: p_christ@hol.gr-20100701175133-ti0itn58w9az88w6
2010-07-01 20:51:33 +03:00
P. Christeas 54b9e746ac Document API: trivial implementation of simple file rename
bzr revid: p_christ@hol.gr-20100701175133-k0gnyan62wo2gs7n
2010-07-01 20:51:33 +03:00
P. Christeas 9cdbcbfee1 Document API: fix equality operators
They must first check for the type of the 'other' side, or attribute
errors may occur.

bzr revid: p_christ@hol.gr-20100701175133-mjauo28qv6vkqfuq
2010-07-01 20:51:33 +03:00
P. Christeas 1819f137e9 Document: storage must be set before _set_data
No attempt to use a default one.

Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100701175133-783ril5hg7rls246
2010-07-01 20:51:33 +03:00
P. Christeas 575889d33e Document API: have equality operators for nodes, context
These will be used for advanced operations (eg. move) of nodes.

Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100701175133-gbsdly2fwcwtr0dy
2010-07-01 20:51:33 +03:00
P. Christeas c9f313dc21 Document: isolate the partner_id auto-detection in a fn()
When a document is created, some code tries to auto-detect the related
partner_id from res_model. This should better be put in a function, and
reused in other places.

bzr revid: p_christ@hol.gr-20100701175133-6aq2tx9lkuskvedh
2010-07-01 20:51:33 +03:00
P. Christeas 7c26eb67fb Document storage: the default db encoding is base64 in bytea
The storage class has to consider that. Also, prepare a class for raw bytea
storage.

bzr revid: p_christ@hol.gr-20100701175133-xxgu3cdlff0u7086
2010-07-01 20:51:33 +03:00
P. Christeas 2c5082001e Document: use the new move_to() api, protect setting of file_size.
bzr revid: p_christ@hol.gr-20100701175133-9prni6r0kspt27ku
2010-07-01 20:51:33 +03:00
P. Christeas 0153d03c82 Document storage: support more file open modes.
We may be called with 'w+', 'r+' modes, support them. However, we still
don't support the 'a+' mode.

bzr revid: p_christ@hol.gr-20100701175132-v21yzk2h335emum1
2010-07-01 20:51:32 +03:00
P. Christeas a286f1ae6d Document API: fns to get nodes from orm objects.
ORM objects should not directly create nodes, but instead ask the context
to provide them (because they could be cached).

bzr revid: p_christ@hol.gr-20100701175132-hfnvj5czdwuaswwg
2010-07-01 20:51:32 +03:00
P. Christeas 493fe42f13 Document: improve the API of move_to()
bzr revid: p_christ@hol.gr-20100701175132-s9y160v1etxt1ugp
2010-07-01 20:51:32 +03:00
P. Christeas d52f451bca Document: tests improvements.
bzr revid: p_christ@hol.gr-20100701175132-ojsjqidcfegz9py8
2010-07-01 20:51:32 +03:00
P. Christeas 4913a2f0db Document: fix nodefd_db.close()
Some vars were missing/inaccessible, put the queries in a try block.

bzr revid: p_christ@hol.gr-20100701175132-389l8frlqqg7hgr3
2010-07-01 20:51:32 +03:00
P. Christeas 4052a14c95 Document: amend the API for the move_to(), allow rename
It is better to have the same API for both move and rename.

bzr revid: p_christ@hol.gr-20100701175132-qgbf7p4izkh844vg
2010-07-01 20:51:32 +03:00
P. Christeas 530932640b Document: fix setting parent of document_file.
There is some code that calls the 'move_to()' in case the document's
parent (aka. directory) is changed. Fix notation there.

bzr revid: p_christ@hol.gr-20100701175132-8ex94b3pdwkz4lq6
2010-07-01 20:51:32 +03:00
P. Christeas 11c5171326 Draft api for document.write(parent_id: ...)
If the parent directory for some document node changes, we may
have a major change in the stored content, so an API is needed
for that.

Conflicts:

	document/nodes.py

bzr revid: p_christ@hol.gr-20100701175131-ldt3b0er5a7tja0u
2010-07-01 20:51:31 +03:00