Browse Source

[FIX] contract_sale_invoicing

pull/437/head
Maxime Chambreuil 5 years ago
parent
commit
a99f1d3c72
  1. 1
      contract_sale_invoicing/__manifest__.py
  2. 10
      contract_sale_invoicing/models/sale_order.py
  3. 14
      contract_sale_invoicing/views/sale_order.xml

1
contract_sale_invoicing/__manifest__.py

@ -16,5 +16,6 @@
],
'data': [
'views/contract_view.xml',
'views/sale_order.xml',
],
}

10
contract_sale_invoicing/models/sale_order.py

@ -0,0 +1,10 @@
# Copyright (C) 2019 Open Source Integrators
# Copyright (C) 2019 Serpent Consulting Services
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleOrder(models.Model):
_inherit = 'sale.order'
contract_id = fields.Many2one('contract.contract', string='Contract')

14
contract_sale_invoicing/views/sale_order.xml

@ -0,0 +1,14 @@
<odoo>
<record id="view_order_form_form_view" model="ir.ui.view">
<field name="name">sale.order.form.view</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="after">
<field name="contract_id" domain="[('partner_id', '=', partner_id)]"/>
</field>
</field>
</record>
</odoo>
Loading…
Cancel
Save