如何在没有继承的情况下通过新文件创建报价视图?

时间:2016-09-05 15:53:53

标签: python openerp views odoo-8

我通过我的客户门户网站的新文件创建了新的报价视图,但它覆盖了管理员网站中的原始报价视图。我只需要为客户门户网站提供此视图。我已经申请了group.group_portal'但它不起作用,仍然压倒原始观点。有没有办法解决这个问题?在此先感谢...



<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
        <record id="renegade_portal_view_order_form" model="ir.ui.view">
            <field name="name">renegade.portal.sale.order.form</field>
            <field name="model">sale.order</field>
            <field name="groups_id" eval="[(4,ref('base.group_portal'))]"/>
            <field eval="1" name="priority"/>
            <field name="arch" type="xml">
                <form string="Sales Order">
                <sheet>
                    <h1>
                        <label string="Quotation" attrs="{'invisible': [('state','not in',('draft','sent'))]}"/>
                        <label string="Sales Order " attrs="{'invisible': [('state','in',('draft','sent'))]}"/>
                        <field name="name" class="oe_inline" readonly="1"/>
                    </h1>
                    <group>
                        <group>
                            <field name="state" invisible="1"/>
                            <field name="partner_id" on_change="onchange_partner_id(partner_id, context)" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options="{'no_open': True}" readonly="1"/>
                            <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}"/>
                            <field name="partner_shipping_id" on_change="onchange_delivery_id(company_id, partner_id, partner_shipping_id, fiscal_position)" context="{'default_type':'delivery','default_parent_id':partner_id}" options="{'no_open': True}"/>
                            <field name="project_id" context="{'partner_id':partner_invoice_id, 'manager_id': user_id, 'default_pricelist_id':pricelist_id, 'default_name':name, 'default_type': 'contract'}" groups="sale.group_analytic_accounting" domain="[('type','in',['view','normal','contract'])]"/>
                        </group>
                        <group>
                            <field name="date_order"/>
                            <field name="client_order_ref"/>
                            <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
                            <field name="currency_id" invisible="1"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Order Lines">
                            <field name="order_line">
                                <form string="Sales Order Lines">
                                    <group>
                                        <group>
                                            <field name="product_id"
                                                context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}"
                                                groups="base.group_user"
                                                on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
                                            <label for="product_uom_qty"/>
                                            <div>
                                                <field
                                                    context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'uom_qty_change':True, 'company_id': parent.company_id}"
                                                    name="product_uom_qty" class="oe_inline"
                                                    on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
                                                <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button"
                                                    context="{'company_id': parent.company_id}"
                                                    on_change="onchange_product_uom(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, parent.fiscal_position, context)"/>
                                            </div>
                                            <label for="product_uos_qty" groups="product.group_uos"/>
                                            <div groups="product.group_uos">
                                                <field name="product_uos_qty" class="oe_inline"/>
                                                <field name="product_uos" options='{"no_open": True}' class="oe_inline"/>
                                            </div>
                                            <field name="price_unit"/>
                                            <label for="discount" groups="sale.group_discount_per_so_line"/>
                                            <div name="discount" groups="sale.group_discount_per_so_line">
                                                <field name="discount" class="oe_inline"/> %%
                                            </div>
                                        </group>
                                        <group>
                                            <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
                                            <field name="th_weight"/>
                                            <!-- we should put a config wizard for these two fields -->
                                            <field name="address_allotment_id"/>
                                        </group>
                                    </group>
                                    <label for="name"/>
                                    <field name="name"/>
                                    <div groups="base.group_no_one">
                                        <label for="invoice_lines"/>
                                        <field name="invoice_lines"/>
                                    </div>
                                </form>
                                <tree string="Sales Order Lines" editable="bottom">
                                    <field name="sequence" widget="handle"/>
                                    <field name="state" invisible="1"/>
                                    <field name="th_weight" invisible="1"/>
                                    <field name="product_id"
                                        context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}"
                                        on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, False, product_uos_qty, False, name, parent.partner_id, False, True, parent.date_order, False, parent.fiscal_position, False, context)"/>
                                    <field name="name"/>
                                    <field name="product_uom_qty"
                                        context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}"
                                        on_change="product_id_change(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, False, parent.fiscal_position, True, context)"/>
                                    <field name="product_uom"
                                        context="{'company_id': parent.company_id}"
                                        on_change="onchange_product_uom(parent.pricelist_id, product_id, product_uom_qty, product_uom, product_uos_qty, product_uos, name, parent.partner_id, False, False, parent.date_order, parent.fiscal_position, context)"
                                        groups="product.group_uom" options='{"no_open": True}'/>
                                    <field name="product_uos_qty" groups="product.group_uos" invisible="1"/>
                                    <field name="product_uos" string="UoS" groups="product.group_uos" invisible="1"/>
                                    <field name="price_unit"/>
                                    <field name="tax_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
                                    <field name="discount" groups="sale.group_discount_per_so_line"/>
                                    <field name="price_subtotal"/>
                                </tree>
                            </field>
                            <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
                                <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <div class="oe_subtotal_footer_separator oe_inline">
                                    <label for="amount_total" />
                                    <button name="button_dummy"
                                        states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
                                </div>
                                <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                            </group>
                            <div class="oe_clear"/>
                            <field name="note" class="oe_inline" placeholder="Terms and conditions..."/>
                        </page>
                        <page string="Other Information" groups="base.group_user">
                            <group>
                                <group name="sales_person" groups="base.group_user">
                                    <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice', 'base.group_sale_salesman_all_leads']}"/>
                                    <field name="section_id" options="{'no_create': True}" groups="base.group_multi_salesteams"/>
                                    <field groups="base.group_no_one" name="origin"/>
                                </group>
                                <group name="sale_pay">
                                    <field name="payment_term" options="{'no_create': True}"/>
                                    <field name="fiscal_position" options="{'no_create': True}"
                                        on_change="onchange_fiscal_position(fiscal_position, order_line, context)"/>
                                    <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                                </group>
                                <group>
                                    <field name="invoiced"/>
                                    <field name="invoice_exists" invisible="1"/>
                                </group>
                            </group>
                        </page>
                    </notebook>
                </sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
                    <field name="message_ids" widget="mail_thread"/>
                </div>
                </form>
            </field>
        </record>

        <!--<record model="ir.actions.act_window" id="quotations_action_test">
            <field name="name">Test Quotations</field>
            <field name="res_model">sale.order</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
            <field name="domain">[('state', 'not in', ('confirmed', 'done', 'cancel'))]</field>
            <field name="groups_id" eval="[(4,ref('base.group_portal'))]"/>
        </record>
        <menuitem id="quotations_action_test_menu" name="Test Quotations" parent="portal.portal_orders"
            action="quotations_action_test" sequence="11" groups="base.group_portal"/>-->
    </data>
</openerp>
&#13;
&#13;
&#13;

0 个答案:

没有答案