odoo-addon-contract 17.0.1.4.5.1__py3-none-any.whl → 18.0.2.0.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. odoo/addons/contract/README.rst +14 -10
  2. odoo/addons/contract/__manifest__.py +3 -10
  3. odoo/addons/contract/controllers/main.py +1 -8
  4. odoo/addons/contract/data/contract_cron.xml +0 -2
  5. odoo/addons/contract/data/mail_template.xml +18 -17
  6. odoo/addons/contract/data/template_mail_notification.xml +1 -1
  7. odoo/addons/contract/i18n/contract.pot +141 -823
  8. odoo/addons/contract/migrations/18.0.2.0.0/pre-migrate.py +90 -0
  9. odoo/addons/contract/models/__init__.py +2 -6
  10. odoo/addons/contract/models/account_move.py +0 -8
  11. odoo/addons/contract/models/account_move_line.py +14 -0
  12. odoo/addons/contract/models/contract.py +266 -308
  13. odoo/addons/contract/models/contract_line.py +34 -861
  14. odoo/addons/contract/models/{contract_recurrency_mixin.py → contract_recurring_mixin.py} +101 -82
  15. odoo/addons/contract/models/contract_tag.py +1 -3
  16. odoo/addons/contract/models/contract_template.py +81 -2
  17. odoo/addons/contract/models/contract_template_line.py +249 -3
  18. odoo/addons/contract/report/contract_views.xml +0 -2
  19. odoo/addons/contract/report/report_contract.xml +13 -13
  20. odoo/addons/contract/security/contract_security.xml +6 -15
  21. odoo/addons/contract/security/contract_tag.xml +1 -3
  22. odoo/addons/contract/security/ir.model.access.csv +0 -2
  23. odoo/addons/contract/static/description/index.html +24 -18
  24. odoo/addons/contract/static/src/js/contract_portal_tour.esm.js +6 -3
  25. odoo/addons/contract/tests/test_contract.py +42 -927
  26. odoo/addons/contract/tests/test_multicompany.py +5 -4
  27. odoo/addons/contract/tests/test_portal.py +6 -3
  28. odoo/addons/contract/views/contract.xml +91 -234
  29. odoo/addons/contract/views/contract_line.xml +48 -117
  30. odoo/addons/contract/views/contract_portal_templates.xml +181 -222
  31. odoo/addons/contract/views/contract_tag.xml +3 -3
  32. odoo/addons/contract/views/contract_template.xml +100 -72
  33. odoo/addons/contract/views/contract_template_line.xml +76 -5
  34. odoo/addons/contract/views/res_config_settings.xml +5 -6
  35. odoo/addons/contract/views/res_partner_view.xml +0 -5
  36. odoo/addons/contract/wizards/__init__.py +0 -2
  37. odoo/addons/contract/wizards/contract_manually_create_invoice.py +6 -6
  38. odoo/addons/contract/wizards/contract_manually_create_invoice.xml +2 -3
  39. {odoo_addon_contract-17.0.1.4.5.1.dist-info → odoo_addon_contract-18.0.2.0.0.8.dist-info}/METADATA +17 -13
  40. {odoo_addon_contract-17.0.1.4.5.1.dist-info → odoo_addon_contract-18.0.2.0.0.8.dist-info}/RECORD +42 -55
  41. odoo/addons/contract/data/contract_renew_cron.xml +0 -14
  42. odoo/addons/contract/models/abstract_contract.py +0 -82
  43. odoo/addons/contract/models/abstract_contract_line.py +0 -271
  44. odoo/addons/contract/models/contract_line_constraints.py +0 -429
  45. odoo/addons/contract/models/contract_terminate_reason.py +0 -14
  46. odoo/addons/contract/models/res_company.py +0 -15
  47. odoo/addons/contract/models/res_config_settings.py +0 -18
  48. odoo/addons/contract/security/contract_terminate_reason.xml +0 -23
  49. odoo/addons/contract/security/groups.xml +0 -9
  50. odoo/addons/contract/views/abstract_contract_line.xml +0 -117
  51. odoo/addons/contract/views/contract_terminate_reason.xml +0 -38
  52. odoo/addons/contract/wizards/contract_contract_terminate.py +0 -42
  53. odoo/addons/contract/wizards/contract_contract_terminate.xml +0 -33
  54. odoo/addons/contract/wizards/contract_line_wizard.py +0 -53
  55. odoo/addons/contract/wizards/contract_line_wizard.xml +0 -111
  56. {odoo_addon_contract-17.0.1.4.5.1.dist-info → odoo_addon_contract-18.0.2.0.0.8.dist-info}/WHEEL +0 -0
  57. {odoo_addon_contract-17.0.1.4.5.1.dist-info → odoo_addon_contract-18.0.2.0.0.8.dist-info}/top_level.txt +0 -0
@@ -55,7 +55,7 @@
55
55
  <th>Contract #</th>
56
56
  <th class='d-none d-md-table-cell'>Date</th>
57
57
  <th class='d-none d-md-table-cell'>Date end</th>
58
- <th class='text-right'>Reference</th>
58
+ <th class='text-end'>Reference</th>
59
59
  </tr>
60
60
  </thead>
61
61
  <tbody>
@@ -76,7 +76,7 @@
76
76
  <td class="d-none d-md-table-cell">
77
77
  <span t-field="contract.date_end" />
78
78
  </td>
79
- <td class='text-right'>
79
+ <td class='text-end'>
80
80
  <span t-field="contract.code" />
81
81
  </td>
82
82
  </tr>
@@ -87,7 +87,7 @@
87
87
  </template>
88
88
  <template id="portal_contract_page" name="My Contract">
89
89
  <t t-call="portal.portal_layout">
90
- <t t-set="o_portal_fullwidth_alert" groups="account.group_account_invoice">
90
+ <t groups="account.group_account_invoice">
91
91
  <t t-call="portal.portal_back_in_edit_mode">
92
92
  <t
93
93
  t-set="backend_url"
@@ -95,236 +95,195 @@
95
95
  />
96
96
  </t>
97
97
  </t>
98
- <t t-call="portal.portal_record_layout">
99
- <t t-set="card_header">
100
- <h5 class="mb-0">
101
- <span>
98
+ <h5 class="mb-0">
99
+ <span>
102
100
  Contract - <span t-field="contract.name" />
103
101
  </span>
104
- </h5>
105
- </t>
106
- <t t-set="card_body">
107
- <div id="general_information">
108
- <div class="row mt4">
109
- <div
110
- t-if="contract.partner_id"
111
- class="col-12 col-md-6 mb-4 mb-md-0"
112
- >
113
- <h6>
114
- <strong>Customer:</strong>
115
- </h6>
116
- <div class="row">
117
- <div class="col flex-grow-0 pr-3">
118
- <img
119
- t-if="contract.partner_id.image_128"
120
- class="rounded-circle mt-1 o_portal_contact_img"
121
- t-att-src="image_data_uri(contract.partner_id.image_128)"
122
- alt="Contact"
123
- />
124
- <img
125
- t-else=""
126
- class="rounded-circle mt-1 o_portal_contact_img"
127
- src="/web/static/src/img/user_menu_avatar.png"
128
- alt="Contact"
129
- />
130
- </div>
131
- <div class="col pl-sm-0">
132
- <address
133
- t-field="contract.partner_id"
134
- t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
135
- />
136
- </div>
137
- </div>
102
+ </h5>
103
+ <div id="general_information">
104
+ <div class="row mt4">
105
+ <div
106
+ t-if="contract.partner_id"
107
+ class="col-12 col-md-6 mb-4 mb-md-0"
108
+ >
109
+ <h6>
110
+ <strong>Customer:</strong>
111
+ </h6>
112
+ <div class="row">
113
+ <div class="col flex-grow-0 pr-3">
114
+ <img
115
+ t-if="contract.partner_id.image_128"
116
+ class="rounded-circle mt-1 o_portal_contact_img"
117
+ t-att-src="image_data_uri(contract.partner_id.image_128)"
118
+ alt="Contact"
119
+ />
120
+ <img
121
+ t-else=""
122
+ class="rounded-circle mt-1 o_portal_contact_img"
123
+ src="/web/static/src/img/user_menu_avatar.png"
124
+ alt="Contact"
125
+ />
138
126
  </div>
139
- <div t-if="contract.user_id" class="col-12 col-md-6">
140
- <h6>
141
- <strong>Responsible:</strong>
142
- </h6>
143
- <div class="row">
144
- <div class="col flex-grow-0 pr-3">
145
- <img
146
- t-if="contract.user_id.image_128"
147
- class="rounded-circle mt-1 o_portal_contact_img"
148
- t-att-src="image_data_uri(contract.user_id.image_128)"
149
- alt="Contact"
150
- />
151
- <img
152
- t-else=""
153
- class="rounded-circle mt-1 o_portal_contact_img"
154
- src="/web/static/src/img/user_menu_avatar.png"
155
- alt="Contact"
156
- />
157
- </div>
158
- <div class="col pl-sm-0">
159
- <address
160
- t-field="contract.user_id"
161
- t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
162
- />
163
- </div>
164
- </div>
127
+ <div class="col pl-sm-0">
128
+ <address
129
+ t-field="contract.partner_id"
130
+ t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
131
+ />
165
132
  </div>
166
133
  </div>
167
- <div class="row mt32" id="product_information">
168
- <div class="col-12 col-md-6 mb-4 mb-md-0">
169
- <div t-if="contract.code" class="row mb-2 mb-sm-1">
170
- <div class="col-12 col-sm-4">
171
- <strong>Reference</strong>
172
- </div>
173
- <div class="col-12 col-sm-8">
174
- <span t-field="contract.code" />
175
- </div>
176
- </div>
177
- <div
178
- t-if="contract.recurring_next_date"
179
- class="row mb-2 mb-sm-1"
180
- >
181
- <div class="col-12 col-sm-4">
182
- <strong>Date of Next Invoice</strong>
183
- </div>
184
- <div class="col-12 col-sm-8">
185
- <span
186
- t-field="contract.recurring_next_date"
187
- t-options='{"widget": "date"}'
188
- />
189
- </div>
190
- </div>
191
- <div t-if="contract.date_end" class="row mb-2 mb-sm-1">
192
- <div class="col-12 col-sm-4">
193
- <strong>Date end</strong>
194
- </div>
195
- <div class="col-12 col-sm-8">
196
- <span
197
- t-field="contract.date_end"
198
- t-options='{"widget": "date"}'
199
- />
200
- </div>
201
- </div>
134
+ </div>
135
+ <div t-if="contract.user_id" class="col-12 col-md-6">
136
+ <h6>
137
+ <strong>Responsible:</strong>
138
+ </h6>
139
+ <div class="row">
140
+ <div class="col flex-grow-0 pr-3">
141
+ <img
142
+ t-if="contract.user_id.image_128"
143
+ class="rounded-circle mt-1 o_portal_contact_img"
144
+ t-att-src="image_data_uri(contract.user_id.image_128)"
145
+ alt="Contact"
146
+ />
147
+ <img
148
+ t-else=""
149
+ class="rounded-circle mt-1 o_portal_contact_img"
150
+ src="/web/static/src/img/user_menu_avatar.png"
151
+ alt="Contact"
152
+ />
153
+ </div>
154
+ <div class="col pl-sm-0">
155
+ <address
156
+ t-field="contract.user_id"
157
+ t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'
158
+ />
202
159
  </div>
203
160
  </div>
204
- <div id="item_details">
205
- <table class="table table-sm" id="sales_order_table">
206
- <thead class="bg-100">
207
- <tr>
208
- <th
209
- name="th_name"
210
- class="text-left"
211
- >Description</th>
212
- <th
213
- name="th_quantity"
214
- class="text-right"
215
- >Quantity</th>
216
- <th
217
- name="th_price_unit"
218
- class="text-right"
219
- >Price unit</th>
220
- <th
221
- name="th_discount"
222
- class="text-right"
223
- >Discount (%)</th>
224
- <th
225
- name="th_price_subtotal"
226
- class="text-right"
227
- >Sub Total</th>
228
- <th
229
- name="th_recurring_interval"
161
+ </div>
162
+ </div>
163
+ <div class="row mt32" id="product_information">
164
+ <div class="col-12 col-md-6 mb-4 mb-md-0">
165
+ <div t-if="contract.code" class="row mb-2 mb-sm-1">
166
+ <div class="col-12 col-sm-4">
167
+ <strong>Reference</strong>
168
+ </div>
169
+ <div class="col-12 col-sm-8">
170
+ <span t-field="contract.code" />
171
+ </div>
172
+ </div>
173
+ <div
174
+ t-if="contract.recurring_next_date"
175
+ class="row mb-2 mb-sm-1"
176
+ >
177
+ <div class="col-12 col-sm-4">
178
+ <strong>Date of Next Invoice</strong>
179
+ </div>
180
+ <div class="col-12 col-sm-8">
181
+ <span
182
+ t-field="contract.recurring_next_date"
183
+ t-options='{"widget": "date"}'
184
+ />
185
+ </div>
186
+ </div>
187
+ <div t-if="contract.date_end" class="row mb-2 mb-sm-1">
188
+ <div class="col-12 col-sm-4">
189
+ <strong>Date end</strong>
190
+ </div>
191
+ <div class="col-12 col-sm-8">
192
+ <span
193
+ t-field="contract.date_end"
194
+ t-options='{"widget": "date"}'
195
+ />
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ <div id="item_details">
201
+ <table class="table table-sm" id="sales_order_table">
202
+ <thead class="bg-100">
203
+ <tr>
204
+ <th name="th_name" class="text-left">Description</th>
205
+ <th name="th_quantity" class="text-right">Quantity</th>
206
+ <th
207
+ name="th_price_unit"
208
+ class="text-right"
209
+ >Price unit</th>
210
+ <th
211
+ name="th_discount"
212
+ class="text-right"
213
+ >Discount (%)</th>
214
+ <th
215
+ name="th_price_subtotal"
216
+ class="text-right"
217
+ >Sub Total</th>
218
+ <th
219
+ name="th_recurring_interval"
220
+ class="text-right"
221
+ >Recurrence</th>
222
+ <th
223
+ name="th_recurring_next_date"
224
+ class="text-right"
225
+ >Date of next invoice</th>
226
+ </tr>
227
+ </thead>
228
+ <tbody class="contract_tbody">
229
+ <t t-foreach="contract.contract_line_ids" t-as="line">
230
+ <tr
231
+ t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"
232
+ >
233
+ <t t-if="not line.display_type">
234
+ <td name="td_name">
235
+ <span t-field="line.name" />
236
+ </td>
237
+ <td name="td_quantity" class="text-right">
238
+ <span t-field="line.quantity" />
239
+ </td>
240
+ <td name="td_price_unit" class="text-right">
241
+ <span
242
+ t-field="line.price_unit"
243
+ t-options='{"widget": "monetary", "display_currency": contract.currency_id}'
244
+ />
245
+ </td>
246
+ <td name="td_discount" class="text-right">
247
+ <span t-field="line.discount" />
248
+ </td>
249
+ <td name="td_price_subtotal" class="text-right">
250
+ <span
251
+ t-field="line.price_subtotal"
252
+ t-options='{"widget": "monetary", "display_currency": contract.currency_id}'
253
+ />
254
+ </td>
255
+ <td
256
+ name="td_recurring_interval"
230
257
  class="text-right"
231
- >Recurrence</th>
232
- <th
233
- name="th_recurring_next_date"
258
+ >
259
+ <span t-field="line.recurring_interval" />
260
+ <span t-field="line.recurring_rule_type" />
261
+ </td>
262
+ <td
263
+ name="td_recurring_next_date"
234
264
  class="text-right"
235
- >Date of next invoice</th>
236
- </tr>
237
- </thead>
238
- <tbody class="contract_tbody">
239
- <t
240
- t-foreach="contract.contract_line_ids"
241
- t-as="line"
242
- >
243
- <tr
244
- t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''"
245
265
  >
246
- <t t-if="not line.display_type">
247
- <td name="td_name">
248
- <span t-field="line.name" />
249
- </td>
250
- <td
251
- name="td_quantity"
252
- class="text-right"
253
- >
254
- <span t-field="line.quantity" />
255
- </td>
256
- <td
257
- name="td_price_unit"
258
- class="text-right"
259
- >
260
- <span
261
- t-field="line.price_unit"
262
- t-options='{"widget": "monetary", "display_currency": contract.currency_id}'
263
- />
264
- </td>
265
- <td
266
- name="td_discount"
267
- class="text-right"
268
- >
269
- <span t-field="line.discount" />
270
- </td>
271
- <td
272
- name="td_price_subtotal"
273
- class="text-right"
274
- >
275
- <span
276
- t-field="line.price_subtotal"
277
- t-options='{"widget": "monetary", "display_currency": contract.currency_id}'
278
- />
279
- </td>
280
- <td
281
- name="td_recurring_interval"
282
- class="text-right"
283
- >
284
- <span
285
- t-field="line.recurring_interval"
286
- />
287
- <span
288
- t-field="line.recurring_rule_type"
289
- />
290
- </td>
291
- <td
292
- name="td_recurring_next_date"
293
- class="text-right"
294
- >
295
- <span
296
- t-field="line.recurring_next_date"
297
- />
298
- </td>
299
- </t>
300
- <t
301
- t-if="line.display_type == 'line_section'"
302
- >
303
- <td colspan="99">
304
- <span t-field="line.name" />
305
- </td>
306
- <t
307
- t-set="current_section"
308
- t-value="line"
309
- />
310
- <t
311
- t-set="current_subtotal"
312
- t-value="0"
313
- />
314
- </t>
315
- <t t-if="line.display_type == 'line_note'">
316
- <td colspan="99">
317
- <span t-field="line.name" />
318
- </td>
319
- </t>
320
- </tr>
266
+ <span t-field="line.recurring_next_date" />
267
+ </td>
321
268
  </t>
322
- </tbody>
323
- </table>
324
- </div>
325
- </div>
326
- </t>
327
- </t>
269
+ <t t-if="line.display_type == 'line_section'">
270
+ <td colspan="99">
271
+ <span t-field="line.name" />
272
+ </td>
273
+ <t t-set="current_section" t-value="line" />
274
+ <t t-set="current_subtotal" t-value="0" />
275
+ </t>
276
+ <t t-if="line.display_type == 'line_note'">
277
+ <td colspan="99">
278
+ <span t-field="line.name" />
279
+ </td>
280
+ </t>
281
+ </tr>
282
+ </t>
283
+ </tbody>
284
+ </table>
285
+ </div>
286
+ </div>
328
287
  <section
329
288
  t-if="contract.modification_ids"
330
289
  class="s_timeline pt24 pb48 o_colored_level"
@@ -21,20 +21,20 @@
21
21
  <record model="ir.ui.view" id="contract_tag_tree_view">
22
22
  <field name="model">contract.tag</field>
23
23
  <field name="arch" type="xml">
24
- <tree>
24
+ <list>
25
25
  <field name="name" />
26
26
  <field
27
27
  name="company_id"
28
28
  options="{'no_create': True}"
29
29
  groups="base.group_multi_company"
30
30
  />
31
- </tree>
31
+ </list>
32
32
  </field>
33
33
  </record>
34
34
  <record model="ir.actions.act_window" id="contract_tag_act_window">
35
35
  <field name="name">Contract Tags</field>
36
36
  <field name="res_model">contract.tag</field>
37
- <field name="view_mode">tree,form</field>
37
+ <field name="view_mode">list,form</field>
38
38
  </record>
39
39
  <record model="ir.ui.menu" id="contract_tag_menu">
40
40
  <field name="name">Contract Tag</field>