mirror of
https://github.com/bringout/oca-ocb-l10n_asia-pacific.git
synced 2026-04-26 22:22:02 +02:00
19.0 vanilla
This commit is contained in:
parent
7dc55599c6
commit
7f43bbbfcc
650 changed files with 45260 additions and 33436 deletions
|
|
@ -10,38 +10,15 @@ pip install odoo-bringout-oca-ocb-l10n_in_sale
|
|||
|
||||
## Dependencies
|
||||
|
||||
This addon depends on:
|
||||
- l10n_in
|
||||
- sale
|
||||
|
||||
## Manifest Information
|
||||
|
||||
- **Name**: Indian - Sale Report(GST)
|
||||
- **Version**: 1.0
|
||||
- **Category**: Accounting/Localizations/Sale
|
||||
- **License**: LGPL-3
|
||||
- **Installable**: True
|
||||
|
||||
## Source
|
||||
|
||||
Based on [OCA/OCB](https://github.com/OCA/OCB) branch 16.0, addon `l10n_in_sale`.
|
||||
- Repository: https://github.com/OCA/OCB
|
||||
- Branch: 19.0
|
||||
- Path: addons/l10n_in_sale
|
||||
|
||||
## License
|
||||
|
||||
This package maintains the original LGPL-3 license from the upstream Odoo project.
|
||||
|
||||
## Documentation
|
||||
|
||||
- Overview: doc/OVERVIEW.md
|
||||
- Architecture: doc/ARCHITECTURE.md
|
||||
- Models: doc/MODELS.md
|
||||
- Controllers: doc/CONTROLLERS.md
|
||||
- Wizards: doc/WIZARDS.md
|
||||
- Reports: doc/REPORTS.md
|
||||
- Security: doc/SECURITY.md
|
||||
- Install: doc/INSTALL.md
|
||||
- Usage: doc/USAGE.md
|
||||
- Configuration: doc/CONFIGURATION.md
|
||||
- Dependencies: doc/DEPENDENCIES.md
|
||||
- Troubleshooting: doc/TROUBLESHOOTING.md
|
||||
- FAQ: doc/FAQ.md
|
||||
This package preserves the original LGPL-3 license.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
{
|
||||
'name': 'Indian - Sale Report(GST)',
|
||||
'icon': '/l10n_in/static/description/icon.png',
|
||||
'version': '1.0',
|
||||
'description': """GST Sale Report""",
|
||||
'category': 'Accounting/Localizations/Sale',
|
||||
|
|
@ -12,13 +11,13 @@
|
|||
'sale',
|
||||
],
|
||||
'data': [
|
||||
'views/report_sale_order.xml',
|
||||
'views/sale_views.xml',
|
||||
'views/sale_order_views.xml',
|
||||
],
|
||||
'demo': [
|
||||
'data/product_demo.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
'author': 'Odoo S.A.',
|
||||
'license': 'LGPL-3',
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
<odoo>
|
||||
<data noupdate="1">
|
||||
<record id="sale.advance_product_0" model="product.product">
|
||||
<field name="l10n_in_hsn_code">8303.00.00</field>
|
||||
<field name="l10n_in_hsn_description">Armoured or reinforced safes, strong boxes and doors and safe deposit lockers for strong rooms, cash or deed boxes and the like, of base metal
|
||||
</field>
|
||||
<field name="l10n_in_hsn_code">83030000</field>
|
||||
</record>
|
||||
</data>
|
||||
</odoo>
|
||||
|
|
|
|||
47
odoo-bringout-oca-ocb-l10n_in_sale/l10n_in_sale/i18n/hi.po
Normal file
47
odoo-bringout-oca-ocb-l10n_in_sale/l10n_in_sale/i18n/hi.po
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_in_sale
|
||||
#
|
||||
# Weblate <noreply-mt-weblate@weblate.org>, 2025.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 19.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-12-30 19:07+0000\n"
|
||||
"PO-Revision-Date: 2025-11-17 03:12+0000\n"
|
||||
"Last-Translator: Weblate <noreply-mt-weblate@weblate.org>\n"
|
||||
"Language-Team: Hindi <https://translate.odoo.com/projects/odoo-19-l10n/"
|
||||
"l10n_in_sale/hi/>\n"
|
||||
"Language: hi\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n==0 || n==1);\n"
|
||||
"X-Generator: Weblate 5.12.2\n"
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_advance_payment_inv__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "डिस्प्ले का नाम"
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_advance_payment_inv__id
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__id
|
||||
msgid "ID"
|
||||
msgstr "आईडी"
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__l10n_in_reseller_partner_id
|
||||
msgid "Reseller"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model,name:l10n_in_sale.model_sale_advance_payment_inv
|
||||
msgid "Sales Advance Payment Invoice"
|
||||
msgstr "सेल्स ऐडवांस पेमेंट इनवॉइस"
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model,name:l10n_in_sale.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr "सेल्स ऑर्डर"
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * l10n_in_sale
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 19.0+e\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-12-30 19:07+0000\n"
|
||||
"PO-Revision-Date: 2025-12-30 19:07+0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_advance_payment_inv__display_name
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_advance_payment_inv__id
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model.fields,field_description:l10n_in_sale.field_sale_order__l10n_in_reseller_partner_id
|
||||
msgid "Reseller"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model,name:l10n_in_sale.model_sale_advance_payment_inv
|
||||
msgid "Sales Advance Payment Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_sale
|
||||
#: model:ir.model,name:l10n_in_sale.model_sale_order
|
||||
msgid "Sales Order"
|
||||
msgstr ""
|
||||
|
|
@ -8,51 +8,71 @@ class SaleOrder(models.Model):
|
|||
_inherit = "sale.order"
|
||||
|
||||
l10n_in_reseller_partner_id = fields.Many2one('res.partner',
|
||||
string='Reseller', domain="[('vat', '!=', False), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})
|
||||
l10n_in_journal_id = fields.Many2one('account.journal', string="Journal", compute="_compute_l10n_in_journal_id", store=True, readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]})
|
||||
l10n_in_gst_treatment = fields.Selection([
|
||||
('regular', 'Registered Business - Regular'),
|
||||
('composition', 'Registered Business - Composition'),
|
||||
('unregistered', 'Unregistered Business'),
|
||||
('consumer', 'Consumer'),
|
||||
('overseas', 'Overseas'),
|
||||
('special_economic_zone', 'Special Economic Zone'),
|
||||
('deemed_export', 'Deemed Export'),
|
||||
('uin_holders', 'UIN Holders'),
|
||||
], string="GST Treatment", readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, compute="_compute_l10n_in_gst_treatment", store=True)
|
||||
string='Reseller', domain="[('vat', '!=', False), '|', ('company_id', '=', False), ('company_id', '=', company_id)]", readonly=False)
|
||||
|
||||
@api.depends('partner_id')
|
||||
def _compute_l10n_in_gst_treatment(self):
|
||||
for order in self:
|
||||
# set default value as False so CacheMiss error never occurs for this field.
|
||||
order.l10n_in_gst_treatment = False
|
||||
if order.country_code == 'IN':
|
||||
l10n_in_gst_treatment = order.partner_id.l10n_in_gst_treatment
|
||||
if not l10n_in_gst_treatment and order.partner_id.country_id and order.partner_id.country_id.code != 'IN':
|
||||
l10n_in_gst_treatment = 'overseas'
|
||||
if not l10n_in_gst_treatment:
|
||||
l10n_in_gst_treatment = order.partner_id.vat and 'regular' or 'consumer'
|
||||
order.l10n_in_gst_treatment = l10n_in_gst_treatment
|
||||
@api.depends('partner_invoice_id')
|
||||
def _compute_fiscal_position_id(self):
|
||||
|
||||
@api.depends('company_id')
|
||||
def _compute_l10n_in_journal_id(self):
|
||||
for order in self:
|
||||
if order._origin and order._origin.company_id == order.company_id and order.l10n_in_journal_id.company_id == order.company_id:
|
||||
continue
|
||||
# set default value as False so CacheMiss error never occurs for this field.
|
||||
order.l10n_in_journal_id = False
|
||||
if order.country_code == 'IN':
|
||||
domain = [('company_id', '=', order.company_id.id), ('type', '=', 'sale')]
|
||||
journal = self.env['account.journal'].search(domain, limit=1)
|
||||
if journal:
|
||||
order.l10n_in_journal_id = journal.id
|
||||
def _get_partner_fiscal(order):
|
||||
order = order.with_company(order.company_id)
|
||||
return (
|
||||
order.partner_shipping_id.property_account_position_id
|
||||
or order.partner_invoice_id.property_account_position_id
|
||||
or order.partner_id.property_account_position_id
|
||||
)
|
||||
|
||||
def _get_fiscal_state(order):
|
||||
"""
|
||||
Maps each order to its corresponding fiscal state based on its type,
|
||||
fiscal conditions, and the state of the associated partner or company.
|
||||
"""
|
||||
|
||||
partner_to_consider = order.partner_invoice_id or order.partner_id
|
||||
if partner_to_consider.l10n_in_gst_treatment == 'special_economic_zone':
|
||||
# Special Economic Zone
|
||||
return sez_state
|
||||
|
||||
# Computing Place of Supply for particular order
|
||||
partner = (
|
||||
partner_to_consider.commercial_partner_id == order.partner_shipping_id.commercial_partner_id
|
||||
and order.partner_shipping_id
|
||||
or partner_to_consider
|
||||
)
|
||||
if partner.country_id and partner.country_id.code != 'IN':
|
||||
return foreign_state
|
||||
partner_state = partner.state_id or partner_to_consider.commercial_partner_id.state_id or order.company_id.state_id
|
||||
country_code = partner_state.country_id.code or order.country_code
|
||||
return partner_state if country_code == 'IN' else foreign_state
|
||||
|
||||
# Handle non-Indian orders using standard logic
|
||||
FiscalPosition = self.env['account.fiscal.position']
|
||||
non_in_orders = self.filtered(lambda o: o.country_code != 'IN')
|
||||
super(SaleOrder, non_in_orders)._compute_fiscal_position_id()
|
||||
|
||||
in_orders = self - non_in_orders
|
||||
orders_group_by_fp = in_orders.grouped(_get_partner_fiscal)
|
||||
orders_without_fiscal = orders_group_by_fp.pop(FiscalPosition, False)
|
||||
for fiscal_position, orders in orders_group_by_fp.items():
|
||||
orders.fiscal_position_id = fiscal_position
|
||||
|
||||
if not orders_without_fiscal:
|
||||
return
|
||||
|
||||
foreign_state = self.env['res.country.state'].search([('country_id.code', '!=', 'IN')], limit=1)
|
||||
sez_state = self.env.ref('l10n_in.state_in_oc', raise_if_not_found=False)
|
||||
for state, orders in orders_without_fiscal.grouped(_get_fiscal_state).items():
|
||||
virtual_partner = self.env['res.partner'].new({
|
||||
'state_id': state.id,
|
||||
'country_id': state.country_id.id,
|
||||
})
|
||||
# Group orders by company to avoid multi-company conflicts
|
||||
for company, company_orders in orders.grouped('company_id').items():
|
||||
company_orders.fiscal_position_id = FiscalPosition.with_company(
|
||||
company.id
|
||||
)._get_fiscal_position(virtual_partner)
|
||||
|
||||
def _prepare_invoice(self):
|
||||
invoice_vals = super(SaleOrder, self)._prepare_invoice()
|
||||
if self.country_code == 'IN':
|
||||
invoice_vals['l10n_in_reseller_partner_id'] = self.l10n_in_reseller_partner_id.id
|
||||
if self.l10n_in_journal_id:
|
||||
invoice_vals['journal_id'] = self.l10n_in_journal_id.id
|
||||
invoice_vals['l10n_in_gst_treatment'] = self.l10n_in_gst_treatment
|
||||
return invoice_vals
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import test_l10n_in_sale_fiscal_position
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
from odoo import Command, fields
|
||||
from odoo.tests import tagged
|
||||
|
||||
from odoo.addons.l10n_in.tests.common import L10nInTestInvoicingCommon
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install', 'post_install_l10n')
|
||||
class TestSaleFiscal(L10nInTestInvoicingCommon):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
|
||||
# Remove fiscal position 'property_account_position_id' so it does not show up on orders
|
||||
cls.partner_b.property_account_position_id = None
|
||||
|
||||
def _assert_order_fiscal_position(self, fpos_ref, partner, post=True):
|
||||
test_order = self.env['sale.order'].sudo().create({
|
||||
'partner_id': partner,
|
||||
'company_id': self.env.company.id,
|
||||
'order_line': [
|
||||
Command.create({
|
||||
'product_id': self.product.id,
|
||||
'product_uom_qty': 10,
|
||||
}),
|
||||
],
|
||||
})
|
||||
if post:
|
||||
test_order.action_confirm()
|
||||
self.assertEqual(
|
||||
test_order.fiscal_position_id,
|
||||
self.env['account.chart.template'].with_company(self.env.company).ref(fpos_ref)
|
||||
)
|
||||
return test_order
|
||||
|
||||
def test_l10n_in_sale_fiscal_position(self):
|
||||
'''
|
||||
According to GST: Compare place of supply (instead of delivery address) with company state
|
||||
'''
|
||||
|
||||
self.env = self.env['base'].with_company(self.default_company).env
|
||||
template = self.env['account.chart.template']
|
||||
company_state = self.env.company.state_id
|
||||
|
||||
# Sub-test: Intra-State
|
||||
with self.subTest(scenario="Intra-State"):
|
||||
self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_intra_state',
|
||||
partner=self.partner_a.id,
|
||||
)
|
||||
|
||||
# Sub-test: Inter-State
|
||||
with self.subTest(scenario="Inter-State"):
|
||||
self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_inter_state',
|
||||
partner=self.partner_b.id,
|
||||
)
|
||||
|
||||
# Sub-test: Export (Outside India)
|
||||
with self.subTest(scenario="Export"):
|
||||
self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_export_sez_in',
|
||||
partner=self.partner_foreign.id,
|
||||
)
|
||||
|
||||
# Sub-test: SEZ (Special Economic Zone)
|
||||
with self.subTest(scenario="SEZ"):
|
||||
# Here fpos should Intra-State. But due to `l10n_in_gst_treatment` on partner, it will be SEZ
|
||||
self.partner_a.l10n_in_gst_treatment = 'special_economic_zone'
|
||||
sale_order = self.env['sale.order'].sudo().with_company(self.env.company).create({
|
||||
'date_order': fields.Date.from_string('2019-01-01'),
|
||||
'partner_id': self.partner_a.id, # Intra-State Partner
|
||||
'order_line': [Command.create({
|
||||
'product_id': self.product_a.id,
|
||||
'product_uom_qty': 10,
|
||||
'name': 'product test 1',
|
||||
'price_unit': 40,
|
||||
})]
|
||||
})
|
||||
|
||||
self.assertEqual(
|
||||
sale_order.fiscal_position_id,
|
||||
template.ref('fiscal_position_in_sez')
|
||||
)
|
||||
|
||||
# Sub-test: Manual Partner Fiscal Check
|
||||
with self.subTest(scenario="Manual Partner Fiscal Check"):
|
||||
# Here fpos should Inter-State. But due to `property_account_position_id` it will be Export/SEZ
|
||||
self.partner_a.write({
|
||||
'state_id': company_state.id, # Company State
|
||||
'property_account_position_id': template.ref('fiscal_position_in_export_sez_in').id
|
||||
})
|
||||
self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_export_sez_in',
|
||||
partner=self.partner_a.id,
|
||||
)
|
||||
|
||||
def test_l10n_in_sale_invoice_fiscal_position(self):
|
||||
"""Ensure the fiscal position is correctly compute from the sale order to the invoice."""
|
||||
self.env.company = self.default_company
|
||||
|
||||
# Create a sale order with an intra-state fiscal position
|
||||
sale_order = self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_intra_state',
|
||||
partner=self.partner_a.id,
|
||||
post=False,
|
||||
)
|
||||
|
||||
# Change the `invoice_partner` to an inter-state and verify the updated fiscal position
|
||||
sale_order.write({'partner_invoice_id': self.partner_b.id})
|
||||
self.assertEqual(
|
||||
sale_order.fiscal_position_id,
|
||||
self.env['account.chart.template'].ref('fiscal_position_in_inter_state')
|
||||
)
|
||||
|
||||
# Confirm SO and create invoice
|
||||
sale_order.action_confirm()
|
||||
invoice = sale_order._create_invoices()
|
||||
|
||||
# Force FP recompute on invoice by re-applying partner
|
||||
invoice.write({'partner_id': self.partner_b.id})
|
||||
self.assertEqual(
|
||||
invoice.fiscal_position_id,
|
||||
sale_order.fiscal_position_id,
|
||||
)
|
||||
|
||||
def test_foreign_partner_without_state_fiscal_position(self):
|
||||
""" Verify foreign partner without state gets export fiscal position """
|
||||
self.env = self.env['base'].with_company(self.default_company).env
|
||||
|
||||
self._assert_order_fiscal_position(
|
||||
fpos_ref='fiscal_position_in_export_sez_in',
|
||||
partner=self.partner_foreign_no_state.id,
|
||||
)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="gst_report_saleorder_document_inherit" inherit_id="sale.report_saleorder_document">
|
||||
<xpath expr="//span[@t-field='line.name']" position="after">
|
||||
<t t-if="line.product_id.l10n_in_hsn_code and line.company_id.account_fiscal_country_id.code == 'IN'">
|
||||
<h6><strong class="ml16">HSN/SAC Code:</strong> <span t-field="line.product_id.l10n_in_hsn_code"/></h6>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_order_form_inherit_l10n_in_sale" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.inherit.l10n.in.sale</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="partner_id" position="after">
|
||||
<field
|
||||
name="l10n_in_reseller_partner_id"
|
||||
groups="l10n_in.group_l10n_in_reseller"
|
||||
invisible="country_code != 'IN'"
|
||||
readonly="state not in ['draft', 'sent']"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_order_form_inherit_l10n_in_sale" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.inherit.l10n.in.sale</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="country_code" invisible="1"/>
|
||||
<field name="l10n_in_reseller_partner_id" groups="l10n_in.group_l10n_in_reseller"
|
||||
attrs="{'invisible': [('country_code','!=', 'IN')]}"/>
|
||||
<field name="l10n_in_gst_treatment"
|
||||
attrs="{'invisible':[('country_code','!=','IN')],'required':[('country_code','=','IN')]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='sale_info']//field[@name='invoice_status']" position="after">
|
||||
<field name="l10n_in_journal_id" domain="[('company_id', '=', company_id), ('type','=','sale')]" options="{'no_create': True}" attrs="{'invisible': [('country_code','!=', 'IN')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -7,12 +7,8 @@ from odoo import models
|
|||
class SaleAdvancePaymentInv(models.TransientModel):
|
||||
_inherit = "sale.advance.payment.inv"
|
||||
|
||||
def _prepare_invoice_values(self, order, so_line):
|
||||
res = super()._prepare_invoice_values(order, so_line)
|
||||
if order.l10n_in_journal_id:
|
||||
res['journal_id'] = order.l10n_in_journal_id.id
|
||||
if order.country_code == 'IN':
|
||||
res['l10n_in_gst_treatment'] = order.l10n_in_gst_treatment
|
||||
def _prepare_invoice_values(self, order, so_line, accounts):
|
||||
res = super()._prepare_invoice_values(order, so_line, accounts)
|
||||
if order.l10n_in_reseller_partner_id:
|
||||
res['l10n_in_reseller_partner_id'] = order.l10n_in_reseller_partner_id
|
||||
return res
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
[project]
|
||||
name = "odoo-bringout-oca-ocb-l10n_in_sale"
|
||||
version = "16.0.0"
|
||||
description = "Indian - Sale Report(GST) - Odoo addon"
|
||||
description = "Indian - Sale Report(GST) -
|
||||
Odoo addon
|
||||
"
|
||||
authors = [
|
||||
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
|
||||
]
|
||||
dependencies = [
|
||||
"odoo-bringout-oca-ocb-l10n_in>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-sale>=16.0.0",
|
||||
"odoo-bringout-oca-ocb-l10n_in>=19.0.0",
|
||||
"odoo-bringout-oca-ocb-sale>=19.0.0",
|
||||
"requests>=2.25.1"
|
||||
]
|
||||
readme = "README.md"
|
||||
|
|
@ -17,7 +19,7 @@ classifiers = [
|
|||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Topic :: Office/Business",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue