mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-17 18:29:08 +02:00
16 lines
349 B
Python
16 lines
349 B
Python
# See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
class SaleOrder(models.Model):
|
|
|
|
_inherit = 'sale.order'
|
|
|
|
@api.model
|
|
def create(self, values):
|
|
rec = super(SaleOrder, self).create(values)
|
|
if self._context.get("is_diet_sale"):
|
|
rec.action_confirm()
|
|
return rec
|