summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sales_order_koli.py
blob: 02e852569cbce5b80025f18a5318392fd95291d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from odoo import fields, models, api, _
from odoo.exceptions import AccessError, UserError, ValidationError
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
import logging

_logger = logging.getLogger(__name__)


class SalesOrderKoli(models.Model):
    _name = 'sales.order.koli'
    _description = 'Sales Order Koli'
    _order = 'sale_order_id, id'
    _rec_name = 'koli_id'

    sale_order_id = fields.Many2one(
        'sale.order',
        string='Sale Order Reference',
        required=True,
        ondelete='cascade',
        index=True,
        copy=False,
    )
    koli_id = fields.Many2one('check.koli', string='Koli')
    picking_id = fields.Many2one('stock.picking', string='Picking')