Customer to client in py updated
This commit is contained in:
parent
5b7847e84f
commit
c1e68502b0
|
@ -7,3 +7,4 @@ from . import project_overview
|
|||
from . import analytic
|
||||
from . import product
|
||||
from . import hr_employee
|
||||
from . import sale
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
|
||||
|
||||
class SaleInherit(models.Model):
|
||||
_inherit = 'sale.order'
|
||||
|
||||
partner_id = fields.Many2one(
|
||||
'res.partner', string='Client', readonly=True,
|
||||
states={'draft': [('readonly', False)], 'sent': [('readonly', False)]},
|
||||
required=True, change_default=True, index=True, tracking=1,
|
||||
domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]",)
|
|
@ -6,11 +6,11 @@
|
|||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="replace">
|
||||
<!--<xpath expr="//field[@name='partner_id']" position="replace">
|
||||
<field name="partner_id" widget="res_partner_many2one" string="Client" required="1"
|
||||
context="{'res_partner_search_mode': 'customer', 'show_address': 1, 'show_vat': True}"
|
||||
options='{"always_reload": True}'/>
|
||||
</xpath>
|
||||
</xpath>-->
|
||||
<xpath expr="//field[@name='require_signature']" position="replace">
|
||||
<field name="require_signature" invisible="1"/>
|
||||
</xpath>
|
||||
|
|
Loading…
Reference in New Issue