File tree Expand file tree Collapse file tree 9 files changed +39
-154
lines changed Expand file tree Collapse file tree 9 files changed +39
-154
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,16 @@ Contributors
85
85
86
86
- Maxime Franco
87
87
88
+ - `Trobz <https://www.trobz.com/ >`__:
89
+
90
+
91
+
92
+ Other credits
93
+ -------------
94
+
95
+ The migration of this module from 17.0 to 18.0 was financially supported
96
+ by Camptocamp.
97
+
88
98
Maintainers
89
99
-----------
90
100
Original file line number Diff line number Diff line change 4
4
{
5
5
"name" : "Agreement" ,
6
6
"summary" : "Adds an agreement object" ,
7
- "version" : "17 .0.1.0.0" ,
7
+ "version" : "18 .0.1.0.0" ,
8
8
"category" : "Contract" ,
9
9
"author" : "Akretion, "
10
10
"Yves Goldberg (Ygol Internetwork), "
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class Agreement(models.Model):
26
26
)
27
27
is_template = fields .Boolean (
28
28
string = "Is a Template?" ,
29
- default = False ,
30
29
copy = False ,
31
30
help = "Set if the agreement is a template. "
32
31
"Template agreements don't require a partner." ,
@@ -63,14 +62,9 @@ def _compute_domain(self):
63
62
else :
64
63
rec .domain = "sale"
65
64
66
- def name_get (self ):
67
- res = []
68
- for agr in self :
69
- name = agr .name
70
- if agr .code :
71
- name = f"[{ agr .code } ] { agr .name } "
72
- res .append ((agr .id , name ))
73
- return res
65
+ def _compute_display_name (self ):
66
+ for rec in self :
67
+ rec .display_name = f"[{ rec .code } ] { rec .name } "
74
68
75
69
_sql_constraints = [
76
70
(
Original file line number Diff line number Diff line change 13
13
- [ Acsone] ( https://www.acsone.eu/ ) :
14
14
15
15
- Maxime Franco
16
+
17
+ - [ Trobz] ( https://www.trobz.com/ ) :
18
+
19
+ - Nhan Tran
\< < [email protected] > \>
Original file line number Diff line number Diff line change
1
+ The migration of this module from 17.0 to 18.0 was financially supported
2
+ by Camptocamp.
Original file line number Diff line number Diff line change @@ -389,7 +389,8 @@ <h1 class="title">Agreement</h1>
389
389
< li > < a class ="reference internal " href ="#credits " id ="toc-entry-2 "> Credits</ a > < ul >
390
390
< li > < a class ="reference internal " href ="#authors " id ="toc-entry-3 "> Authors</ a > </ li >
391
391
< li > < a class ="reference internal " href ="#contributors " id ="toc-entry-4 "> Contributors</ a > </ li >
392
- < li > < a class ="reference internal " href ="#maintainers " id ="toc-entry-5 "> Maintainers</ a > </ li >
392
+ < li > < a class ="reference internal " href ="#other-credits " id ="toc-entry-5 "> Other credits</ a > </ li >
393
+ < li > < a class ="reference internal " href ="#maintainers " id ="toc-entry-6 "> Maintainers</ a > </ li >
393
394
</ ul >
394
395
</ li >
395
396
</ ul >
@@ -434,10 +435,20 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
434
435
< li > Maxime Franco</ li >
435
436
</ ul >
436
437
</ li >
438
+ < li > < p class ="first "> < a class ="reference external " href ="https://www.trobz.com/ "> Trobz</ a > :</ p >
439
+ < ul class ="simple ">
440
+ < li > Nhan Tran << a class ="reference external " href ="mailto:nhant@trobz.com "> nhant@trobz.com</ a > ></ li >
441
+ </ ul >
442
+ </ li >
437
443
</ ul >
438
444
</ div >
445
+ < div class ="section " id ="other-credits ">
446
+ < h2 > < a class ="toc-backref " href ="#toc-entry-5 "> Other credits</ a > </ h2 >
447
+ < p > The migration of this module from 17.0 to 18.0 was financially supported
448
+ by Camptocamp.</ p >
449
+ </ div >
439
450
< div class ="section " id ="maintainers ">
440
- < h2 > < a class ="toc-backref " href ="#toc-entry-5 "> Maintainers</ a > </ h2 >
451
+ < h2 > < a class ="toc-backref " href ="#toc-entry-6 "> Maintainers</ a > </ h2 >
441
452
< p > This module is maintained by the OCA.</ p >
442
453
< a class ="reference external image-reference " href ="https://odoo-community.org ">
443
454
< img alt ="Odoo Community Association " src ="https://odoo-community.org/logo.png " />
Original file line number Diff line number Diff line change @@ -27,10 +27,9 @@ def test_agreement_type_change(self):
27
27
self .agreement .write ({"agreement_type_id" : self .agreement_type .id })
28
28
self .assertEqual (self .agreement .domain , self .agreement_type .domain )
29
29
30
- def test_name_get (self ):
31
- res = self .agreement .name_get ()
32
- self .assertEqual (res [0 ][0 ], self .agreement .id )
33
- self .assertEqual (res [0 ][1 ], f"[{ self .agreement .code } ] { self .agreement .name } " )
30
+ def test_compute_display_name (self ):
31
+ display_name = self .agreement .display_name
32
+ self .assertEqual (display_name , f"[{ self .agreement .code } ] { self .agreement .name } " )
34
33
35
34
def test_copy (self ):
36
35
agreement1 = self .agreement .copy (default = {"code" : "Test Code" })
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
<field name =" name" >Agreement Type List</field >
6
6
<field name =" model" >agreement.type</field >
7
7
<field name =" arch" type =" xml" >
8
- <tree default_order =" name" >
8
+ <list default_order =" name" >
9
9
<field name =" name" string =" Type Name" />
10
10
<field name =" domain" />
11
- </tree >
11
+ </list >
12
12
</field >
13
13
</record >
14
14
<!-- Agreement Type Form View -->
71
71
<record id =" agreement_type_action" model =" ir.actions.act_window" >
72
72
<field name =" name" >Agreement Types</field >
73
73
<field name =" res_model" >agreement.type</field >
74
- <field name =" view_mode" >tree ,form</field >
74
+ <field name =" view_mode" >list ,form</field >
75
75
</record >
76
76
</odoo >
You can’t perform that action at this time.
0 commit comments