chore: import enterprise addons 19.0 bulk snapshot

This commit is contained in:
1b-agent committed 2026-09-16 10:13:08 +00:00
commit ca4af030d3
39951 files changed
+15570005

No files matched your search

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import followup_manual_reminder
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
class Account_FollowupManual_Reminder(models.TransientModel):
_inherit = 'account_followup.manual_reminder'
snailmail = fields.Boolean()
snailmail_cost = fields.Float(string='Stamps', default=1, readonly=True, compute='_compute_snailmail_cost')
@api.depends('snailmail')
def _compute_show_send_button(self):
super()._compute_show_send_button()
for wizard in self:
wizard.show_send_button = wizard.show_send_button or wizard.snailmail
def _get_defaults_from_followup_line(self, followup_line):
defaults = super()._get_defaults_from_followup_line(followup_line)
defaults['print'] = followup_line.send_letter
return defaults
@api.depends('partner_id')
def _compute_snailmail_cost(self):
for record in self:
# We send the letter to the main address of the company (self) and the followup contacts
followup_contacts = record.partner_id._get_all_followup_contacts()
record.snailmail_cost = len(followup_contacts) + 1
def _get_wizard_options(self):
# OVERRIDE account_followup/wizard/followup_manual_reminder.py
options = super()._get_wizard_options()
options['snailmail'] = self.snailmail
return options
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="manual_reminder_view_form_inherit_snailmail" model="ir.ui.view">
<field name="name">account.followup.manual_reminder.view.form.inherit</field>
<field name="model">account_followup.manual_reminder</field>
<field name="inherit_id" ref="account_followup.manual_reminder_view_form"/>
<field name="arch" type="xml">
<div name="options" position="inside">
<field name="snailmail" nolabel="1"/><label for="snailmail" string="By post"/>
<div name="snailmail_cost" invisible="not snailmail" class="text-start d-inline-block">
<field name="snailmail_cost" options="{'digits':[0,0]}" class="mr4 fw-bold"/>
<label for="snailmail_cost" class="mr4 fw-bold"/>
<i class="fa fa-info-circle" role="img" aria-label="Warning"
title="The letter will be sent using the IAP service from Odoo.&#10;Make sure you have enough credits on your account or proceed to a recharge."/>
</div>
</div>
<group name="email_content" position="attributes">
<attribute name="invisible">not print and not email and not snailmail</attribute>
</group>
<group name="attachments" position="attributes">
<attribute name="invisible">not print and not email and not snailmail</attribute>
</group>
</field>
</record>
</data>
</odoo>