Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

openerp how to modify base.xml

By
rihene
on 5/2/14, 8:04 AM 1,408 views

Hi everyone!! Im trying to add a button in the first page of openerp( which exists in the base.xml) to get a new form but what i am unable to understand is the code source so please help me i need an answr as soon as possible :(

can u paste your code ?

Jagdish Panchal
on 5/2/14, 8:10 AM
0
rihene
On 5/2/14, 8:11 AM

<t t-name="AccountManager">

<form id="account_create" name="create_account_form" style="display: block;">

Create a New Account

Fill in this form to create an OpenERP account. Once the database is created, you will be able to install your first application.

               <tr>
                    <td><label for="company_telephone">Select a company telephone:</label></td>
                    <td>
                        <input type="text" name="company_telephone" class="required" matches="^[a-zA-Z0-9][a-zA-Z0-9_-]+$" autofocus="true" placeholder="e.g. myaddress"/> 
                    </td>
                </tr>
                <tr>
                    <td><label for="create_admin_pwd">Choose a password:</label></td>
                    <td><input type="password" name="create_admin_pwd" class="required" /></td>
                </tr>
                <tr>
                    <td><label for="create_confirm_pwd">Confirm password:</label></td>
                    <td><input type="password" name="create_confirm_pwd" class="required" equalTo="input[name=create_admin_pwd]"/></td>
                </tr>
                <tr>
                    <td></td>
                    <td><button type="submit" class="oe_button oe_highlight db_create">Create Account</button></td>
                </tr>
            </table>
        </form>
        <form id="db_duplicate" name="duplicate_db_form" style="display: none;">
            <div class="oe_view_manager oe_view_manager_current">
                <div class="oe_view_manager_header" style="padding: 8px;">
                    <div class="oe_header_row">
                        <h2 class="oe_view_title">
                            <span class="oe_view_title_text oe_breadcrumb_title">Duplicate Database</span>
                        </h2>
                        <button type="submit" class="oe_button oe_highlight db_duplicate">Duplicate</button>
                    </div>
                </div>
            </div>
            <table align="center" class="db_option_table">
                <tr>
                    <td><label for="super_admin_pwd">Master password:</label></td>
                    <td><input type="password" name="super_admin_pwd" class="required" value="admin" /></td>
                </tr>
                <tr>
                    <td><label for="db_original_name">Original database name:</label></td>
                    <td><input type="text" name="db_original_name" class="required" matches="^[a-zA-Z][a-zA-Z0-9_-]+$" autofocus="true"/></td>
                </tr>
                <tr>
                    <td><label for="db_name">New database name:</label></td>
                    <td><input type="text" name="db_name" class="required" matches="^[a-zA-Z][a-zA-Z0-9_-]+$" /></td>
                </tr>
            </table>
        </form>
        <form id="db_drop" name="drop_db_form" style="display: none; ">
            <div class="oe_view_manager oe_view_manager_current">
                <div class="oe_view_manager_header" style="padding: 8px;">
                    <div class="oe_header_row">
                        <h2 class="oe_view_title">
                            <span class="oe_view_title_text oe_breadcrumb_title">Drop Database</span>
                        </h2>
                        <button type="submit" class="oe_button oe_highlight db_drop">Drop</button>
                    </div>
                </div>
            </div>
            <table align="center" class="db_option_table">
                <tr>
                    <td><label for="drop_db">Database:</label></td>
                    <td class="oe_form_field oe_form_field_selection">
                        <select t-if="widget.db_list" name="drop_db" autofocus="autofocus">
                            <t t-foreach="widget.db_list" t-as="db">
                                <option t-att-value="db">
                                    <t t-esc="db" />
                                </option>
                            </t>
                        </select>
                        <input t-if="!widget.db_list" name="drop_db" class="required" type="text" autofocus="autofocus"/>
                    </td>
                </tr>
                <tr>
                    <td><label for="drop_password">Master Password:</label></td>
                    <td><input type="password" name="drop_pwd" class="required" /></td>
                </tr>
            </table>
        </form>
        <form id="db_backup" name="backup_db_form" target="backup-target" action="/web/database/backup" style="display: none;">
            <div class="oe_view_manager oe_view_manager_current">
                <div class="oe_view_manager_header" style="padding: 8px;">
                    <div class="oe_header_row">
                        <h2 class="oe_view_title">
                            <span class="oe_view_title_text oe_breadcrumb_title">Backup Database</span>
                        </h2>
                        <button type="submit" class="oe_button oe_highlight db_backup">Backup</button>
                    </div>
                </div>
            </div>
            <input type="hidden" name="token" />
            <table align="center" class="db_option_table">
                <tr>
                    <td><label for="backup_db">Database:</label></td>
                    <td class="oe_form_field oe_form_field_selection ">
                        <select t-if="widget.db_list" name="backup_db" autofocus="autofocus">
                            <t t-foreach="widget.db_list" t-as="db">
                                <option t-att-value="db">
                                    <t t-esc="db" />
                                </option>
                            </t>
                        </select>
                        <input t-if="!widget.db_list" name="backup_db" class="required" type="text" autofocus="autofocus"/>
                    </td>
                </tr>
                <tr>
                    <td><label for="backup_pwd">Master Password:</label></td>
                    <td><input type="password" name="backup_pwd" class="required" /></td>
                </tr>
            </table>
        </form>
        <form id="db_restore" name="restore_db_form" style="display: none; ">
            <div class="oe_view_manager oe_view_manager_current">
                <div class="oe_view_manager_header" style="padding: 8px;">
                    <div class="oe_header_row">
                        <h2 class="oe_view_title">
                            <span class="oe_view_title_text oe_breadcrumb_title">Restore Database</span>
                        </h2>
                        <button type="submit" class="oe_button oe_highlight db_restore">Restore</button>
                    </div>
                </div>
            </div>
            <table align="center" class="db_option_table">
                <tr>
                    <td><label for="restore_db">File:</label></td>
                    <td><input type="file" name="db_file" class="required" autofocus="autofocus"/></td>
                </tr>
                <tr>
                    <td><label for="restore_pwd">Master Password:</label></td>
                    <td><input type="password" name="restore_pwd" class="required"/></td>
                </tr>
                <tr>
                    <td><label for="new_db">New database name:</label></td>
                    <td><input type="text" name="new_db" class="required"/></td>
                </tr>
            </table>
        </form>
        <form id="db_change_password" name="change_pwd_form" style="display: none;">
            <div class="oe_view_manager oe_view_manager_current">
                <div class="oe_view_manager_header" style="padding: 8px;">
                    <div class="oe_header_row">
                        <h2 class="oe_view_title">
                            <span class="oe_view_title_text oe_breadcrumb_title">Change Master Password</span>
                        </h2>
                        <button type="submit" class="oe_button oe_highlight db-change-password">Change Password</button>
                    </div>
                </div>
            </div>
            <table align="center" class="db_option_table">
                <tr>
                    <td><label for="old_pwd">Master password:</label></td>
                    <td><input type="password" name="old_pwd" class="required" minlength="1" autofocus="autofocus"/></td>
                </tr>
                <tr>
                    <td><label for="new_pwd">New master password:</label></td>
                    <td><input type="password" name="new_pwd" class="required" minlength="1"/></td>
                </tr>
                <tr>
                    <td><label for="confirm_pwd">Confirm new master password:</label></td>
                    <td><input type="password" name="confirm_pwd" class="required" equalTo="input[name=new_pwd]" minlength="1"/> </td>
                </tr>
            </table>
        </form>
    </div>
</div>

</t>

<t t-name="AccountManager.user_menu"> Back to Login </t> <t t-name="AccountManager.menu">

Module Management
</t>

<label for="company_name">Select a company name:</label> <input type="text" name="company_name" class="required" matches="^[a-zA-Z0-9][a-zA-Z0-9_-]+$" autofocus="true" placeholder="e.g. mycompany"/>
<label for="company_address">Select a company address:</label> <input type="text" name="company_address" class="required" matches="^[a-zA-Z0-9][a-zA-Z0-9_-]+$" autofocus="true" placeholder="e.g. myaddress"/>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/2/14, 8:04 AM
Seen: 1408 times
Last updated: 3/16/15, 8:10 AM