Skip to content

Commit f3c3b35

Browse files
committed
[MIG] agreement_legal: Migration to 19.0
Co-authored-by: CRogos <1799080+CRogos@users.noreply.github.com>
1 parent ce9ad24 commit f3c3b35

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

agreement_legal/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"website": "https://github.com/OCA/agreement",
1212
"category": "Partner",
1313
"license": "AGPL-3",
14-
"version": "18.0.1.0.3",
14+
"version": "19.0.1.0.0",
1515
"depends": ["contacts", "agreement", "product", "web"],
1616
"data": [
1717
"data/cron.xml",

agreement_legal/models/agreement.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from lxml import etree
77

8-
from odoo import _, api, fields, models
8+
from odoo import api, fields, models
99

1010

1111
class Agreement(models.Model):
@@ -65,7 +65,7 @@ class Agreement(models.Model):
6565
code = fields.Char(
6666
string="Reference",
6767
required=True,
68-
default=lambda self: _("New"),
68+
default=lambda self: self.env._("New"),
6969
tracking=True,
7070
copy=False,
7171
help="ID used for internal contract tracking.",
@@ -266,7 +266,7 @@ def _alert_to_review_date(self):
266266
agreement.activity_schedule(
267267
"agreement_legal.mail_activity_review_agreement",
268268
user_id=agreement.agreement_type_id.review_user_id.id,
269-
note=_("Your activity is going to end soon"),
269+
note=self.env._("Your activity is going to end soon"),
270270
)
271271

272272
@api.model
@@ -427,7 +427,6 @@ def action_view_agreement(self, agreement):
427427
"res_model": "agreement",
428428
"type": "ir.actions.act_window",
429429
"view_mode": "form",
430-
"view_type": "form",
431430
"res_id": agreement.id,
432431
}
433432

@@ -465,7 +464,7 @@ def copy(self, default=None):
465464
"""Assign a value for code is New"""
466465
default = dict(default or {})
467466
if not default.get("code", False):
468-
default.setdefault("code", _("New"))
467+
default.setdefault("code", self.env._("New"))
469468
res = super().copy(default)
470469
res.sections_ids.mapped("clauses_ids").write({"agreement_id": res.id})
471470
return res

agreement_legal/readme/ROADMAP.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
- Split the module to remove the dependencies on sale and account and
1+
- ~~Split the module to remove the dependencies on sale and account and
22
provide the same feature in extra modules (agreement_sale,
3-
agreement_account, agreement_purchase)
3+
agreement_account, agreement_purchase)~~ Done: sale and account
4+
dependencies have been moved to their respective extra modules
5+
(agreement_sale, agreement_account). No purchase-related features
6+
remain in this module, so agreement_purchase is not needed here.

agreement_legal/views/agreement.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412
<page name="old_versions" string="Revisions">
413413
<field
414414
name="previous_version_agreements_ids"
415-
string="Previouse Versions"
415+
string="Previous Versions"
416416
readonly="1"
417417
>
418418
<list default_order="version desc">

setup/_metapackage/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "odoo-addons-oca-agreement"
33
version = "19.0.20260327.0"
44
dependencies = [
55
"odoo-addon-agreement==19.0.*",
6+
"odoo-addon-agreement-legal==19.0.*",
67
]
78
classifiers=[
89
"Programming Language :: Python",

0 commit comments

Comments
 (0)