diff --git a/pos_margin/README.rst b/pos_margin/README.rst index 6263379a..8b8d1eb9 100644 --- a/pos_margin/README.rst +++ b/pos_margin/README.rst @@ -93,6 +93,7 @@ Contributors * Sylvain LE GAL (https://twitter.com/legalsylvain) * Wolfgang Pichler +* Murtaza Mithaiwala (https://twitter.com/MurtazaMithaiw4) Maintainers ~~~~~~~~~~~ diff --git a/pos_margin/__manifest__.py b/pos_margin/__manifest__.py index 38502c1b..1038394f 100644 --- a/pos_margin/__manifest__.py +++ b/pos_margin/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'PoS Order Margin', 'summary': 'Margin on PoS Order', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'category': 'Point Of Sale', 'author': "GRAP," "Odoo Community Association (OCA)", diff --git a/pos_margin/models/pos_order.py b/pos_margin/models/pos_order.py index e3f306bc..f1125192 100644 --- a/pos_margin/models/pos_order.py +++ b/pos_margin/models/pos_order.py @@ -17,7 +17,6 @@ class PosOrder(models.Model): " the Unit Price and the cost price.") # Compute Section - @api.multi @api.depends('lines.margin') def _compute_margin(self): for order in self: diff --git a/pos_margin/models/pos_order_line.py b/pos_margin/models/pos_order_line.py index 9cb14f33..84609db6 100644 --- a/pos_margin/models/pos_order_line.py +++ b/pos_margin/models/pos_order_line.py @@ -19,7 +19,6 @@ class PosOrderLine(models.Model): multi='multi_margin', digits=dp.get_precision('Product Price')) # Compute Section - @api.multi @api.depends('product_id', 'qty', 'price_subtotal') def _compute_multi_margin(self): for line in self.filtered('product_id'): diff --git a/pos_margin/readme/CONTRIBUTORS.rst b/pos_margin/readme/CONTRIBUTORS.rst index 3b5f0996..947fc880 100644 --- a/pos_margin/readme/CONTRIBUTORS.rst +++ b/pos_margin/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Sylvain LE GAL (https://twitter.com/legalsylvain) * Wolfgang Pichler +* Murtaza Mithaiwala (https://twitter.com/MurtazaMithaiw4) diff --git a/pos_margin/readme/HISTORY.rst b/pos_margin/readme/HISTORY.rst index 04bbd269..f3639e85 100644 --- a/pos_margin/readme/HISTORY.rst +++ b/pos_margin/readme/HISTORY.rst @@ -1,7 +1,7 @@ -12.0.1.0.0 +13.0.1.0.0 ~~~~~~~~~~ -* Migrate to V12.0 +* Migrate to V13.0 * Reuse ``sale_margin`` computation to handle multi currency context. * Correct computation of margin, if a module that adds ``uom_id`` on ``pos.order.line`` is installed. diff --git a/pos_margin/static/description/index.html b/pos_margin/static/description/index.html index f0091af0..dfa337b1 100644 --- a/pos_margin/static/description/index.html +++ b/pos_margin/static/description/index.html @@ -413,9 +413,9 @@ for exemple).

Changelog

-

12.0.1.0.0

+

13.0.1.0.0

@@ -453,7 +454,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/pos project on GitHub.

+

This module is part of the OCA/pos project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/pos_margin/tests/test_module.py b/pos_margin/tests/test_module.py index 174a2681..c53e194c 100644 --- a/pos_margin/tests/test_module.py +++ b/pos_margin/tests/test_module.py @@ -46,13 +46,13 @@ class TestModule(TransactionCase): 'price_subtotal_incl': 18.0, }]], 'statement_ids': [[0, 0, { - 'journal_id': self.pos_config.journal_ids[0].id, + 'payment_method_id': + self.pos_config.payment_method_ids[0].id, 'amount': 18.0, 'name': fields.Datetime.now(), 'account_id': self.env.user.partner_id.property_account_receivable_id.id, - 'statement_id': - self.pos_config.current_session_id.statement_ids[0].id, + 'session_id' : self.pos_config.current_session_id.id, }]], 'creation_date': u'2018-09-27 15:51:03', 'amount_tax': 0, @@ -62,7 +62,6 @@ class TestModule(TransactionCase): 'sequence_number': 1, 'amount_total': 18.0, }} - result = self.PosOrder.create_from_ui([order_data]) - order = self.PosOrder.browse(result[0]) + order = self.PosOrder.browse(result[0].get('id')) return order