summaryrefslogtreecommitdiff
path: root/addons/l10n_in/models
AgeCommit message (Collapse)Author
2021-02-05[FIX] l10n_in: If vat is not available in delivery address then check same ↵Jigar Vaghela
in customer This below case is not working before this commit: when Bill to Ship to where Delivery address partner is not registered and not have GSTIN closes odoo/odoo#65270 Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-05[FIX] l10n_in: Fix custom taxes grouping only for indian companyLaurent Smet
closes odoo/odoo#61374 X-original-commit: cf3258f47b6ddf061e9bb2c525b2fd064cbab85b Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com> Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-08-05[IMP] account: soft post entries in the futurewilliam
Add an easy way to not post the entries in the future when calling post() on it, but rather set it to be auto-posted at accounting date. This is useful when we are creating a lot of entries in batch and some might be in the future, some in the past, and we don't want to separate that in two batch every time. (asset, accrual, transfer,... )
2020-06-30[FIX] *: correct all or improve code translation lookupMartin Trigaux
This commit fixes all issues detected by the new pylint gettext-variable test. It converts some calls to the new syntax _("Foo %s", bar) to progressively migrate the code to the new syntax. A few calls were not technically incorrect but still detected by the linter. _("Foo" + "Bar") has been converted to _("Foo" "Bar") as it has the same effect and make sure the argument is of type asteroid.Const instead of BinOp). closes odoo/odoo#53683 Related: odoo/enterprise#11467 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-30[IMP] l10n_in: Simplify GST invoiceJigar Vaghela
GST Treatment: * Is show that how This invoice or partner is treated in GST * Set default value in customer * This is help in GST retrun filing. * Value of treamtmnet as below - Registered Business - Regular - Registered Business - Composition - Unregistered Business - Consumer - Overseas - Special Economic Zone - Deemed Export * GSTIN is required in - Registered Business - Regular - Registered Business - Composition - Special Economic Zone - Deemed Export GSTIN: * GST identification number or GST number * There can be multiple GSTIN for a single person, being an assessee under the Income Tax Act for every State or Union Territory in which such person operates from * Add Validate of this number using regular expression remove field l10n_in_export_type and l10n_in_import_export becouse it's covered by GST Treatment remove field l10n_in_partner_vat becouse not use anyware.
2020-03-24[IMP] l10n_xx: hide country specific fields from company/settings viewRavi Gohil
There are few fields added on settings and on company form view by various l10n modules which are meant for particular country's user and are of no use to others. Such fields should be hidden from unrelated users. With this commit, it will be the case. closes odoo/odoo#35755 Task: 2049977 Closes: #35755 Related: odoo/enterprise#5158 Related: odoo/enterprise#5158 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-12-04[FIX] l10n_in: Fix tax grouping keyJigar Vaghela
tax grouping key from base and tax line that will be used as a key to group taxes together so both functions must have the same dictionary key. (you can check comment here https://github.com/odoo/odoo/blob/13.0/addons/account/models/account_move.py#L412) here we have three key (product_id,product_uom_id,quantity) in _get_tax_grouping_key_from_base_line and only one key (product_id) in _get_tax_grouping_key_from_tax_line so we get wrong tax calculation now we remove that extra key(product_uom_id, quantity) because we don't need group by these key values. closes odoo/odoo#41340 X-original-commit: a758e5eace55bad0c11f8a27ba83e8367d293487 Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-02[FIX] account, l10n_in: amount by group base when overridenLucas Perais (lpe)
Fine tuning of 7bea912 In india there are as many tax lines on an invoices as there are repartition lines (classic) * products So, before this commit, preventing adding the base if tax was already seen was not enough, the base was still added many times After this commit, hopefully, the based on amount is correct for each tax Forward port of #37390 closes odoo/odoo#37784 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-27[IMP] l10n_in*: multi GSTIN Using journalJigar Vaghela
======= Purpose ======= government rule that "GST registration should be obtained by a taxable person under GST in each of the State or Union Territory, from where the taxable supply of goods or services is made" So we managed this using journal User create journal and partner for other states After user can select journal in Sale order, Purchase order and warehouse ======== Solution ======== -Add a field on the journal to define the GSTIN -Add sale and purchase journal field in warehouse -On the SO/PO, add the journal field and based on the warehouse journal it set automatically fill if warehouse journal is set. task 1917619
2019-07-17[REM] *: calls to @api.multiAdrian Torres
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2019-07-01[MERGE] manual forward port of accounting-pocalypse ↵Laurent Smet
(beaa30a3d1843de43a45f419bfbc1bfa7613a920) This commit merges the following models * account.invoice and account.move * account.invoice.line and account.move.line * account.voucher and account.move * account.voucher.line and account.move.line It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability. ==== Rationale ==== The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice. The same reasoning applies to sale/purchase vouchers. ==== Changes made in features ===== When creating an invoice, you are now creating a journal entry directly. --> The object account.invoice no longer exists. In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well. --> The models account.invoice.line & account.invoice.tax no longer exist Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice. --> The object account.voucher no longer exists. --> The object account.voucher.line no longer exists. --> The whole account_voucher module no longer exists. Positive side-effects coming from these changes are * draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets. * opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from. * code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries. There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation. ==== Changes made in models ===== * account.invoice: model removed. Instead, now use account.move with following mapping field (account.invoice) field (account.move) ----------------------- -------------------- name invoice_payment_ref number name reference ref comment narration user_id invoice_user_id amount_ total_company_signed amount_total_signed residual amount_residual state state + invoice_payment_state /!\ selection changed date_invoice invoice_date date_due invoice_date_due sent invoice_sent origin invoice_origin payment_term_id invoice_payment_term_id partner_bank_id invoice_partner_bank_id incoterm_id invoice_incoterm_id vendor_bill_id invoice_vendor_bill_id source_email invoice_source_email vendor_display_name invoice_vendor_display_name invoice_icon invoice_vendor_icon cash_rounding_id invoice_cash_rounding_id sequence_number_next invoice_sequence_number_next sequence_number_next_prefix invoice_sequence_number_next_prefix 'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice() * account.move: now has a valid state 'cancel' that has to be excluded from all business logic * account.move: field 'amount' renamed into 'amount_total' * account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id' * account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting * account.invoice.line: model removed. Instead, now use account.move.line with following mapping field (account.invoice.line) field (account.move.line) ---------------------------- ------------------------- invoice_id move_id uom_id product_uom_id invoice_line_tax_ids tax_ids account_analytic_id analytic_account_id 'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab' * account.invoice.tax: model removed. Instead, now use account.move.line with following mapping field (account.invoice.tax) field (account.move.line) --------------------------- ------------------------- invoice_id move_id account_analytic_id analytic_account_id amount price_unit base tax_base_amount 'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id' * account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move * account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices * account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt] * account.voucher.line: model removed. Instead, now use account.move.line ==== Changes made in functions ==== * on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries() * on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment() * on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves() * on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves() * on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id() * on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain() * in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode' Was task 1917430
2019-05-24[FIX] l10n_in: fix method parameterRavi Gohil
'tax_ids' param was removed in main method by 8f7b6d0d6b09cee94d32a5e3736e03af5df3817c, hence removed it from it's overridden method closes odoo/odoo#33639 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-05-10[IMP] account, l10n_*: v13 taxesOlivier Colson
- Add repartition lines on taxes - Link account tags directly to account.move.line; remove the tag_ids field from account.tag - Add a new report engine dedicated to tax reports, directly generating account tags. It is called as an alternate mode of generic tax report, with a dedicated "Use tax grids" toggle. >> The biggest change lies in the way the new tax report computes its values. Everything is now aggregated directly using the tags set on the account move lines. Thanks to that, modifying the configuration of a tax today will not impact the report for the previous periods anymore. This is a big improvement, as it means the report will keep on reflecting the values that were submitted to the state before, whatever the configuration change. - Add an audit char field to account.move.line telling with tax grids are impacted by the line, with the corresponding amount - Modify the behavior of cash basis taxes: the cash basis account is now used as the transition account, while the regular account given in tax declaration is used to store the final entry (it was the opposite before) - Modify every l10n_* module in order to keep them consistent with these changes closes odoo/odoo#32833 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-01-18[IMP] l10n_in: Improve Indian localization to supports GSTR-1 reportsJigar Vaghela
Purpose ======= GST Invoice Report required to show tax amount product line wise. This Tax amount is divided in CESS and IGST or CGST and SGST. Improve GST Tax, Tax Groups and Tag. Reverse charge under GST As per GST rules tax will have to be paid directly by the receiver to the Government instead of the supplier. Reseller(E-commerce) under GST If you sale through ecommerce then need to specify ecommerce GSTIN. Import/Export goods under GST If you export the goods then need to specify -Export Type -Shipping bill number -Shipping bill date -Shipping port code Credit or Debit Note If u give Credit or Debit note then need to specify Refund reason. Place of Supply is the state of customer. Added GSTR reports GSTR Invoice report covers below GSTR-1 sections(this report is grouped by tax rate and journal entries B2B, B2CL, B2CS, EXP, CDNR and CDNUR GSTR payment report This report is covered under GSTIR-1 section called AT(advance payment) and ATADJ(advance payment adjustment) GSTR HSN report(it is based on the product HSN code) GSTR Exempted report(it is based on nil rated and exempt tax) This report is covered under GSTIR-1 section EXEMP Added demo data to to have GSTR-1 reports out of the box Solution ======== fetched values of CESS, IGST, CGST and SGST amount in invoice report from tax groups added new taxes called "Nil Rated" and "Exempt" and also added it's related tax groups and accounts added tax tags related to GST tax percentage Set Reverse charge in negative tax Improved account move line creation grouping machenism: Now, move lines related to tax are grouped by product and uom instead of grouping them just by tax(this is for better reporting) closes odoo/odoo#30332
2018-08-29[FIX] various: clean up portal and reports (sales and invoices)Sébastien Theys
The goal of this commit is to fix the various views and reports of sales and invoices. ====== Portal ====== Fix breadcrumbs Fix BS4 issues, alignment of various elements Better auto resize of the invoice iframe Fix invoice list for draft invoices Fix previous/next document pagers Remove unnecessary monetary widgets (not needed when using t-field if the field is Monetary) Standardize invoice and sale routes: - especially when related to displaying: html, pdf (print and download), text - by using the get_portal_url() also for invoices Add the total on the left column of sales order ================ Section and note ================ Improve general style: - notes in italics - sections: less padding, darker background, no borders ========= Demo Data ========= Fix sales order demo data to appear for the admin (instead of system) PR: #25997 task-1869469
2018-08-15[IMP] account: draft entries creation through registering payments.Olivier Colson
In some countries, it might be preferable not to recon the payments journal entries at the time they are registered in the system, but to do so at the date of the bank statement line they will be reconciled with. Thus, to manage this we've added an option on bank journals to have payments generating draft account.move when they are validated, and posting them only after bank reconciliation (+overwriting their date) Was task 1870892 Was PR #26349
2017-09-18[IMP] l10n_in: GST introduced as new legal requirements.Foram Katharotiya
aka 'Indian localization out of the box'. Details: GST introduced, module refactored. Update GST chart of account, tags and SGST, CGST & IGST taxes. Replace vat label with GSTIN in reports & views. Added HSN Code field and display it on invoice form view & report. Added pin number field in res_country_state. Show the total amount in words based on Indian numbering system on form view of customer/supplier invoice/refund. Arrange address format of India country. l10n_in_schedule6: Introduce new GST taxes, chart of accounts & account tags. l10n_in_sale, l10n_in_purchase, l10n_in_stock: added modules to add hsn code and replace vat with gstin in sale, purchase & stock reports Was task: 33241. Was PR #18952