mirror of
https://gitlab.com/sonalarora/tra_backend.git
synced 2025-12-18 10:49:11 +02:00
work on diet plan
This commit is contained in:
15
diet_template/models/sale_order.py
Normal file
15
diet_template/models/sale_order.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user