Add New module document_document and upgrade document_choose_directory

This commit is contained in:
Med Habib Challouf 2016-11-08 16:17:39 +01:00
parent 4a01a30b6c
commit 782f0d54ad
5 changed files with 50 additions and 10 deletions

5
.pydevproject Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>

View File

@ -22,11 +22,14 @@
"name": "Choose document's directory", "name": "Choose document's directory",
"summary": "Choose a document's directory during upload", "summary": "Choose a document's directory during upload",
"version": "8.0.1.0.0", "version": "8.0.1.0.0",
"author": "Mohamed habib CHALLOUF ,Odoo Community Association (OCA)", "author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"complexity": "normal", "complexity": "normal",
"category": "Knowledge", "category": "Knowledge",
'description': """
The Technical module name is changed
document to document_document
==============================================
""", """,
"depends": [ "depends": [
@ -35,7 +38,7 @@
], ],
"data": [ "data": [
"view/qweb.xml", "view/qweb.xml",
"view/document_directory.xml", "view/document_directory.xml","view/attachement_view.xml"
], ],
"js": [ "js": [
'static/src/js/document_choose_directory.js', 'static/src/js/document_choose_directory.js',

View File

@ -18,7 +18,11 @@
} }
li.oe_attachment_directory li.oe_attachment_directory
{ {
font-weight: bold;
font-weight : bolder;
font-size: large;
background-color: #CCC;
} }
.openerp .oe_dropdown_menu > li.oe_attachment_directory:hover .openerp .oe_dropdown_menu > li.oe_attachment_directory:hover
{ {
@ -65,5 +69,5 @@ li.oe_attachment_directory
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
margin-right: -5px; margin-right: -5px;
color: brown; color: #2196F3;
} }

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<templates> <templates>
<t t-extend="Sidebar"> <t t-extend="Sidebar">
<!-- t t-jquery=".oe_sidebar_add_attachment" t-operation="before"> --> <t t-jquery=".oe_sidebar_add_attachment span" t-operation="before">
<t t-jquery=".oe_sidebar_add_attachment span" t-operation="before">
<select name="directory_id"> <select name="directory_id">
<option value="" selected="selected">Choose directory</option> <option value="" selected="selected">Choose directory</option>
@ -17,9 +14,11 @@
<t t-jquery=".oe_sidebar_delete_item"> <t t-jquery=".oe_sidebar_delete_item">
this.attr('t-if', "section.name == 'files' and !item.callback and item.classname != 'oe_attachment_directory'"); this.attr('t-if', "section.name == 'files' and !item.callback and item.classname != 'oe_attachment_directory'");
</t> </t>
<t t-jquery="button.oe_dropdown_toggle t[t-if]"> <t t-jquery="button.btn t[t-if]">
this.attr('t-raw', "(widget.items[section.name].length - widget.get_directory_items(widget.items[section.name]).length) || ''"); this.attr('t-raw', "(widget.items[section.name].length - widget.get_directory_items(widget.items[section.name]).length) || ''");
</t> </t>
</t> </t>
</templates> </templates>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<!-- <record id="action_attachment" model="ir.actions.act_window"> <field
name="name">Attachments</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">ir.attachment</field> <field name="view_type">form</field>
<field name="view_id" eval="False"/> <field name="search_view_id" ref="view_attachment_search"/>
<field name="help" type="html"> <p class="oe_view_nocontent_create"> Click
here to create new documents. </p> <p> Also you will find here all the related
documents and download it by clicking on any individual document. </p> </field>
</record> -->
<menuitem name="Attachment Management"
parent ="knowledge.menu_document" id="menu_action_attachment_management_inherits" />
<menuitem name="Attachment" action="base.action_attachment"
parent ="menu_action_attachment_management_inherits" id="menu_action_attachment_inherits" />
</data>
</openerp>