Saturday, January 6, 2024
2 changes · 17.0
Enhancements to existing features
The GSTR1 Base Report now shows GSTIN and detailed GST amounts, including CGST, SGST, IGST, CESS, and total amount for each move line. This makes it easier for businesses in India to review tax details directly in the report and supports more reusable reporting logic behind the scenes.
Original PR description
In this PR ------------- - Separate l10n_in tax detail query from GST Return Period to account move line (in l10n_in_reports) allowing re-usability of the that query - It adds the functionality to see the GSTIN, CGST, SGST, IGST and CESS and Total Amount of move line while viewing the GSTR1 Base Report task-3539187
Resolved issues and error corrections
This fix prevents an error when confirming sales orders that include section or note lines. It helps users complete orders reliably without being blocked by non-product line formatting.
Original PR description
Description of the issue/feature this PR addresses: Fix issue for float_compare error raised in the sale order line for section and notes. Current behavior before PR: When the sale order is confirmed…
Description of the issue/feature this PR addresses:
Fix issue for float_compare error raised in the sale order line for section and notes.
Current behavior before PR:
When the sale order is confirmed and if it includes sections, the following traceback appears:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/data/build/odoo/odoo/http.py", line 1734, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/data/build/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/data/build/odoo/odoo/http.py", line 1761, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/data/build/odoo/odoo/http.py", line 1962, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/data/build/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/data/build/odoo/odoo/addons/base/models/ir_http.py", line 207, in _dispatch
result = endpoint(**request.params)
File "/data/build/odoo/odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 24, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/data/build/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/data/build/odoo/odoo/api.py", line 445, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "/data/build/odoo/addons/web/models/models.py", line 71, in web_save
self.write(vals)
File "/data/build/odoo/addons/base_automation/models/base_automation.py", line 727, in write
write.origin(self.with_env(automations.env), vals, **kw)
File "/data/build/odoo/addons/sale_project/models/sale_order.py", line 266, in write
return super(SaleOrder, self).write(values)
File "/data/build/enterprise/sale_subscription/models/sale_order.py", line 587, in write
res = super().write(vals)
File "/data/build/odoo/addons/rating/models/rating_mixin.py", line 100, in write
result = super(RatingMixin, self).write(values)
File "/data/build/odoo/addons/event_sale/models/sale_order.py", line 17, in write
result = super(SaleOrder, self).write(vals)
File "/data/build/odoo/addons/sale_stock/models/sale_order.py", line 119, in write
res = super(SaleOrder, self).write(values)
File "/data/build/odoo/addons/mail/models/mail_thread.py", line 317, in write
result = super(MailThread, self).write(values)
File "/data/build/odoo/addons/mail/models/mail_activity_mixin.py", line 247, in write
return super(MailActivityMixin, self).write(vals)
File "/data/build/odoo/odoo/models.py", line 4371, in write
field.write(self, value)
File "/data/build/odoo/odoo/fields.py", line 4289, in write
self.write_batch([(records, value)])
File "/data/build/odoo/odoo/fields.py", line 4310, in write_batch
self.write_real(records_commands_list, create)
File "/data/build/odoo/odoo/fields.py", line 4464, in write_real
comodel.browse(command[1]).write(command[2])
File "/data/build/odoo/addons/sale_project/models/sale_order_line.py", line 129, in write
result = super().write(values)
File "/data/build/enterprise/sale_planning/models/sale_order_line.py", line 68, in write
res = super().write(vals)
File "/data/build/enterprise/sale_stock_renting/models/sale_order_line.py", line 90, in write
return super(RentalOrderLine, self).write(vals)
File "/data/build/enterprise/sale_loyalty_taxcloud/models/sale_order_line.py", line 47, in write
return super().write(vals)
File "/data/build/odoo/addons/repair/models/sale_order.py", line 74, in write
if float_compare(old_product_uom_qty[line.id], 0, precision_rounding=line.product_uom.rounding) <= 0 and float_compare(line.product_uom_qty, 0, precision_rounding=line.product_uom.rounding) > 0:
File "/data/build/odoo/odoo/tools/float_utils.py", line 155, in float_compare
rounding_factor = _float_check_precision(precision_digits=precision_digits,
File "/data/build/odoo/odoo/tools/float_utils.py", line 29, in _float_check_precision
assert precision_rounding is None or precision_rounding > 0,\
AssertionError: precision_rounding must be positive, got 0.0
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPCError@https://55887316-master-all.runbot176.odoo.com/web/assets/fc3e086/web.assets_web.min.js:2904:338
makeErrorFromResponse@https://55887316-master-all.runbot176.odoo.com/web/assets/fc3e086/web.assets_web.min.js:2907:163
rpc._rpc/promise</<@https://55887316-master-all.runbot176.odoo.com/web/assets/fc3e086/web.assets_web.min.js:2912:34
Desired behavior after PR is merged:
The float_compare method in the repair module should only be called for regular line items, not for notes or sections.
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr