Public release from ruodoo-project: 19.0 - 2026-05-31 21:19:12 UTC

This commit is contained in:
CI Publish Bot
2026-05-31 21:19:21 +00:00
commit aa4214c195
1213 changed files with 183945 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import comment_wizard

View File

@ -0,0 +1,25 @@
# Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class CommentWizard(models.TransientModel):
_name = "comment.wizard"
_description = "Comment Wizard"
validate_reject = fields.Char()
res_model = fields.Char()
res_id = fields.Integer()
review_ids = fields.Many2many(comodel_name="tier.review")
comment = fields.Char(required=True)
def add_comment(self):
self.ensure_one()
rec = self.env[self.res_model].browse(self.res_id)
self.review_ids.write({"comment": self.comment})
if self.validate_reject == "validate":
rec._validate_tier(self.review_ids)
if self.validate_reject == "reject":
rec._rejected_tier(self.review_ids)
rec._update_counter({"review_deleted": True})

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_comment_wizard" model="ir.ui.view">
<field name="name">Comment Wizard</field>
<field name="model">comment.wizard</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Comment">
<group>
<field colspan="2" name="comment" nolabel="1" />
</group>
<footer>
<button
name="add_comment"
string="Comment"
type="object"
class="oe_highlight"
/>
<button special="cancel" string="Cancel" class="oe_link" />
</footer>
</form>
</field>
</record>
</odoo>