Openerp 为什么';在我的Odoo v10视图中有这么多的域工作吗?

Openerp 为什么';在我的Odoo v10视图中有这么多的域工作吗?,openerp,Openerp,在Odoo V10中,我正在编辑默认的sale.order.form.sale.stock。以下是完整的原始视图: <?xml version="1.0" encoding="UTF-8"?> <data> <xpath expr="//button[@name='action_view_invoice']" position="before"> <field name="picking_ids" invisible="1" />

在Odoo V10中,我正在编辑默认的sale.order.form.sale.stock。以下是完整的原始视图:

<?xml version="1.0" encoding="UTF-8"?>
<data>
   <xpath expr="//button[@name='action_view_invoice']" position="before">
      <field name="picking_ids" invisible="1" />
      <button type="object" name="action_view_delivery" class="oe_stat_button" icon="fa-truck" attrs="{'invisible': [('delivery_count', '=', 0)]}" groups="base.group_user">
         <field name="delivery_count" widget="statinfo" string="Delivery" />
      </button>
   </xpath>
   <xpath expr="//group[@name='sales_person']" position="before">
      <group string="Shipping Information" name="sale_shipping">
         <field name="warehouse_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations" />
         <field name="incoterm" widget="selection" groups="base.group_user" />
         <field name="picking_policy" required="True" />
      </group>
   </xpath>
   <xpath expr="//page/field[@name='order_line']/form/group/group/field[@name='tax_id']" position="before">
      <field name="product_tmpl_id" invisible="1" />
      <field name="product_packaging" context="{'default_product_tmpl_id': product_tmpl_id, 'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" domain="[('product_tmpl_id','=',product_tmpl_id)]" groups="product.group_stock_packaging" />
   </xpath>
   <xpath expr="//field[@name='order_line']/form/group/group/field[@name='price_unit']" position="before">
      <field name="route_id" groups="sale_stock.group_route_so_lines" />
   </xpath>
   <xpath expr="//field[@name='order_line']/tree/field[@name='price_unit']" position="before">
      <field name="route_id" groups="sale_stock.group_route_so_lines" />
   </xpath>
</data>
为什么会发生这种错误?sale.order.line对象有一个product\u tmpl\u id字段,为什么我会得到一个错误,它没有该属性

为了澄清,sale.order.form.sale.stock视图继承自基本sale.order.form视图。该视图的内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<form string="Sales Order" class="o_sale_order">
   <header>
      <button name="259" string="Create Invoice" type="action" class="btn-primary" attrs="{'invisible': [('invoice_status', '!=', 'to invoice')]}" />
      <button name="259" string="Create Invoice" type="action" context="{'default_advance_payment_method': 'percentage'}" attrs="{'invisible': ['|',('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}" />
      <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="btn-primary" />
      <button name="print_quotation" string="Print" type="object" states="draft" class="btn-primary" />
      <button name="action_confirm" states="sent" string="Confirm Sale" class="btn-primary o_sale_confirm" type="object" />
      <button name="action_confirm" states="draft" string="Confirm Sale" class="o_sale_confirm" type="object" />
      <button name="print_quotation" string="Print" type="object" states="sent,sale" />
      <button name="action_quotation_send" string="Send by Email" type="object" states="sent,sale" />
      <button name="action_cancel" states="draft,sent,sale" type="object" string="Cancel" />
      <button name="action_draft" states="cancel" type="object" string="Set to Quotation" />
      <button name="action_done" type="object" string="Lock" states="sale" help="If the sale is locked, you can not modify it anymore. However, you will still be able to invoice or deliver." />
      <field name="state" widget="statusbar" statusbar_visible="draft,sent,sale" />
   </header>
   <sheet>
      <div class="oe_button_box" name="button_box">
         <button name="action_view_invoice" type="object" class="oe_stat_button" icon="fa-pencil-square-o" attrs="{'invisible': [('invoice_count', '=', 0)]}">
            <field name="invoice_count" widget="statinfo" string="Invoices" />
         </button>
      </div>
      <div class="oe_title">
         <h1>
            <field name="name" readonly="1" />
         </h1>
      </div>
      <group>
         <group>
            <field name="partner_id" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options="{&amp;quot;always_reload&amp;quot;: True}" />
            <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}" />
            <field name="partner_shipping_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}" />
         </group>
         <group>
            <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}" />
            <field name="validity_date" attrs="{'invisible': [('state', 'in', ['sale', 'done'])]}" />
            <field name="confirmation_date" attrs="{'invisible': [('state', 'in', ['draft', 'sent', 'cancel'])]}" />
            <field name="pricelist_id" groups="product.group_sale_pricelist" />
            <field name="currency_id" invisible="1" />
            <field name="payment_term_id" options="{'no_create': True}" />
         </group>
      </group>
      <notebook>
         <page string="Order Lines">
            <field name="order_line" mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done','cancel'))]}">
               <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}" attrs="{'readonly': ['|', ('qty_invoiced', '&amp;gt;', 0), ('procurement_ids', '!=', [])]}" />
                        <field name="layout_category_id" groups="sale.group_sale_layout" />
                        <field name="invoice_status" invisible="1" />
                        <field name="qty_to_invoice" invisible="1" />
                        <field name="qty_delivered_updateable" invisible="1" />
                        <field name="procurement_ids" invisible="1" />
                        <field name="price_subtotal" invisible="1" />
                        <label for="product_uom_qty" string="Ordered Quantity" />
                        <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" />
                           <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button" attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}" />
                        </div>
                        <label for="qty_delivered" string="Delivered Quantity" invisible="context.get('hide_sale')" />
                        <div invisible="context.get('hide_sale')">
                           <field name="qty_delivered" attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}" />
                        </div>
                        <label for="qty_invoiced" string="Invoiced Quantity" invisible="context.get('hide_sale')" />
                        <div invisible="context.get('hide_sale')">
                           <field name="qty_invoiced" invisible="context.get('hide_sale')" />
                        </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="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                        <label for="customer_lead" />
                        <div>
                           <field name="customer_lead" class="oe_inline" />
                           days
                        </div>
                        <label for="analytic_tag_ids" />
                        <div>
                           <field name="analytic_tag_ids" widget="many2many_tags" />
                        </div>
                     </group>
                  </group>
                  <label for="name" />
                  <field name="name" />
                  <div groups="base.group_no_one">
                     <label for="invoice_lines" />
                     <field name="invoice_lines" />
                  </div>
                  <field name="state" invisible="1" />
               </form>
               <tree string="Sales Order Lines" editable="bottom" decoration-info="invoice_status=='to invoice'">
                  <field name="sequence" widget="handle" />
                  <field name="product_id" attrs="{'readonly': ['|', ('qty_invoiced', '&amp;gt;', 0), ('procurement_ids', '!=', [])]}" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />
                  <field name="layout_category_id" groups="sale.group_sale_layout" />
                  <field name="name" />
                  <field name="product_uom_qty" string="Ordered Qty" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />
                  <field name="qty_delivered" invisible="context.get('hide_sale')" attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}" />
                  <field name="qty_invoiced" invisible="context.get('hide_sale')" />
                  <field name="qty_to_invoice" invisible="1" />
                  <field name="product_uom" attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}" context="{'company_id': parent.company_id}" groups="product.group_uom" options="{&amp;quot;no_open&amp;quot;: True}" />
                  <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" />
                  <field name="price_unit" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                  <field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                  <field name="discount" groups="sale.group_discount_per_so_line" />
                  <field name="price_subtotal" widget="monetary" groups="sale.group_show_price_subtotal" />
                  <field name="price_total" widget="monetary" groups="sale.group_show_price_total" />
                  <field name="qty_delivered_updateable" invisible="1" />
                  <field name="procurement_ids" invisible="1" />
                  <field name="state" invisible="1" />
                  <field name="invoice_status" invisible="1" />
                  <field name="customer_lead" invisible="1" />
               </tree>
               <kanban class="o_kanban_mobile">
                  <field name="product_id" />
                  <field name="product_uom_qty" />
                  <field name="product_uom" groups="product.group_uom" />
                  <field name="price_subtotal" />
                  <templates>
                     <t t-name="kanban-box">
                        <div t-attf-class="oe_kanban_card oe_kanban_global_click">
                           <div class="row">
                              <div class="col-xs-12">
                                 <strong>
                                    <span>
                                       <t t-esc="record.product_id.value" />
                                    </span>
                                 </strong>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-xs-8 text-muted">
                                 <span>
                                    <t t-esc="record.product_uom_qty.value" />
                                    <t t-esc="record.product_uom.value" />
                                 </span>
                              </div>
                              <div class="col-xs-4 text-muted">
                                 <span class="pull-right text-right">
                                    <t t-esc="record.price_subtotal.value" />
                                 </span>
                              </div>
                           </div>
                        </div>
                     </t>
                  </templates>
               </kanban>
            </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 o_td_label">
                  <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>
            <field name="note" class="oe_inline" placeholder="Setup default terms and conditions in your company settings." />
            <div class="oe_clear" />
         </page>
         <page string="Other Information">
            <group>
               <group string="Sales Information" name="sales_person">
                  <field name="user_id" />
                  <field name="team_id" options="{'no_create': True}" />
                  <field name="client_order_ref" />
                  <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company" />
                  <field name="project_id" attrs="{'invisible':[('state','=','sale')]}" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" groups="analytic.group_analytic_accounting" />
                  <field name="related_project_id" attrs="{'readonly': ['|',('project_id','!=',False),('invoice_count','!=',0),('state','=','sale')],'invisible':[('state','!=','sale')]}" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" groups="analytic.group_analytic_accounting" />
               </group>
               <group name="sale_pay" string="Invoicing">
                  <field name="fiscal_position_id" options="{'no_create': True}" />
                  <field name="invoice_status" attrs="{'invisible': [('state', 'not in', ('sale','done'))]}" />
               </group>
               <group string="Reporting" name="technical" groups="base.group_no_one">
                  <field groups="base.group_no_one" name="origin" />
               </group>
            </group>
         </page>
      </notebook>
   </sheet>
   <div class="oe_chatter">
      <field name="message_follower_ids" widget="mail_followers" />
      <field name="message_ids" widget="mail_thread" />
   </div>
</form>

%
天



我猜
产品\u tmpl\u id
没有定义为
sale.order.line
嵌入式树状视图中的字段。您可以看到,该定义仅适用于上面的一些行:


...
因此,您需要做的是继承原始视图并将其扩展为:


路由上的域\u id
销售订单
[(‘产品标识’、‘in’、产品标识)]

我是奥多的新手。你有没有办法添加更多的细节来解释答案?例如,您在原始视图中引用的这一行
不应该定义
产品\u tmpl\u id
字段吗?如果没有,那条线在做什么?好的,对于初学者来说这可能很难理解。
sale.order
的表单视图为其模型
sale.order.line
的订单行嵌入了两个视图。您的问题和我的回答中引用的扩展视图仅扩展了
sale.order.line
的嵌入表单视图,该视图带有
product\u tmpl\u id
。因此,在嵌入式树状视图的上下文中,您正试图使用field
route\u id
上的域对其进行操作,而Odoo不知道field
product\u tmpl\u id
。这就是我建议对其进行定义的原因。您能否解释一下
元素与
sale.order.form
视图中的
元素之间的区别?它们似乎包含许多相同的字段。它们各自有不同的用途吗?
Uncaught Error: AttributeError: object has no attribute 'product_tmpl_id'
<?xml version="1.0" encoding="UTF-8"?>
<form string="Sales Order" class="o_sale_order">
   <header>
      <button name="259" string="Create Invoice" type="action" class="btn-primary" attrs="{'invisible': [('invoice_status', '!=', 'to invoice')]}" />
      <button name="259" string="Create Invoice" type="action" context="{'default_advance_payment_method': 'percentage'}" attrs="{'invisible': ['|',('invoice_status', '!=', 'no'), ('state', '!=', 'sale')]}" />
      <button name="action_quotation_send" string="Send by Email" type="object" states="draft" class="btn-primary" />
      <button name="print_quotation" string="Print" type="object" states="draft" class="btn-primary" />
      <button name="action_confirm" states="sent" string="Confirm Sale" class="btn-primary o_sale_confirm" type="object" />
      <button name="action_confirm" states="draft" string="Confirm Sale" class="o_sale_confirm" type="object" />
      <button name="print_quotation" string="Print" type="object" states="sent,sale" />
      <button name="action_quotation_send" string="Send by Email" type="object" states="sent,sale" />
      <button name="action_cancel" states="draft,sent,sale" type="object" string="Cancel" />
      <button name="action_draft" states="cancel" type="object" string="Set to Quotation" />
      <button name="action_done" type="object" string="Lock" states="sale" help="If the sale is locked, you can not modify it anymore. However, you will still be able to invoice or deliver." />
      <field name="state" widget="statusbar" statusbar_visible="draft,sent,sale" />
   </header>
   <sheet>
      <div class="oe_button_box" name="button_box">
         <button name="action_view_invoice" type="object" class="oe_stat_button" icon="fa-pencil-square-o" attrs="{'invisible': [('invoice_count', '=', 0)]}">
            <field name="invoice_count" widget="statinfo" string="Invoices" />
         </button>
      </div>
      <div class="oe_title">
         <h1>
            <field name="name" readonly="1" />
         </h1>
      </div>
      <group>
         <group>
            <field name="partner_id" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options="{&amp;quot;always_reload&amp;quot;: True}" />
            <field name="partner_invoice_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'invoice'}" />
            <field name="partner_shipping_id" groups="sale.group_delivery_invoice_address" context="{'default_type':'delivery'}" />
         </group>
         <group>
            <field name="date_order" attrs="{'invisible': [('state', 'in', ['sale', 'done', 'cancel'])]}" />
            <field name="validity_date" attrs="{'invisible': [('state', 'in', ['sale', 'done'])]}" />
            <field name="confirmation_date" attrs="{'invisible': [('state', 'in', ['draft', 'sent', 'cancel'])]}" />
            <field name="pricelist_id" groups="product.group_sale_pricelist" />
            <field name="currency_id" invisible="1" />
            <field name="payment_term_id" options="{'no_create': True}" />
         </group>
      </group>
      <notebook>
         <page string="Order Lines">
            <field name="order_line" mode="tree,kanban" attrs="{'readonly': [('state', 'in', ('done','cancel'))]}">
               <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}" attrs="{'readonly': ['|', ('qty_invoiced', '&amp;gt;', 0), ('procurement_ids', '!=', [])]}" />
                        <field name="layout_category_id" groups="sale.group_sale_layout" />
                        <field name="invoice_status" invisible="1" />
                        <field name="qty_to_invoice" invisible="1" />
                        <field name="qty_delivered_updateable" invisible="1" />
                        <field name="procurement_ids" invisible="1" />
                        <field name="price_subtotal" invisible="1" />
                        <label for="product_uom_qty" string="Ordered Quantity" />
                        <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" />
                           <field name="product_uom" groups="product.group_uom" class="oe_inline oe_no_button" attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}" />
                        </div>
                        <label for="qty_delivered" string="Delivered Quantity" invisible="context.get('hide_sale')" />
                        <div invisible="context.get('hide_sale')">
                           <field name="qty_delivered" attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}" />
                        </div>
                        <label for="qty_invoiced" string="Invoiced Quantity" invisible="context.get('hide_sale')" />
                        <div invisible="context.get('hide_sale')">
                           <field name="qty_invoiced" invisible="context.get('hide_sale')" />
                        </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="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                        <label for="customer_lead" />
                        <div>
                           <field name="customer_lead" class="oe_inline" />
                           days
                        </div>
                        <label for="analytic_tag_ids" />
                        <div>
                           <field name="analytic_tag_ids" widget="many2many_tags" />
                        </div>
                     </group>
                  </group>
                  <label for="name" />
                  <field name="name" />
                  <div groups="base.group_no_one">
                     <label for="invoice_lines" />
                     <field name="invoice_lines" />
                  </div>
                  <field name="state" invisible="1" />
               </form>
               <tree string="Sales Order Lines" editable="bottom" decoration-info="invoice_status=='to invoice'">
                  <field name="sequence" widget="handle" />
                  <field name="product_id" attrs="{'readonly': ['|', ('qty_invoiced', '&amp;gt;', 0), ('procurement_ids', '!=', [])]}" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />
                  <field name="layout_category_id" groups="sale.group_sale_layout" />
                  <field name="name" />
                  <field name="product_uom_qty" string="Ordered Qty" context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom, 'company_id': parent.company_id}" />
                  <field name="qty_delivered" invisible="context.get('hide_sale')" attrs="{'readonly': [('qty_delivered_updateable', '=', False)]}" />
                  <field name="qty_invoiced" invisible="context.get('hide_sale')" />
                  <field name="qty_to_invoice" invisible="1" />
                  <field name="product_uom" attrs="{'readonly': [('state', 'in', ('sale','done', 'cancel'))]}" context="{'company_id': parent.company_id}" groups="product.group_uom" options="{&amp;quot;no_open&amp;quot;: True}" />
                  <field name="analytic_tag_ids" groups="analytic.group_analytic_accounting" widget="many2many_tags" />
                  <field name="price_unit" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                  <field name="tax_id" widget="many2many_tags" domain="[('type_tax_use','=','sale'),('company_id','=',parent.company_id)]" attrs="{'readonly': [('qty_invoiced', '&amp;gt;', 0)]}" />
                  <field name="discount" groups="sale.group_discount_per_so_line" />
                  <field name="price_subtotal" widget="monetary" groups="sale.group_show_price_subtotal" />
                  <field name="price_total" widget="monetary" groups="sale.group_show_price_total" />
                  <field name="qty_delivered_updateable" invisible="1" />
                  <field name="procurement_ids" invisible="1" />
                  <field name="state" invisible="1" />
                  <field name="invoice_status" invisible="1" />
                  <field name="customer_lead" invisible="1" />
               </tree>
               <kanban class="o_kanban_mobile">
                  <field name="product_id" />
                  <field name="product_uom_qty" />
                  <field name="product_uom" groups="product.group_uom" />
                  <field name="price_subtotal" />
                  <templates>
                     <t t-name="kanban-box">
                        <div t-attf-class="oe_kanban_card oe_kanban_global_click">
                           <div class="row">
                              <div class="col-xs-12">
                                 <strong>
                                    <span>
                                       <t t-esc="record.product_id.value" />
                                    </span>
                                 </strong>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-xs-8 text-muted">
                                 <span>
                                    <t t-esc="record.product_uom_qty.value" />
                                    <t t-esc="record.product_uom.value" />
                                 </span>
                              </div>
                              <div class="col-xs-4 text-muted">
                                 <span class="pull-right text-right">
                                    <t t-esc="record.price_subtotal.value" />
                                 </span>
                              </div>
                           </div>
                        </div>
                     </t>
                  </templates>
               </kanban>
            </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 o_td_label">
                  <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>
            <field name="note" class="oe_inline" placeholder="Setup default terms and conditions in your company settings." />
            <div class="oe_clear" />
         </page>
         <page string="Other Information">
            <group>
               <group string="Sales Information" name="sales_person">
                  <field name="user_id" />
                  <field name="team_id" options="{'no_create': True}" />
                  <field name="client_order_ref" />
                  <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company" />
                  <field name="project_id" attrs="{'invisible':[('state','=','sale')]}" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" groups="analytic.group_analytic_accounting" />
                  <field name="related_project_id" attrs="{'readonly': ['|',('project_id','!=',False),('invoice_count','!=',0),('state','=','sale')],'invisible':[('state','!=','sale')]}" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" groups="analytic.group_analytic_accounting" />
               </group>
               <group name="sale_pay" string="Invoicing">
                  <field name="fiscal_position_id" options="{'no_create': True}" />
                  <field name="invoice_status" attrs="{'invisible': [('state', 'not in', ('sale','done'))]}" />
               </group>
               <group string="Reporting" name="technical" groups="base.group_no_one">
                  <field groups="base.group_no_one" name="origin" />
               </group>
            </group>
         </page>
      </notebook>
   </sheet>
   <div class="oe_chatter">
      <field name="message_follower_ids" widget="mail_followers" />
      <field name="message_ids" widget="mail_thread" />
   </div>
</form>