summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/account/models/account_cash_rounding.py1
-rw-r--r--addons/point_of_sale/views/pos_config_view.xml2
2 files changed, 2 insertions, 1 deletions
diff --git a/addons/account/models/account_cash_rounding.py b/addons/account/models/account_cash_rounding.py
index 7d105c60288..3d0c85d26e2 100644
--- a/addons/account/models/account_cash_rounding.py
+++ b/addons/account/models/account_cash_rounding.py
@@ -25,6 +25,7 @@ class AccountCashRounding(models.Model):
rounding_method = fields.Selection(string='Rounding Method', required=True,
selection=[('UP', 'UP'), ('DOWN', 'DOWN'), ('HALF-UP', 'HALF-UP')],
default='HALF-UP', help='The tie-breaking rule used for float rounding operations')
+ company_id = fields.Many2one('res.company', related='profit_account_id.company_id')
def round(self, amount):
"""Compute the rounding on the amount passed as parameter.
diff --git a/addons/point_of_sale/views/pos_config_view.xml b/addons/point_of_sale/views/pos_config_view.xml
index 10a57d7b709..6fba101c259 100644
--- a/addons/point_of_sale/views/pos_config_view.xml
+++ b/addons/point_of_sale/views/pos_config_view.xml
@@ -354,7 +354,7 @@
<div class="content-group mt16" attrs="{'invisible': [('cash_rounding', '=', False)]}">
<div class="row mt16">
<label string="Rounding Method" for="rounding_method" class="col-lg-3 o_light_label" />
- <field name="rounding_method" attrs="{'required' : [('cash_rounding', '=', True)]}"/>
+ <field name="rounding_method" attrs="{'required' : [('cash_rounding', '=', True)]}" domain="[('company_id', '=', company_id)]"/>
</div>
</div>
</div>