Skip to content

Commit a0d0a4a

Browse files
committed
[MIG] product_scale_label: Migration to 16.0
1 parent e7284d5 commit a0d0a4a

File tree

10 files changed

+55
-174
lines changed

10 files changed

+55
-174
lines changed

product_scale_label/README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ beesdoo_product
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github
20-
:target: https://github.com/beescoop/Obeesdoo/tree/12.0/product_scale_label
20+
:target: https://github.com/beescoop/Obeesdoo/tree/16.0/product_scale_label
2121
:alt: beescoop/Obeesdoo
2222

2323
|badge1| |badge2| |badge3|
@@ -48,7 +48,7 @@ Bug Tracker
4848
Bugs are tracked on `GitHub Issues <https://github.com/beescoop/Obeesdoo/issues>`_.
4949
In case of trouble, please check there if your issue has already been reported.
5050
If you spotted it first, help us to smash it by providing a detailed and welcomed
51-
`feedback <https://github.com/beescoop/Obeesdoo/issues/new?body=module:%20product_scale_label%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
51+
`feedback <https://github.com/beescoop/Obeesdoo/issues/new?body=module:%20product_scale_label%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5252

5353
Do not contact contributors directly about support or help with technical issues.
5454

@@ -70,6 +70,6 @@ Contributors
7070
Maintainers
7171
~~~~~~~~~~~
7272

73-
This module is part of the `beescoop/Obeesdoo <https://github.com/beescoop/Obeesdoo/tree/12.0/product_scale_label>`_ project on GitHub.
73+
This module is part of the `beescoop/Obeesdoo <https://github.com/beescoop/Obeesdoo/tree/16.0/product_scale_label>`_ project on GitHub.
7474

7575
You are welcome to contribute.

product_scale_label/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
from . import models
2-
from .rename_beesdoo import rename_beesdoo

product_scale_label/__manifest__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
"author": "BEES coop - Cellule IT, Coop IT Easy SC",
1414
"website": "https://github.com/beescoop/Obeesdoo",
1515
"category": "Sales",
16-
"version": "12.0.2.0.0",
16+
"version": "16.0.1.0.0",
1717
"depends": [
18+
"point_of_sale",
1819
"product",
1920
"sale",
2021
],
@@ -24,7 +25,5 @@
2425
"views/uom_category_view.xml",
2526
"security/ir.model.access.csv",
2627
],
27-
"pre_init_hook": "rename_beesdoo",
28-
"installable": True,
2928
"license": "AGPL-3",
3029
}

product_scale_label/i18n/fr_BE.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 12.0\n"
7+
"Project-Id-Version: Odoo Server 16.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"POT-Creation-Date: 2020-08-03 09:47+0000\n"
1010
"PO-Revision-Date: 2020-08-03 09:47+0000\n"

product_scale_label/i18n/product_scale_label.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
msgid ""
66
msgstr ""
7-
"Project-Id-Version: Odoo Server 12.0\n"
7+
"Project-Id-Version: Odoo Server 16.0\n"
88
"Report-Msgid-Bugs-To: \n"
99
"Last-Translator: <>\n"
1010
"Language-Team: \n"

product_scale_label/models/product_template.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,20 @@ class ProductTemplate(models.Model):
99

1010
scale_label_info_1 = fields.Char(string="Scale label info 1")
1111
scale_label_info_2 = fields.Char(string="Scale label info 2")
12-
scale_sale_unit = fields.Char(
13-
compute="_compute_scale_sale_uom", string="Scale sale unit", store=True
14-
)
15-
scale_category = fields.Many2one("scale.category", string="Scale Category")
12+
scale_sale_unit = fields.Char(compute="_compute_scale_sale_uom", store=True)
13+
scale_category = fields.Many2one("scale.category")
1614
scale_category_code = fields.Integer(
1715
related="scale_category.code",
18-
string="Scale category code",
1916
readonly=True,
2017
store=True,
2118
)
2219

2320
@api.depends("uom_id", "uom_id.category_id", "uom_id.category_id.type")
24-
@api.multi
2521
def _compute_scale_sale_uom(self):
2622
for product in self:
2723
if product.uom_id.category_id.type == "unit":
2824
product.scale_sale_unit = "F"
2925
elif product.uom_id.category_id.type == "weight":
3026
product.scale_sale_unit = "P"
27+
else:
28+
product.scale_sale_unit = False

product_scale_label/rename_beesdoo.py

Lines changed: 0 additions & 77 deletions
This file was deleted.

product_scale_label/static/description/index.html

Lines changed: 39 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
54
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6-
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
5+
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
76
<title>beesdoo_product</title>
87
<style type="text/css">
98

109
/*
1110
:Author: David Goodger ([email protected])
12-
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
11+
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
1615
17-
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
16+
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1817
customize this style sheet.
1918
*/
2019

@@ -366,105 +365,67 @@ <h1 class="title">beesdoo_product</h1>
366365
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367366
!! This file is generated by oca-gen-addon-readme !!
368367
!! changes will be overwritten. !!
368+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369+
!! source digest: sha256:1a4c2282b2aba0174e84c5e9254cd7b9c7f9d4f8ca39a5ad97c1048470b2e90d
369370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/beescoop/obeesdoo/tree/12.0/beesdoo_product"><img alt="beescoop/obeesdoo" src="https://img.shields.io/badge/github-beescoop%2Fobeesdoo-lightgray.png?logo=github" /></a></p>
371-
<p>Modification of product module for the needs of beescoop</p>
372-
<ul>
373-
<li><p class="first">Adds the label bio/ethique/provenance.</p>
374-
</li>
375-
<li><p class="first">Adds hazard and FDS labels.</p>
376-
</li>
377-
<li><p class="first">Adds a main seller.</p>
378-
</li>
379-
<li><p class="first">Calculates total price with VAT and deposit price.</p>
380-
</li>
381-
<li><p class="first">Contains some facilitation for label printing.</p>
382-
</li>
383-
<li><p class="first">Adds a ‘Comments’ field for use on labels.</p>
384-
</li>
385-
<li><p class="first">Adds deadline for sale and consumption.</p>
386-
</li>
387-
<li><p class="first">Adds an ‘Ingredients’ field.</p>
388-
</li>
389-
<li><p class="first">Adds scale labels, sale units, and categories.</p>
390-
</li>
391-
<li><p class="first">Generates barcodes.</p>
392-
</li>
393-
<li><p class="first">Adds a ‘Suggested Price’ field on products, and a ‘Product Margin’ field on Partners (Vendors) and Product Categories.
394-
The first margin is used if set, otherwise the second margin (which has a default value) is used.</p>
395-
</li>
396-
<li><p class="first">The reference price on which this margin is applied (supplier price or sale price)
397-
can be selected in the general settings.</p>
398-
</li>
399-
<li><p class="first">Also, sale and supplier taxes that are of type ‘percentage’ and that are marked as ‘included in price’
400-
are taken into account when computing the suggested price.</p>
401-
</li>
402-
<li><p class="first">Round suggested price to 5 cents</p>
403-
</li>
404-
<li><p class="first">Adds “Edit Price” submenu on Point Of Sale, Purchase and Sale modules.
405-
The user lands on an editable List View with the following columns :</p>
371+
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/beescoop/Obeesdoo/tree/16.0/product_scale_label"><img alt="beescoop/Obeesdoo" src="https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github" /></a></p>
372+
<p>Add scale labels, sale units, and categories.
373+
Added fields are sent to Bizerba scales.</p>
374+
<p><strong>Table of contents</strong></p>
375+
<div class="contents local topic" id="contents">
406376
<ul class="simple">
407-
<li>Name (<cite>name</cite>)</li>
408-
<li>Main Seller (<cite>main_seller_id</cite>)</li>
409-
<li>Purchase Price (<cite>purchase_price</cite>)</li>
410-
<li>Purchase Unit of Measure (<cite>uom_po_id</cite>)</li>
411-
<li>Suggested Price (<cite>suggested_price</cite>)</li>
412-
<li>Sales Price (<cite>list_price</cite>)</li>
413-
<li>Unit of Measure (<cite>uom_id</cite>)</li>
377+
<li><a class="reference internal" href="#changelog" id="toc-entry-1">Changelog</a><ul>
378+
<li><a class="reference internal" href="#section-1" id="toc-entry-2">12.0.1.4.0 (2022-07-08)</a></li>
414379
</ul>
415-
<p>The only editable field is Purchase Price.
416-
Through “Action &gt; Adapt Sales Price”, the user can, on the selected products,
417-
adapt the Sales Price according to the Suggested Price.</p>
418-
</li>
419-
<li><p class="first">Allow searching a product given the product reference of the main
420-
seller (also known as the <cite>product_code</cite> of the <cite>product.supplierinfo</cite>
421-
object).</p>
422380
</li>
381+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
382+
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
383+
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
384+
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
385+
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
423386
</ul>
424-
<p>Please note that this model makes assumptions when computing the suggested price:</p>
425-
<ul class="simple">
426-
<li>It supposes that each product has only one supplier and that products coming from multiple suppliers
427-
occur as duplicated products with one supplier each.</li>
387+
</li>
428388
</ul>
429-
<p><strong>Table of contents</strong></p>
430-
<div class="contents local topic" id="contents">
389+
</div>
390+
<div class="section" id="changelog">
391+
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
392+
<div class="section" id="section-1">
393+
<h2><a class="toc-backref" href="#toc-entry-2">12.0.1.4.0 (2022-07-08)</a></h2>
394+
<p><strong>Features</strong></p>
431395
<ul class="simple">
432-
<li><a class="reference internal" href="#bug-tracker" id="id1">Bug Tracker</a></li>
433-
<li><a class="reference internal" href="#credits" id="id2">Credits</a><ul>
434-
<li><a class="reference internal" href="#authors" id="id3">Authors</a></li>
435-
<li><a class="reference internal" href="#contributors" id="id4">Contributors</a></li>
436-
<li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li>
437-
</ul>
438-
</li>
396+
<li>If ‘Automatically write suggested price’ is enabled in the configuration: when
397+
purchase price is changed in the ‘Edit Price’ menu, the sales price is now
398+
automatically updated to the suggested price. (<a class="reference external" href="https://github.com/beescoop/Obeesdoo/issues/320">#320</a>)</li>
439399
</ul>
440400
</div>
401+
</div>
441402
<div class="section" id="bug-tracker">
442-
<h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
443-
<p>Bugs are tracked on <a class="reference external" href="https://github.com/beescoop/obeesdoo/issues">GitHub Issues</a>.
403+
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
404+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/beescoop/Obeesdoo/issues">GitHub Issues</a>.
444405
In case of trouble, please check there if your issue has already been reported.
445-
If you spotted it first, help us smashing it by providing a detailed and welcomed
446-
<a class="reference external" href="https://github.com/beescoop/obeesdoo/issues/new?body=module:%20beesdoo_product%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
406+
If you spotted it first, help us to smash it by providing a detailed and welcomed
407+
<a class="reference external" href="https://github.com/beescoop/Obeesdoo/issues/new?body=module:%20product_scale_label%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
447408
<p>Do not contact contributors directly about support or help with technical issues.</p>
448409
</div>
449410
<div class="section" id="credits">
450-
<h1><a class="toc-backref" href="#id2">Credits</a></h1>
411+
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
451412
<div class="section" id="authors">
452-
<h2><a class="toc-backref" href="#id3">Authors</a></h2>
413+
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
453414
<ul class="simple">
454-
<li>Beescoop - Cellule IT</li>
415+
<li>BEES coop - Cellule IT</li>
455416
<li>Coop IT Easy SC</li>
456417
</ul>
457418
</div>
458419
<div class="section" id="contributors">
459-
<h2><a class="toc-backref" href="#id4">Contributors</a></h2>
420+
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
460421
<ul class="simple">
461-
<li>Beescoop - Cellule IT</li>
422+
<li>BEES coop - Cellule IT</li>
462423
<li>Coop IT Easy SC</li>
463424
</ul>
464425
</div>
465426
<div class="section" id="maintainers">
466-
<h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
467-
<p>This module is part of the <a class="reference external" href="https://github.com/beescoop/obeesdoo/tree/12.0/beesdoo_product">beescoop/obeesdoo</a> project on GitHub.</p>
427+
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
428+
<p>This module is part of the <a class="reference external" href="https://github.com/beescoop/Obeesdoo/tree/16.0/product_scale_label">beescoop/Obeesdoo</a> project on GitHub.</p>
468429
<p>You are welcome to contribute.</p>
469430
</div>
470431
</div>

product_scale_label/views/product_template_view.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
<record model="ir.ui.view" id="product_template_view_form">
3+
<record id="product_template_view_form" model="ir.ui.view">
44
<field name="name">product.template.form</field>
55
<field name="model">product.template</field>
66
<field name="inherit_id" ref="product.product_template_only_form_view" />
77
<field name="arch" type="xml">
88

99
<xpath expr="//group[@name='inventory']/.." position="after">
10+
<field name="to_weight" invisible="True" />
1011
<page
1112
string="Scale labels"
1213
attrs="{'invisible':[('to_weight','=',False)]}"

product_scale_label/views/scale_category_view.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<odoo>
3-
<record model="ir.ui.view" id="scale_category_list">
3+
<record id="scale_category_list" model="ir.ui.view">
44
<field name="name">scale.category.list</field>
55
<field name="model">scale.category</field>
66
<field name="arch" type="xml">
@@ -11,7 +11,7 @@
1111
</field>
1212
</record>
1313

14-
<record model="ir.ui.view" id="scale_category_form">
14+
<record id="scale_category_form" model="ir.ui.view">
1515
<field name="name">scale.category.form</field>
1616
<field name="model">scale.category</field>
1717
<field name="arch" type="xml">
@@ -24,7 +24,7 @@
2424
</field>
2525
</record>
2626

27-
<record model="ir.actions.act_window" id="action_scale_categories">
27+
<record id="action_scale_categories" model="ir.actions.act_window">
2828
<field name="name">Scale categories</field>
2929
<field name="res_model">scale.category</field>
3030
<field name="view_mode">tree,form</field>

0 commit comments

Comments
 (0)