mirror of
https://github.com/bringout/oca-purchase.git
synced 2026-04-21 02:02:07 +02:00
Add oca-purchase submodule with 96 purchase modules moved from oca-workflow-process
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b0628ee8ea
commit
7378b233e9
3994 changed files with 334316 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import purchase_exception_confirm
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright 2017 Akretion (http://www.akretion.com)
|
||||
# Copyright 2020 Camptocamp SA
|
||||
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PurchaseExceptionConfirm(models.TransientModel):
|
||||
_name = "purchase.exception.confirm"
|
||||
_description = "Purchase exception wizard"
|
||||
_inherit = ["exception.rule.confirm"]
|
||||
|
||||
related_model_id = fields.Many2one("purchase.order", "Purchase")
|
||||
|
||||
def action_confirm(self):
|
||||
self.ensure_one()
|
||||
exceptions_blocking = self.exception_ids.filtered("is_blocking")
|
||||
if self.ignore and not exceptions_blocking:
|
||||
self.related_model_id.button_draft()
|
||||
self.related_model_id.ignore_exception = True
|
||||
self.related_model_id.button_confirm()
|
||||
else:
|
||||
self.related_model_id.ignore_exception = False
|
||||
return super().action_confirm()
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="action_purchase_exception_confirm" model="ir.actions.act_window">
|
||||
<field name="name">Outstanding exceptions to manage</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">purchase.exception.confirm</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="base_exception.view_exception_rule_confirm" />
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue