Allow to round taxes on order-level

This commit is contained in:
Raphael Michel
2025-04-20 20:00:23 +02:00
parent b4264c0ae7
commit 3735b6b5a9
14 changed files with 555 additions and 77 deletions

View File

@@ -465,6 +465,28 @@ DEFAULTS = {
widget=forms.CheckboxInput(attrs={'data-checkbox-dependency': '#id_settings-order_phone_asked'}),
)
},
'tax_rounding': {
'default': 'line',
'type': str,
'form_class': forms.ChoiceField,
'serializer_class': serializers.ChoiceField,
'form_kwargs': dict(
label=_("Rounding of taxes"),
widget=forms.RadioSelect,
choices=(
('line', _('Rounding every line individually')),
('sum_by_net', _('Rounding by order total, keeping net prices stable')),
('sum_by_gross', _('Rounding by order total, keeping gross prices stable')),
),
),
'serializer_kwargs': dict(
choices=(
('line', _('Rounding every line individually')),
('sum_by_net', _('Rounding by order total, keeping net prices stable')),
('sum_by_gross', _('Rounding by order total, keeping gross prices stable')),
),
),
},
'invoice_address_asked': {
'default': 'True',
'type': bool,