19 lines
458 B
Python
19 lines
458 B
Python
from odoo import models
|
|
|
|
|
|
class SaleOrder(models.Model):
|
|
_inherit = "sale.order"
|
|
|
|
def action_duplicate_order(self):
|
|
self.ensure_one()
|
|
action = (
|
|
self.env.ref(
|
|
"bemade_quotation_alternative.sale_order_duplication_wizard_action"
|
|
)
|
|
.sudo()
|
|
.read()[0]
|
|
)
|
|
action["context"] = {
|
|
"default_original_order_id": self.id,
|
|
}
|
|
return action
|