Before this PR, the incoterm location was not present in the account module.
This pr does multiple things:
- Add the Incoterm Location field in Accounting on Customer Invoices and Vendor
Bills. The field already exists on Sale Orders and Purchase Orders. When you
create an Invoice from a Sales Order, or a Vendor Bill from a PO, copy the value
of the field on the invoices.
- Update the PDF to display the field value if present, and remove the useless
duplication
- Remove incoterm setting on sale
- Remove useless xpath since now it is displayed directly on invoice when
incoterm field is fill.
Task-id: 3273460
Part-of: odoo/odoo#118954
Latams need more fields for VAT and Odoo Milk broke
how these fields are displayed.
opw-3382698
closesodoo/odoo#126461
X-original-commit: 960d47ccc9db2ae69836a5f1ed7bff163b051a42
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Partner's VAT identification number now is not missing when printing Foregin Invoices.
closesodoo/odoo#115595
Task: 947
X-original-commit: a0d684f6f93598024be4dcff82c6a7bc21277ce0
Signed-off-by: Josse Colpaert <jco@odoo.com>
Task: 857
Description of the issue/feature this PR addresses:
The customer's address is added twice in the printed invoice report but it only has to be shown only one time in the printed invoice.
Current behavior before PR:
The customer's address is added twice in the printed invoice report
Desired behavior after PR is merged:
The customer's address is added only one time in the printed invoice report
closesodoo/odoo#114874
X-original-commit: 9a9c6a5ffcf67f67a1a074caa412345a3b71cbe4
Signed-off-by: Josse Colpaert <jco@odoo.com>
Currently, all localizations of UoM fields are visible in all countries.
So in this commit, I have added a new compute field in UoM models, the field
contains comma-separated company's country codes, and I have used this field
for the hide/unhide fields.
closesodoo/odoo#112604
Related: odoo/enterprise#36572
Related: odoo/upgrade#4284
Signed-off-by: Josse Colpaert <jco@odoo.com>
* Add refunds with liquido docs
* Add Is AFIP POS field (l10n_ar_is_pos)
* Adapt letter mapping
* Add unit test
closesodoo/odoo#111076
Related: odoo/enterprise#36322
Signed-off-by: Josse Colpaert <jco@odoo.com>
Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one.
This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally).
Selecting one of the two will change the display of all account_move or other view using the tax selection setting.
Display changes:
In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide.
On the other hand, in the round globally, only the tax excluded columns will be available.
closesodoo/odoo#99209
Task-id: 2954332
Related: odoo/upgrade#3826
Related: odoo/enterprise#30853
Signed-off-by: William André (wan) <wan@odoo.com>
OPW 3117373
Task: 57576
The printed invoice hides part of the document type letter in the header.
This commit solves that problem and also this issue: https://github.com/odoo/odoo/issues/108994closesodoo/odoo#113603
X-original-commit: 91581e9090d2382ff584c199efcf3b7206ddac66
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
Before this PR, all this localisation was written in Spanish, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.
closesodoo/odoo#112803
Task-id: 3179209
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Total amount on printed electronic invoice include taxes if the electronic invoice has argentinian vat and document type 'B', 'C', 'X', 'R'. Also if the invoice mentioned before have more than one tax and one of them is different than "IVA" (argentinian vat), then is necessary not to show in the printed invoice report the amount untaxed of the invoice.
closesodoo/odoo#111776
Task: 922
X-original-commit: f5c0552a2b2e975db8745219af044638449c3312
Signed-off-by: Josse Colpaert <jco@odoo.com>
Many country-specific fields were displayed while a company with another country was selected (in case of a multi-company environment).
These country-specific fields are now visible only if one of the selected companies with said country is selected.
closesodoo/odoo#106221
Related: odoo/enterprise#34226
Signed-off-by: John Laterre (jol) <jol@odoo.com>
The aim of this commit is to simplify and standardize the settings archs.
To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.
The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.
```xml
<app string="CRM" name="crm">
...
</app>
```
- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
logo is created using the `name` parameter :
`/{name}/static/description/icon.png`.
The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.
```xml
<block title="Title of group Bar">
...
</block>
```
- `title` *optional* : The title of the block of settings (the old h2),
you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
(the old h3), you can perform research on its text.
The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.
```xml
<setting string="this is bar">
<field name="bar"/>
...More elements
</setting>
```
- `type` *optional* : By default, a setting is visually separated on two
panels (left and right), and is used to edit a given field. By
defining `type='header'`, a special kind of setting is rendered
instead. This setting is used to modify the scope of the other
settings. For example, on the website application, this setting
is used to indicate to which website the other settings apply.
The header setting is visually represented as a yellow banner on
the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
displayed just below the setting label (with classname
`text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
icon is displayed next to the setting label to explicit that
this setting is company-specific.
- `documentation` *optional* : If this attribute is set, an icon is
added next to the setting label, this icon is a link to the
documentation. Note that you can use relative or absolute path.
The relative path is relative to
`https://www.odoo.com/documentation/server_version`, so it's not
necessary to hard-code the server version on the arch anymore.
closesodoo/odoo#106425
Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
Due to the deprecation of t-esc to the unique use
of t-out in the rendering template, this replace
every usage of it and ensures everything continues to
work as inteded. Removing deprecation warnings
polluting terminal
deprecation commit: odoo/odoo:9ce5bc8881ae06b613ef61eb07453b224f62bae6
closesodoo/odoo#103731
Related: odoo/enterprise#33037
Signed-off-by: William André (wan) <wan@odoo.com>
This commit makes FCE Is Cancellation Field inivible in non Argentinean Companies
closesodoo/odoo#99339
X-original-commit: da6b17dec3a4b13e3bf1b1cf5557aa8267f236a6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Before this change, we bringed to the user the posibility to select the option “Unified Book” (boolean) on journals with type “Sales” and Pre-printed Invoice “AFIP POS System”. This allowed all documents with the same letter document to use the same sequence, and it does not matter if they are invoices, credit notes or debit notes for example.
Now that functionality is deleted and all documents will have their own sequence regardless of the letter document of each receipt.
closesodoo/odoo#88129
Signed-off-by: Josse Colpaert <jco@odoo.com>
In res.partner the Fiscal Information Tab content was broken than to a
bad adding of the Gross Income fields. This PR solves the problem.
closesodoo/odoo#88704
X-original-commit: 23f5aa3c105ca33f0146ba21d7f463a8310688c4
Signed-off-by: Josse Colpaert <jco@odoo.com>
According to the Argentinean law N° 27440, it is required for MiPyMEs
document types to show in the report the total amount in letters.
closesodoo/odoo#80669
X-original-commit: 9ae95a9a69fd3316b1a217225e8ebacbb51b8fe8
Signed-off-by: William André (wan) <wan@odoo.com>
Adapt the module to calculate removed fields from latam localization
X-original-commit: c9536ab129c96582a784efe6a5bce133cad0d650
Part-of: odoo/odoo#78296
Co-authored-by: Juan Jose Scarafia <jjs@adhoc.com.ar>
Since we change the editor for the comments on invoices,
The layout was a bit broken with some unwanted spacings.
task-2586137
Part-of: odoo/odoo#75863
A new field on tax groups makes it now possible for this group to be displayed under a subtotal label. If not set, this defaults instead to "Untaxed Amount", keeping the traditional behavior. This is intended for withholding taxes, which can now be implemented with negative taxes and a tax group with this field set.
To do that, this commit entirely refactors the way amount_by_group worked, and replaces it with a more complete json field called tax_totals_json. It also streamlines the way taxe totals are displayed on invoices, PO and SO and makes it so that a common code is called instead of copy-pasting the same block 3 times as before.
[IMP] purchase: always display tax totals by groups on purchases orders
Before, tax totals on purchase.order's form were not shown by group, and were instead all aggregated in a single "Taxes" category. The same went for the pdf export. The portal view, though, did show the totals by group. We now display the tax groups in the same way all the time.
closesodoo/odoo#74138
Task: 2457374
Related: odoo/enterprise#19802
Related: odoo/upgrade#2670
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Add Argentina Localization section in config to be extend for both
l10n_ar_report and l10n_ar_edi modules.
closesodoo/odoo#75632
Related: odoo/enterprise#20457
Signed-off-by: Josse Colpaert <jco@openerp.com>
According to Argentinean law 27440, Art. 5º it is mandatory to show the
CBU on the report for electronic invoices and electronic debit notes.
Before this commit, we were showing only in FCE (MiPyMEs), and here we
add it for NDE (MiPyMEs) on invoices reports.
closesodoo/odoo#73108
X-original-commit: d5f3e1ddff72ba05af3b8d20888b92799c7d532c
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Be able to create letter A documents to monotributista AFIP
responsibility types.
closesodoo/odoo#72667
X-original-commit: b204f7d1b0bcaf3984600d94395377c97facf168
Signed-off-by: William André (wan) <wan@odoo.com>
In the Argentinean invoices report view, we were removing the Payment
Terms and we were only showing the Payment Term name in the header.
Now we add it back following the Odoo approach but we also keep the name
of the terms on the header.
We made this modification in the invoice report with and without payment.
original commit: 6a0cf2e
closesodoo/odoo#69998
X-original-commit: bf88ef700fc0224b973f3e6142db42799a2eccb1
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before, account_fiscal_country_id was only use for tax operations; and country_id was used for all the other accounting stuff. Now, with the new ability to use foreign tax reports (with foreign VAT fiscal positions), we can generalize the fiscal country, sot that it is the one that needs to be used for the whole accounting. Since foreign tax reports were not supported before, account_fiscal_country_id is already set on existing database as the country for the "main" accounting, so the impact of this change is small.
closesodoo/odoo#68349
Related: odoo/upgrade#2322
Related: odoo/enterprise#17299
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Such fiscal positions define an alternate VAT for a specific region. When foreign_vat is set, a country must be set on the fiscal position; it'll be used to know for which tax report the fiscal position must be available as an alternate VAT (in the tax report; see enterprise branch). Note that it is possible to defined several foreign VATs for the same country, as long as they belong to different states within that country.
Note that this new feature is only for FOREIGN stuff; so, when you have to submit a tax report in different regions than yours. For example if you have a Belgian accounting, have French customers, and have a French VAT in addition to your Belgian VAT, to submit a tax report in France. For domestic operations, simply use your the vat field of your company, just like before.
[IMP] account: add country_id on taxes and filter them on invoices
The invoices now compute the country from which they should accept the taxes: it's either the one defined by fiscal_position_id.country_id (if fiscal_position_id is a foreign VAT fiscal position, i.e. it defines a foreign_vat value), or the company's account_fiscal_country_id.
Taxes from other countries are filtered from the view; we don't want them to be available there. There is also a constraint ensuring that. Same goes for tax repartition lines and tags from other countries.
We don't want to mix taxes, tags and foreign VAT fiscal positions from different countries, as it would break the tax report in enterprise. Doing this ensures the tax report can efficiently discriminate the move lines between the different regions whose report they have to appear in.
[IMP] account: add country_id to account.chart.template
This is done so that the taxes are created in the right country, and the fiscal country is initialized in a consistent way when instantiating the CoA on the company.
[IMP] account: print foreign VAT on invoice instead of company VAT if one is defined
[IMP] web: allow forcing company vat on document templates
This is done to allow the use of foreign vat fiscal position on invoices: in that case, we don't want to use the company VAT, but the value of fiscal_position_id.foreign_vat. So, when such a value exists, the invoice simply set the force_vat variable to the right value.
[IMP] base_vat: also validate VAT of foreign VAT fiscal positions
We generalize the code formerly only done for res.partner so that the foreign_vat field of account.fiscal.position can be checked in the same way.
Conversion of all modules to the new manifest assets declaration.
Part of task: 2352566
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
Add report name and document prefix on l10n_ar data for
the following documents:
- (60) CUENTAS DE VENTA Y LIQUIDO PRODUCTO A
- (61) CUENTAS DE VENTA Y LIQUIDO PRODUCTO B
closesodoo/odoo#67720
X-original-commit: f61877763c601ee80107d92a414dd9ca13132f0e
Signed-off-by: Josse Colpaert <jco@openerp.com>
AFIP give us new resolution 4291 that request to print QR code in
printed version of electronic invoices. For that we:
1) update the xml report footer style
2) add generic method to sanitze the identification number we are
sending, the sanitize method is added here in order to be re used for
other functionalities across electronic invoice and reports. If we are
not able to sanitize the number then we show an error to the user
3) update translations to add new raise message translated term
NOTE: Fix pylint errors: This ones pop up when running this PR "Check Style'
in runbot
closesodoo/odoo#65034
Related: odoo/enterprise#15949
Signed-off-by: Josse Colpaert <jco@openerp.com>
Fix pre-printed report so that invoice date remains
in same position as if not pre-printed
closesodoo/odoo#66193
X-original-commit: ab99aa426f5cd317ea69f26c213635b0ab39e716
Signed-off-by: Josse Colpaert <jco@openerp.com>
Issue
- Install "Accounting" & "Studio" modules
- Go to "Accounting" and switch studio editor
- Go to "Reports" tab and select "Invoices" report
- Click on any block to edit.
Not possible to edit document.
Cause
Studio cannot parse dynamic `t-call` and therefore not able
to render the corrects hooks to edit the report.
The issue has been introduced by this commit: https://github.com/odoo/odoo/commit/5c5710ae8ea045569fd94504f9d8dd5209f7b662
Solution
In the corresponding localization report template,
add an 'Inheritance Specs' (position="after") that will add a condition
where it will retrieve the rigth report name
in case localization enabled.
opw-2362257
closesodoo/odoo#60660
X-original-commit: ee1580a85c9942e9a98748fa568f9f664c67a320
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
The invoicing tour suggests to change the invoice number manualy but it
is not doable with l10n_ar because of the document number mechanism.
The partner needs the AFIP responsability to be set in order to generate
the number.
closesodoo/odoo#58721
X-original-commit: 25889e469c063c307fee9c15b48fe4316207aeb3
Signed-off-by: Josse Colpaert <jco@openerp.com>
The field `invoice_partner_bank_id` was renamed `partner_bank_id`
closesodoo/odoo#58295
X-original-commit: c58684c07658ef7170f9696cc2fbb033ec46ba96
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Show partner commercial name and contact name in the inovice report
instead of just the partner contact name. For the example of
Adhoc (Commercial Partner)
- Katherine Zaoral (contact)
The invoice report was showing: Katherine Zaoral (partner name).
Now will show: Adhoc (the commercial partner name)
closesodoo/odoo#55202closesodoo/odoo#54193
Related: odoo/enterprise#11717
Signed-off-by: Josse Colpaert <jco@openerp.com>
Change padding right in the header of the report to ensure that the data
to show take advantage of the most space possible without overlapping
the header data with the report content.
closesodoo/odoo#55212
Signed-off-by: Josse Colpaert <jco@openerp.com>
Port foward from 13.0 branch. Also update the _get_name_invoice_report()
method to match the one in account module.
Also update the name of payment field that has been change in master version
* o.invoice_payment_ref is now o.payment_reference
Show the identification type name instead of always show VAT in the customer information on the invoice report
closesodoo/odoo#48801
X-original-commit: 5a7ff2c932ae9abe4207291cc20e52a401a560a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
* remove logic of sequences in invoices and use new logic to make it work
* add logic do to not let the user to change the pos number in the document number
* update translations
l10n_latam_country_code field is no more needed for account.move
object thanks to commit 7edb5c11
Also, since country_code field has been defined in view_move_form,
no need to redefine it when it is inherited in l10n_cn module.
closesodoo/odoo#48719
Task: 2228210
Signed-off-by: Josse Colpaert <jco@openerp.com>
journals that were not of type sales and journals.
We update the hence of the view to take into account the original
invisible domain plus the domain we need for journals that use documents
closesodoo/odoo#48526
X-original-commit: 085fd43fd0b8a13dd713fbb4e34126ebe63ea504
Signed-off-by: Josse Colpaert <jco@openerp.com>
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>
Task 2146469
Rework the name computation:
* It doesn't use ir.sequence anymore
* It is an editable computed field
* Add a renaming tool
This allows the user to tweak the sequences more easily than having to
get through the ir.sequence settings.
The sequence depends on a parameter of the journal: continuous, montly
and yearly restart of the sequence. Everytime a new period is started,
try to make a pattern form another period.
The incrementing is done by taking the previous name, ordered
lexicographically, splitting it by taking the digits at the end, adding
1 and re contstruct with the prefix.
** This means there could be cases where the prefix has a big importance
on the next number. For instance, if you have
INVOICE/2019/0001
INVOICE/2019/0002
and then rename the last one to INV/2019/0002, don't expect the next
number to be INV/2019/0003. It will be INVOICE/2019/0002 (again) because
the highest number was INVOICE/2019/0001.
You will then end up with
INVOICE/2019/0001
INV/2019/0002
INVOICE/2019/0002
closesodoo/odoo#41485
Related: odoo/enterprise#7189
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Now use direclty the posted state from account move.
* This was changed in a constraint in l10n_latam_invoice_document module, also extend the constraint docstring
* This old states where also in a view domain in l10n_ar module for account.move view. We remove the field for the view (AFIP Responsibility) instead of fix the state name.
closesodoo/odoo#42982
X-original-commit: 33a5cfe068323f7fc4c92f42fadb8e236954d93a
Signed-off-by: Josse Colpaert <jco@openerp.com>