mirror of
https://github.com/bringout/oca-purchase.git
synced 2026-04-21 13:02:03 +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,26 @@
|
|||
# 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 api, fields, models
|
||||
|
||||
|
||||
class PurchaseOrderLine(models.Model):
|
||||
_inherit = ["purchase.order.line", "base.exception.method"]
|
||||
_name = "purchase.order.line"
|
||||
|
||||
ignore_exception = fields.Boolean(
|
||||
related="order_id.ignore_exception", store=True, string="Ignore Exceptions"
|
||||
)
|
||||
|
||||
def _get_main_records(self):
|
||||
return self.mapped("order_id")
|
||||
|
||||
@api.model
|
||||
def _reverse_field(self):
|
||||
return "purchase_ids"
|
||||
|
||||
def _detect_exceptions(self, rule):
|
||||
records = super()._detect_exceptions(rule)
|
||||
return records.mapped("order_id")
|
||||
Loading…
Add table
Add a link
Reference in a new issue