Browse Source

[MIG] pos_order_return: Migration to 12.0

pull/418/head
david 5 years ago
parent
commit
210f71994d
  1. 10
      pos_order_return/README.rst
  2. 2
      pos_order_return/__manifest__.py
  3. 2
      pos_order_return/demo/product_product.xml
  4. 1
      pos_order_return/models/product_template.py
  5. 6
      pos_order_return/static/description/index.html
  6. 10
      pos_order_return/tests/test_pos_order_return.py
  7. 2
      pos_order_return/wizard/pos_partial_return_wizard.py

10
pos_order_return/README.rst

@ -14,13 +14,13 @@ Point of Sale Order Return
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/11.0/pos_order_return
:target: https://github.com/OCA/pos/tree/12.0/pos_order_return
:alt: OCA/pos :alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_order_return
:target: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_return
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/184/11.0
:target: https://runbot.odoo-community.org/runbot/184/12.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -87,7 +87,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_order_return%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/pos/issues/new?body=module:%20pos_order_return%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.
@ -133,6 +133,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/11.0/pos_order_return>`_ project on GitHub.
This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/12.0/pos_order_return>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
pos_order_return/__manifest__.py

@ -5,7 +5,7 @@
{ {
'name': 'Point of Sale Order Return', 'name': 'Point of Sale Order Return',
'version': '11.0.1.0.0',
'version': '12.0.1.0.0',
'category': 'Point Of Sale', 'category': 'Point Of Sale',
'author': 'La Louve, ' 'author': 'La Louve, '
'GRAP, ' 'GRAP, '

2
pos_order_return/demo/product_product.xml

@ -5,7 +5,7 @@
<field name="name">Returnable Bottle</field> <field name="name">Returnable Bottle</field>
<field name="default_code">RET-BOTL</field> <field name="default_code">RET-BOTL</field>
<field name="categ_id" ref="product.product_category_all" /> <field name="categ_id" ref="product.product_category_all" />
<field name="uom_id" ref="product.product_uom_unit" />
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="sale_ok" eval="True" /> <field name="sale_ok" eval="True" />
<field name="available_in_pos" eval="True" /> <field name="available_in_pos" eval="True" />
<field name="pos_allow_negative_qty" eval="True" /> <field name="pos_allow_negative_qty" eval="True" />

1
pos_order_return/models/product_template.py

@ -10,4 +10,5 @@ class ProductTemplate(models.Model):
pos_allow_negative_qty = fields.Boolean( pos_allow_negative_qty = fields.Boolean(
string='Allow Negative Quantity on PoS', string='Allow Negative Quantity on PoS',
default=True,
) )

6
pos_order_return/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/OCA/pos/tree/11.0/pos_order_return"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pos-11-0/pos-11-0-pos_order_return"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/184/11.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<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/OCA/pos/tree/12.0/pos_order_return"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_order_return"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/184/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of odoo Point Of Sale about POS Order <p>This module extends the functionality of odoo Point Of Sale about POS Order
returns.</p> returns.</p>
<p>With this module, it is now forbidden to return more quantity than the initial <p>With this module, it is now forbidden to return more quantity than the initial
@ -427,7 +427,7 @@ not indicated:</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_order_return%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_order_return%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -467,7 +467,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/11.0/pos_order_return">OCA/pos</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/pos/tree/12.0/pos_order_return">OCA/pos</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

10
pos_order_return/tests/test_pos_order_return.py

@ -47,23 +47,33 @@ class TestPOSOrderReturn(common.HttpCase):
'session_id': self.pos_config.current_session_id.id, 'session_id': self.pos_config.current_session_id.id,
'partner_id': self.partner.id, 'partner_id': self.partner.id,
'pricelist_id': self.partner.property_product_pricelist.id, 'pricelist_id': self.partner.property_product_pricelist.id,
'amount_tax': 0,
'amount_total': 2700,
'amount_paid': 2700,
'amount_return': 0,
'lines': [ 'lines': [
(0, 0, { (0, 0, {
'name': 'POSLINE/0001', 'name': 'POSLINE/0001',
'product_id': self.product_1.id, 'product_id': self.product_1.id,
'price_unit': 450, 'price_unit': 450,
'price_subtotal': 450,
'price_subtotal_incl': 450,
'qty': 2.0, 'qty': 2.0,
}), }),
(0, 0, { (0, 0, {
'name': 'POSLINE/0002', 'name': 'POSLINE/0002',
'product_id': self.product_2.id, 'product_id': self.product_2.id,
'price_unit': 450, 'price_unit': 450,
'price_subtotal': 450,
'price_subtotal_incl': 450,
'qty': 2.0, 'qty': 2.0,
}), }),
(0, 0, { (0, 0, {
'name': 'POSLINE/0003', 'name': 'POSLINE/0003',
'product_id': self.product_1.id, 'product_id': self.product_1.id,
'price_unit': 450, 'price_unit': 450,
'price_subtotal': 450,
'price_subtotal_incl': 450,
'qty': 2.0, 'qty': 2.0,
}), }),
], ],

2
pos_order_return/wizard/pos_partial_return_wizard.py

@ -7,6 +7,7 @@ from odoo import api, fields, models
class PosPartialReturnWizard(models.TransientModel): class PosPartialReturnWizard(models.TransientModel):
_name = 'pos.partial.return.wizard' _name = 'pos.partial.return.wizard'
_description = 'Partial Return Wizard'
order_id = fields.Many2one( order_id = fields.Many2one(
comodel_name='pos.order', comodel_name='pos.order',
@ -43,6 +44,7 @@ class PosPartialReturnWizard(models.TransientModel):
class PosPartialReturnWizardLine(models.TransientModel): class PosPartialReturnWizardLine(models.TransientModel):
_name = 'pos.partial.return.wizard.line' _name = 'pos.partial.return.wizard.line'
_description = 'Partial Return Wizard Line'
wizard_id = fields.Many2one( wizard_id = fields.Many2one(
comodel_name='pos.partial.return.wizard', comodel_name='pos.partial.return.wizard',

Loading…
Cancel
Save