odoo-addon-sale-blanket-order 16.0.1.3.1.2__py3-none-any.whl → 16.0.2.0.0.1__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.

Potentially problematic release.


This version of odoo-addon-sale-blanket-order might be problematic. Click here for more details.

@@ -11,7 +11,7 @@ Sale Blanket Orders
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:2304d65f97e02bd0fec986276cb77baf60ddd090d6bc436ae7004c8276b7c666
14
+ !! source digest: sha256:7ca292796265497470ef2eed25173e2b365b0438ba918c471ddd3dc0c40e9ad5
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -5,7 +5,7 @@
5
5
  "category": "Sale",
6
6
  "license": "AGPL-3",
7
7
  "author": "Acsone SA/NV, Odoo Community Association (OCA)",
8
- "version": "16.0.1.3.1",
8
+ "version": "16.0.2.0.0",
9
9
  "website": "https://github.com/OCA/sale-workflow",
10
10
  "summary": "Blanket Orders",
11
11
  "depends": ["uom", "sale_management", "web_action_conditionable"],
@@ -853,6 +853,11 @@ msgstr ""
853
853
  msgid "Subtotal"
854
854
  msgstr "Zwischensumme"
855
855
 
856
+ #. module: sale_blanket_order
857
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
858
+ msgid "Tags"
859
+ msgstr ""
860
+
856
861
  #. module: sale_blanket_order
857
862
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
858
863
  msgid "Tax"
@@ -857,6 +857,11 @@ msgstr ""
857
857
  msgid "Subtotal"
858
858
  msgstr "Subtotal"
859
859
 
860
+ #. module: sale_blanket_order
861
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
862
+ msgid "Tags"
863
+ msgstr ""
864
+
860
865
  #. module: sale_blanket_order
861
866
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
862
867
  msgid "Tax"
@@ -856,6 +856,11 @@ msgstr ""
856
856
  msgid "Subtotal"
857
857
  msgstr "Sous-total"
858
858
 
859
+ #. module: sale_blanket_order
860
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
861
+ msgid "Tags"
862
+ msgstr ""
863
+
859
864
  #. module: sale_blanket_order
860
865
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
861
866
  msgid "Tax"
@@ -855,6 +855,11 @@ msgstr ""
855
855
  msgid "Subtotal"
856
856
  msgstr "Sous-total"
857
857
 
858
+ #. module: sale_blanket_order
859
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
860
+ msgid "Tags"
861
+ msgstr ""
862
+
858
863
  #. module: sale_blanket_order
859
864
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
860
865
  msgid "Tax"
@@ -856,6 +856,11 @@ msgstr ""
856
856
  msgid "Subtotal"
857
857
  msgstr "Subtotale"
858
858
 
859
+ #. module: sale_blanket_order
860
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
861
+ msgid "Tags"
862
+ msgstr ""
863
+
859
864
  #. module: sale_blanket_order
860
865
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
861
866
  msgid "Tax"
@@ -837,6 +837,11 @@ msgstr ""
837
837
  msgid "Subtotal"
838
838
  msgstr ""
839
839
 
840
+ #. module: sale_blanket_order
841
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
842
+ msgid "Tags"
843
+ msgstr ""
844
+
840
845
  #. module: sale_blanket_order
841
846
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
842
847
  msgid "Tax"
@@ -835,6 +835,11 @@ msgstr ""
835
835
  msgid "Subtotal"
836
836
  msgstr ""
837
837
 
838
+ #. module: sale_blanket_order
839
+ #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order__tag_ids
840
+ msgid "Tags"
841
+ msgstr ""
842
+
838
843
  #. module: sale_blanket_order
839
844
  #: model:ir.model.fields,field_description:sale_blanket_order.field_sale_blanket_order_line__price_tax
840
845
  msgid "Tax"
@@ -112,6 +112,13 @@ class BlanketOrder(models.Model):
112
112
  default=lambda self: self.env["crm.team"]._get_default_team_id(),
113
113
  states=READONLY_FIELD_STATES,
114
114
  )
115
+ tag_ids = fields.Many2many(
116
+ comodel_name="crm.tag",
117
+ relation="sale_blanket_order_tag_rel",
118
+ column1="blanket_order_id",
119
+ column2="tag_id",
120
+ string="Tags",
121
+ )
115
122
  company_id = fields.Many2one(
116
123
  comodel_name="res.company",
117
124
  required=True,
@@ -372,7 +372,7 @@ ul.auto-toc {
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:2304d65f97e02bd0fec986276cb77baf60ddd090d6bc436ae7004c8276b7c666
375
+ !! source digest: sha256:7ca292796265497470ef2eed25173e2b365b0438ba918c471ddd3dc0c40e9ad5
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sale-workflow/tree/16.0/sale_blanket_order"><img alt="OCA/sale-workflow" src="https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_blanket_order"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
378
  <p>A blanket order is a pre-agreement to sell a certain number of quantities of
@@ -273,6 +273,11 @@
273
273
  options="{'no_create': True}"
274
274
  />
275
275
  <field name="client_order_ref" />
276
+ <field
277
+ name="tag_ids"
278
+ widget="many2many_tags"
279
+ options="{'color_field': 'color', 'no_create_edit': True}"
280
+ />
276
281
  <field
277
282
  name="company_id"
278
283
  options="{'no_create': True}"
@@ -118,6 +118,8 @@ class BlanketOrderWizard(models.TransientModel):
118
118
  currency_id,
119
119
  pricelist_id,
120
120
  payment_term_id,
121
+ client_order_ref,
122
+ tag_ids,
121
123
  order_lines_by_customer,
122
124
  ):
123
125
  return {
@@ -129,39 +131,50 @@ class BlanketOrderWizard(models.TransientModel):
129
131
  "payment_term_id": payment_term_id,
130
132
  "order_line": order_lines_by_customer[customer],
131
133
  "analytic_account_id": self.blanket_order_id.analytic_account_id.id,
134
+ "client_order_ref": client_order_ref,
135
+ "tag_ids": [(6, 0, tag_ids.ids)] if tag_ids else False,
132
136
  }
133
137
 
138
+ @api.model
139
+ def _check_consistency(self, current_value, new_value):
140
+ """Return a consistent value across updates.
141
+ If the current value is unset (0), use the new value.
142
+ If it matches the new value, keep it. Otherwise, return False.
143
+ """
144
+ if current_value == 0:
145
+ return new_value
146
+ return current_value if current_value == new_value else False
147
+
134
148
  def create_sale_order(self):
135
149
  order_lines_by_customer = defaultdict(list)
136
150
  currency_id = 0
137
151
  pricelist_id = 0
138
152
  user_id = 0
139
153
  payment_term_id = 0
154
+ client_order_ref = 0
155
+ tag_ids = 0
140
156
  for line in self.line_ids.filtered(lambda l: l.qty != 0.0):
141
157
  if line.qty > line.remaining_uom_qty:
142
158
  raise UserError(_("You can't order more than the remaining quantities"))
143
159
  vals = self._prepare_so_line_vals(line)
144
160
  order_lines_by_customer[line.partner_id.id].append((0, 0, vals))
145
161
 
146
- if currency_id == 0:
147
- currency_id = line.blanket_line_id.order_id.currency_id.id
148
- elif currency_id != line.blanket_line_id.order_id.currency_id.id:
149
- currency_id = False
150
-
151
- if pricelist_id == 0:
152
- pricelist_id = line.blanket_line_id.pricelist_id.id
153
- elif pricelist_id != line.blanket_line_id.pricelist_id.id:
154
- pricelist_id = False
155
-
156
- if user_id == 0:
157
- user_id = line.blanket_line_id.user_id.id
158
- elif user_id != line.blanket_line_id.user_id.id:
159
- user_id = False
160
-
161
- if payment_term_id == 0:
162
- payment_term_id = line.blanket_line_id.payment_term_id.id
163
- elif payment_term_id != line.blanket_line_id.payment_term_id.id:
164
- payment_term_id = False
162
+ currency_id = self._check_consistency(
163
+ currency_id, line.blanket_line_id.order_id.currency_id.id
164
+ )
165
+ pricelist_id = self._check_consistency(
166
+ pricelist_id, line.blanket_line_id.pricelist_id.id
167
+ )
168
+ user_id = self._check_consistency(user_id, line.blanket_line_id.user_id.id)
169
+ payment_term_id = self._check_consistency(
170
+ payment_term_id, line.blanket_line_id.payment_term_id.id
171
+ )
172
+ client_order_ref = self._check_consistency(
173
+ client_order_ref, line.blanket_line_id.order_id.client_order_ref
174
+ )
175
+ tag_ids = self._check_consistency(
176
+ tag_ids, line.blanket_line_id.order_id.tag_ids
177
+ )
165
178
 
166
179
  if not order_lines_by_customer:
167
180
  raise UserError(_("An order can't be empty"))
@@ -182,6 +195,8 @@ class BlanketOrderWizard(models.TransientModel):
182
195
  currency_id,
183
196
  pricelist_id,
184
197
  payment_term_id,
198
+ client_order_ref,
199
+ tag_ids,
185
200
  order_lines_by_customer,
186
201
  )
187
202
  sale_order = self.env["sale.order"].create(order_vals)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-sale_blanket_order
3
- Version: 16.0.1.3.1.2
3
+ Version: 16.0.2.0.0.1
4
4
  Summary: Blanket Orders
5
5
  Home-page: https://github.com/OCA/sale-workflow
6
6
  Author: Acsone SA/NV, Odoo Community Association (OCA)
@@ -27,7 +27,7 @@ Sale Blanket Orders
27
27
  !! This file is generated by oca-gen-addon-readme !!
28
28
  !! changes will be overwritten. !!
29
29
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30
- !! source digest: sha256:2304d65f97e02bd0fec986276cb77baf60ddd090d6bc436ae7004c8276b7c666
30
+ !! source digest: sha256:7ca292796265497470ef2eed25173e2b365b0438ba918c471ddd3dc0c40e9ad5
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
32
 
33
33
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -1,17 +1,17 @@
1
- odoo/addons/sale_blanket_order/README.rst,sha256=fiLs2Yer-nlhmhJ4iCJI-rihWDBHNixZMAVisyY9Z8A,6296
1
+ odoo/addons/sale_blanket_order/README.rst,sha256=GlAcvIo0hbaDREEPaSzn5qAsPATmzOboenLt6ghNr4I,6296
2
2
  odoo/addons/sale_blanket_order/__init__.py,sha256=rKfzYX9RhkkCxgh2f0PJLYN45Kw8T8-fwxw1pbjLuug,108
3
- odoo/addons/sale_blanket_order/__manifest__.py,sha256=FGdyC7dOGUhX0Oju6q-WQdnEIXJc5ZjWdM3qCCV0Jgg,884
3
+ odoo/addons/sale_blanket_order/__manifest__.py,sha256=x2DuB8J0VSezHc25EYw3eakKaunIiKi6yLCswb_xs64,884
4
4
  odoo/addons/sale_blanket_order/data/ir_cron.xml,sha256=B6mIBP7TGt_V0-2tb-GtXQrOXr_FY4D7B0qvvCf3qXc,837
5
5
  odoo/addons/sale_blanket_order/data/sequence.xml,sha256=xsEzImnYlOTADfACH_eBMFFjdy6nM_WqJTWJ3MN1_eM,416
6
- odoo/addons/sale_blanket_order/i18n/de.po,sha256=PDTPdB9Owa-K_aLAvpRErnC0Ff4iYafWwCGbwJpPLW4,44232
7
- odoo/addons/sale_blanket_order/i18n/es.po,sha256=3cBfbiiXhZf9MbquOlyKkFCD_tXL1M7smRkD9GPq4bs,44472
8
- odoo/addons/sale_blanket_order/i18n/fr.po,sha256=WT3OTsWEFUuTAQzikFmRO3AmCo8rL5BYf_eAfgMiDVs,44155
9
- odoo/addons/sale_blanket_order/i18n/fr_FR.po,sha256=AVsnEysLJUCWBdkE3AACn7NZzveuOUJafi2XzpZWNP8,44122
10
- odoo/addons/sale_blanket_order/i18n/it.po,sha256=CIrwIXaJ9couguv-lPpPkSU_KhkKH-unXaWVaon4g8Q,43833
11
- odoo/addons/sale_blanket_order/i18n/pt.po,sha256=Im5aOPKfbIVcYzQ4mGYiTcm3t5apz3x6ATcWwVndJm0,38866
12
- odoo/addons/sale_blanket_order/i18n/sale_blanket_order.pot,sha256=ZtupzTnIaCb2-qWmbqTJ_AJlSuWWkrthklXuRapWBbM,38791
6
+ odoo/addons/sale_blanket_order/i18n/de.po,sha256=wn8QBrugjebSNVLV3Qf83OGaNmQaoi2NtyZjoEFciGg,44382
7
+ odoo/addons/sale_blanket_order/i18n/es.po,sha256=_UIl48zsSkgw7YPQUjqE2B1pUStvempGxPnldKbgTuQ,44622
8
+ odoo/addons/sale_blanket_order/i18n/fr.po,sha256=Ntkt_oFMnvlBuUDz0ASN8WB6WEVaq5XZQmnjHAqiwaQ,44305
9
+ odoo/addons/sale_blanket_order/i18n/fr_FR.po,sha256=bGq49RNiVMp_VhccaWYO91owi0gj5FSmVKar4_U4d7w,44272
10
+ odoo/addons/sale_blanket_order/i18n/it.po,sha256=sQO_n5uYW-3DyoGMSD4UhdU9hSLcX2Hd0K7qUuf93jc,43983
11
+ odoo/addons/sale_blanket_order/i18n/pt.po,sha256=O4yXwP1GcznZuctD_sZrJA7MgXUVOGA--x26Y2YJnXk,39016
12
+ odoo/addons/sale_blanket_order/i18n/sale_blanket_order.pot,sha256=mm69fVWysTZRIy1-4OFPPax1WfFeWSSbSz7xKeA5H1Q,38941
13
13
  odoo/addons/sale_blanket_order/models/__init__.py,sha256=7adrBSDps9-KQKNJjoCBKeoWgeF21I62H9yqyQVcZGM,90
14
- odoo/addons/sale_blanket_order/models/blanket_orders.py,sha256=I36DZWsoegHT4AkZ61BGdklYPfN0Mg5Q3R2WZupOWOA,26118
14
+ odoo/addons/sale_blanket_order/models/blanket_orders.py,sha256=MN1RpOCUdTNSTn3QNpolvzMdkwXYRZ1CSjaf1sZrdXY,26320
15
15
  odoo/addons/sale_blanket_order/models/sale_config_settings.py,sha256=R71rDeTHdG70voBaBvOAIOS3raoK1hBE6c-Zh3AnQCM,411
16
16
  odoo/addons/sale_blanket_order/models/sale_orders.py,sha256=pf1I17G5Owt7R-u1ijWggxlL5msJKBQbyi9MkQLCEKM,7768
17
17
  odoo/addons/sale_blanket_order/readme/CONTRIBUTORS.rst,sha256=HNpm8unv-C1qkVXG3tTxG6E8Wz-IadLxyep8KWkQ1VQ,419
@@ -29,18 +29,18 @@ odoo/addons/sale_blanket_order/static/description/BO_menu.png,sha256=TWKnQPgzBgN
29
29
  odoo/addons/sale_blanket_order/static/description/PO_BOLine.png,sha256=O8dfvlVOqDcmrKrHtWw5J1gm76fOQ53YCtu9_ujb4bs,37234
30
30
  odoo/addons/sale_blanket_order/static/description/PO_from_BO.png,sha256=lmRWLs1DYkXmZfRVn_Hg2X8nEfazH2eVZ8unVlcdj-0,27671
31
31
  odoo/addons/sale_blanket_order/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
32
- odoo/addons/sale_blanket_order/static/description/index.html,sha256=VPkJ8vZg4mzt21C_LThgy8jipt62ifuWWzx_e4IqPL0,17353
32
+ odoo/addons/sale_blanket_order/static/description/index.html,sha256=48HJKBdvpHtQH2jq2T0UWFoO1qVtfiVZa2SAuZc0G3M,17353
33
33
  odoo/addons/sale_blanket_order/tests/__init__.py,sha256=0z5WGDe8esOreObf1dM01uMp-O3GmL20PeIvqK0usXY,130
34
34
  odoo/addons/sale_blanket_order/tests/test_blanket_orders.py,sha256=5pU4d7D1Y6JgGRs9BowsHs-Rioxvbg5mpZTHyo1SU38,16304
35
35
  odoo/addons/sale_blanket_order/tests/test_sale_order.py,sha256=jQjjwYzVoFjkEmLRbRUybq7LPm30WQAruHrkscoUh_U,9898
36
36
  odoo/addons/sale_blanket_order/views/sale_blanket_order_line_views.xml,sha256=rgAsvqQwj_remT9Kr06FPFL8Lo10fMf1sy6VyAC-hR4,7628
37
- odoo/addons/sale_blanket_order/views/sale_blanket_order_views.xml,sha256=LYCIVgJJE98WCMfYRtvuT8wu6-uN5HzY3IHK0p--eUk,18307
37
+ odoo/addons/sale_blanket_order/views/sale_blanket_order_views.xml,sha256=7t4T8PDDnYuSzoKQBVJw6XiFvFafuLn6eBEqgIcbQnI,18607
38
38
  odoo/addons/sale_blanket_order/views/sale_config_settings.xml,sha256=GLW5MxOfAz0-NgnVH67K_UDMOzsAwezDmTVL9uppZ-g,1452
39
39
  odoo/addons/sale_blanket_order/views/sale_order_views.xml,sha256=dyB-P-5YeBbOIU2htrgDaTXhV_qvDmLE4atO1zGWzfI,1762
40
40
  odoo/addons/sale_blanket_order/wizard/__init__.py,sha256=4P5jq1IlE7JDNFP0ly3-alAHbqdIYf6fLjQjotKrG08,99
41
- odoo/addons/sale_blanket_order/wizard/create_sale_orders.py,sha256=rUyPggjar7usC4EjRGmF9SZpviHUqdH7xvzYwYeNhsg,8109
41
+ odoo/addons/sale_blanket_order/wizard/create_sale_orders.py,sha256=95lzBw1tfBU1KS8G37bB4HAuIbmci16sr_klKD2k60U,8716
42
42
  odoo/addons/sale_blanket_order/wizard/create_sale_orders.xml,sha256=GjPlsYRKvN45F7ZSR-j7yJCW0U9OfBi-dIhRV8YqM8M,2091
43
- odoo_addon_sale_blanket_order-16.0.1.3.1.2.dist-info/METADATA,sha256=ShI0UOJtUqkIwT2R2pCPFVh-87hl-6a2tlF1TsH2p2g,6877
44
- odoo_addon_sale_blanket_order-16.0.1.3.1.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
45
- odoo_addon_sale_blanket_order-16.0.1.3.1.2.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
46
- odoo_addon_sale_blanket_order-16.0.1.3.1.2.dist-info/RECORD,,
43
+ odoo_addon_sale_blanket_order-16.0.2.0.0.1.dist-info/METADATA,sha256=aJT79TheuFdDf1L-WaMYB_lXsJRzLgNZcdtqxRFv0CI,6877
44
+ odoo_addon_sale_blanket_order-16.0.2.0.0.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
45
+ odoo_addon_sale_blanket_order-16.0.2.0.0.1.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
46
+ odoo_addon_sale_blanket_order-16.0.2.0.0.1.dist-info/RECORD,,