Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
from . import sale_invoice_frequency
from . import res_partner
from . import sale_order

View File

@@ -0,0 +1,19 @@
# Copyright 2023 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo import api, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
invoice_frequency_id = fields.Many2one(
comodel_name="sale.invoice.frequency",
string="Invoicing frequency",
help="Invoicing frequency for this customer",
)
@api.model
def _commercial_fields(self):
return super()._commercial_fields() + ["invoice_frequency_id"]

View File

@@ -0,0 +1,14 @@
# Copyright 2023 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo import fields, models
class SaleInvoiceFrequency(models.Model):
_name = "sale.invoice.frequency"
_description = "Invoicing frequency for Customers"
name = fields.Char(
translate=True,
)

View File

@@ -0,0 +1,23 @@
# Copyright 2023 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
invoice_frequency_id = fields.Many2one(
comodel_name="sale.invoice.frequency",
string="Invoicing frequency",
compute="_compute_invoice_frequency",
store=True,
readonly=False,
help="Invoicing frequency for this order",
)
@api.depends("partner_id")
def _compute_invoice_frequency(self):
for record in self:
record.invoice_frequency_id = record.partner_id.invoice_frequency_id