The COA should be visible, so existing db won't crash.
Indeed, it is used in the Selection field of the config settings.
As the field does not exist, the users get an error.
We instead don't let a user apply the Syscohada template to a
company that does not already have the COA.
opw-3893013
opw-3891587
opw-3891028
closesodoo/odoo#163350
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
If you create an applicability and remove the company field,
they are never used.
An applicability like this should be valid for all companies.
We put a 0.5 value for the company field so an applicability
so it has a lesser priority than other fields.
Same idea as the distribution models.
opw-3847415
closesodoo/odoo#162152
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
All these countries use the chart of accounts that is defined in l10n_syscohada.
This commit then add the tax report for each localization, and taxes to be able to fill it.
task-2841655
closesodoo/odoo#136155
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
To reproduce:
- Create 2 lines with the same balance but only one has an analytic_distribution (of 100% on an analytic account).
- Create a transfer of accounts for these
=> The counterpart has a distribution of 100% or no distribution.
Indeed, we simply put the distribution of the last line.
It makes no sense: analytic "balance" is generated and does not reflect the transfer move.
We should make a prorata of the distributions of the lines to transfer.
closesodoo/odoo#161982
X-original-commit: dcfe607d48021902c88b79a571a15559434d1592
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
If the move in the test is created at 23:59:59, and the wizard on
the next day at 00:00:01, the test will fail because the wizard
takes today as the date at creation.
We just add a freeze_time (for this test only, as the other tests
in the class don't have the issue).
Linked to runbot error 60478
closesodoo/odoo#159377
X-original-commit: d064068ff46ef8f84224f50c4c86922ae2004159
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Our certificate for aeat seems to not be valid anymore.
We don't have a replacement currently.
The flow is still tested with bizkaia or gipuzkoa (mostly just
different servers/addresses, but same flow/xml), where the
certificate is still accepted.
We remove this test that fail every day.
Linked to Runbot error 25907
closesodoo/odoo#159382
X-original-commit: ccd5ce7f0f106f68ce704cb032bcb754a480be14
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The fields in analytic have a group which is defined in account.
We hide them in analytic module and show them in account with the right group.
We also show balance now, even if you don't have the group 'readonly',
because it's an information that is independent of credit/debit notion.
Linked to runbot error 59222 (will need to remove the group in the test)
closesodoo/odoo#159085
X-original-commit: e7e3ec8cb5e4f71ce1dbbd24485c3377c694e5eb
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
In one2many, for the view, the attribute to hide a field should
be column_invisible and not invisible
closesodoo/odoo#157356
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
To reproduce:
- Install account_accountant
- Create an asset (monthly for example)
- Compute Depreciation
- Modify the date of the first entry to 2 months later
- Modify the date of the second entry to 1 month later (so same month)
=> Traceback
The problem is that sorted does not work with ids of NewId. We should
look at its _origin.
There is a PR that would try to fix it in general, but it's in master
(and is not sure to be merged https://github.com/odoo/odoo/pull/155850)
The problem only began to occur in 17.0 because of the changes of the
onchange function.
opw-3759153 (in chatter)
closesodoo/odoo#156874
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
To reproduce:
- Install l10n_it
- Go in settings
- Fiscal Localization => reload
- Go to the taxes
=> You will find taxes with [old] prefix
The issue comes that we want to consider that a tax has changed
if it has different repartition lines.
We don't consider taxes that are defined without repartition lines.
The template will have no lines, but the compute
on actual taxes will generate default ones.
It then considers that the tax has changed.
task-3777629
closesodoo/odoo#156974
X-original-commit: 55c09d3fab70d241174c44a9f3d123a01211730e
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Since https://github.com/odoo/odoo/commit/a54c304487429139c08f384d7b2b620b50cf6f83, sale_loyalty_delivery does not depend on stock anymore.
So, the type 'product' (and detailed_type) is not added to the selection.
The test does not fail on runbot because the module is never tested alone.
We should just change it to type 'consu'.
closesodoo/odoo#155263
X-original-commit: 88ebd8918c0ffdd9ae784967fe0de42a9299e09a
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The model `l10n_pl_tax_office` has a group to be able to access it.
The Many2one that refers to it, `l10n_pl_reports_tax_office_id`,
does not.
Currently, it is not really an issue as the accounting's settings are invisible if you don't have the group, but it creates a warning in a test and is more robust
Linked to runbot error 24602, 24721
closesodoo/odoo#154294
X-original-commit: dba837afe72c9e8b3e3f8e9615ddb923227d3af0
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
To reproduce:
- Put your fiscal year to the 30th of December (yes it's unlikely)
- Create an asset
- Compute depreciations
=> they are created for the 31th of December
It comes from the `get_fiscal_year` in `date_utils` which considers it as the case of the 28th of February
opw-3704466
closesodoo/odoo#153528
X-original-commit: cd0bb178441790e7e33c0d1c01b7ade82d4ab8c0
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
You should be able to create analytic plans with analytic group.
But currently, you need Access Right's group.
We should put a sudo there.
closesodoo/odoo#151328
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
To reproduce:
- Go in admin user
- activate Audit Trail in the settings
- Log out
- Connect as demo
- Go to the audit trail report
- Activate the filter Update Only
=> Access right error
The demo user doesn't have the right access
for the domain of the filter.
We should hide this filter for these users
closesodoo/odoo#149783
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
The tab PL Extra is visible if l10n_pl_jpk is installed and your
company is not polish.
This should not be the case
closesodoo/odoo#150199
X-original-commit: b5335d356d4d098b719e6bd8e966ac5847340f96
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Instead of replacing the default taxes, the key has been duplicated
in the dict. (0870357cc4)
So, instead of assigning the new tax, it is overriden by the old keys.
So, the old tax is still the one referenced in the template.
l10n_ee: the old tax has been deactivated, and the default_tax hasn't
been changed.
Added the tag to the test so it will be seen on merge next time.
Linked to runbot error 52792
closesodoo/odoo#146652
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
To reproduce:
- Create a new plan with an account
- Add an analytic item with this account
- Go to the view of this account
- Gross Margin Button has a value
- Click on it
=> List is empty
The reason being that the view should not include account_id,
but auto_account_id
closesodoo/odoo#147080
Signed-off-by: William André (wan) <wan@odoo.com>
The test tries to import data from an sql file.
The problem is that it is trying to import partners, but when
the test is ran with the l10n_co localization, one of the required
field is not filled.
We just change the model to import to avoid the issue with the
missing required field.
Linked to runbot error 32740, 32742, 32745, 32738
closesodoo/odoo#145708
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
If we begin to run the test at 23h59m59s, the move date could be put
at a day and the freeze for the cron on the following day, and so,
make the test fail.
Let's just define the day explicitely.
Linked to runbot error 36224
closesodoo/odoo#145444
X-original-commit: 9206e16c84038f08606c045dcf138f72ef78aa4a
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The digits of the accounts of Lithuania's COA go up to 6.
It's currently defined to 1, which makes no sense.
We will change it to 6.
closesodoo/odoo#143986
Related: odoo/enterprise#51661
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
If we have an analytic plan without analytic accounts, but with
subplans that do have analytic accounts, we do want them to
appear in the widget.
Also changed a search in a loop to a read_group
closesodoo/odoo#142222
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce:
- Install studio and account.
- Invoicing/Accounting, menu Customer > Invoices
- Activate kanban view
- Put filter "My Invoices"
- Enter studio mode
=> There is a traceback in the logs, even if not shown in the view.
When entering studio in kanban, a card with default values is created.
The problem was that the journal wasn't computed, and so, broke
the onchange_partner_id function
It was because move_type, while being in the default, wasn't in the view,
and so wasn't in the values given by the js.
closesodoo/odoo#140927
X-original-commit: 629176269614467c637543b11fc556a63ee70c5b
Signed-off-by: William André (wan) <wan@odoo.com>
The module does not depend on account_edi, but the test extends
the test class defined in it.
The problem only appears in saas-16.4, because before,
account_edi was auto-installed with account.
Linked to runbot error 24128
closesodoo/odoo#139363
X-original-commit: db4eba75ef8e9d584921615d72cf6ea4449554ac
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Tax group are currently ordered by sequence only.
Only 2 localizations of ours have defined the sequence on them.
So, most of the tax groups have the same sequence.
The order of search made on them is thus undeterministic.
It can be seen when running the test test_generate_xml_sale with
l10n_ee_reports installed, it fails sometimes (1 in 50 to 100).
Because the invoice amounts are grouped and ordered by tax groups.
Linked to runbot error 24595
closesodoo/odoo#138890
X-original-commit: 7535c6091cb841a428ea0f4cc6d4bb1779e70346
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The field l10n_pl_delivery_date should not be visible if we're not in PL.
In fact, delivery_date should have the standard behavior in Poland
closesodoo/odoo#138440
X-original-commit: 0056dcb17e212a627a83072bafd68af8e0b2c76e
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Merge l10n_pl_jpk as it is a functionality that every user that uses l10n_pl should have.
Especially, since the fields will be necessary for the e-invoicing.
Also merge l10n_pl_delivery_date and delivery_date on account_move.
This means the module l10n_pl_sale_stock is not necessary anymore.
closesodoo/odoo#135595
Related: odoo/enterprise#47445
Related: odoo/upgrade#5152
Signed-off-by: William André (wan) <wan@odoo.com>
_name should have a separator ".", separating the model and the module.
closesodoo/odoo#135144
X-original-commit: e1672460399bc6ce53431450d24b6f345e062640
Related: odoo/enterprise#47293
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
For the JPK and the EDI, a lot of additional informations are needed.
We provide them in community, so it's available later for EDI.
The delivery date is needed in Poland, and we compute it if
sale_stock is installed. It will be done later for all localizations,
but not in stable, so we will merge it with the other ones later.
X-original-commit: 8b14d098a65b84a842514e644b262a0d714f4b48
Part-of: odoo/odoo#135144
Some taxes and tax report lines are needed for the export of JPK
(and EDI that will be done later)
X-original-commit: c496d5b85d7ec226f4a28db95b07f747c6b6ec37
Part-of: odoo/odoo#135144
This tour creates an indeterministic error, which is most
probably due to the fact that the css is sometimes not loaded when
we check it.
But this is not something that should be tested (especially in an
account tour), so we remove this step.
Removing this makes the tour useless, so we remove it.
Linked to runbot error 23583
closesodoo/odoo#131897
X-original-commit: 7d7535226332e766d1299b0d887bf7b21f34af88
Related: odoo/enterprise#45751
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
- Create Journal Entries with analytic distribution
- Go in Journal Items list view
- Filter with 'Analyic is set'
=> The wrong entries are filtered
The problem is that the replacement of the domain for the search
has changed with a factoring of the function, which causes the
search replacement to occur with booleans, which is not needed.
closesodoo/odoo#130760
X-original-commit: 5d2accdf56ccd86c8797743f151ad80b614f0f77
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
To reproduce:
- Create a Distribution model, with an analytic distribution
and an effect on Partner A
- Create a Sale Order, for Partner A
- Confirm it
- Add a line on this Sale Order
=> The new line does not get the distribution of the model
It couldn't be done before 16.0 because a compute would trigger when posting the sale order, because date_order was used for the default rules, and so would trigger it at wrong times.
Distribution Models don't use this date anymore, so the compute won't happen at wrong times.
task-3355886
closesodoo/odoo#130597
X-original-commit: 22fd34b0d8b944a7afd031b894d750a8291d0aba
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
- Create a db with account installed (and a random loca)
- Run the test "test_quick_edit_total_amount"
=> The test may fail (undeterministically), especially the first time
The reason is that we don't have an order in "_get_frequent_account_and_taxes"
So, if we have the same number of lines with the same account and with a tax or without one,
we can not guarantee which tax is considered the most frequent.
We now define the order by saying that we should take the taxes into account,
so lines with taxes take precedence on lines without
Linked to runbot error 23385
closesodoo/odoo#130326
X-original-commit: bdb21983371fb62b01275471e8ca7099219e1053
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
The tour failed as soon as there were several companies installed.
The tax created could be assigned to the wrong company, and as such,
not used in the tour.
Linked to runbot error 22953
closesodoo/odoo#130281
X-original-commit: a4ad0a8f36f4091da5de99c5a54326dce3784817
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Added a saveForm to wait for the compute/onchange to proc on the save
Added a tax, to be independent of localizations
Changed the product, to have a product with an amount that won't be
impacted by difference of default decimal place from localizations.
Fixes runbot error 22093
closesodoo/odoo#126883
X-original-commit: 2678f490648f81488c8635f2ebc01591935a48f1
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce:
- Activate analytic accounting
- Create an analytic plan
- Click on Subplans
- Create a Subplan
- Come back to the list view of subplans (with the breadcrumb)
=> The new plan does not appear
The children_ids are not recomputed, so we inverse the logic.
task-3359643
closesodoo/odoo#125062
X-original-commit: c0bc5aedce0aa601e402c368fdf139c722a0fca7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
- Create a Deferred Revenue Model on a Current Liability account
- Create a Sale Order yourself (User 1), with Salesperson User 2
- Create the invoice from it
- Remove the salesperson from the invoice and add User 3 instead
- Change the account to the Revenue Model's one
- Post the invoice
- Post the deferred revenue created
=> User 2 is follower of the entries generated
The problem is that the context comes from the sales order, and
contains a `default_user_id` in the context.
The solution provided is to remove it from the context given, as
it serves no purpose (the invoices are already created).
opw-3141495
closesodoo/odoo#121581
X-original-commit: c3df8fc0da2f359ac0a47695ef37aa8869063092
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Currently, the field `analytic_distribution` does not appear in
the filters, while it should (to be able to filter `account_move_line`
for example).
We added Json to the filterable fields. If not overriden, it will
search on it like a String.
We also have to add a non-stored field to be able to define a search
function for `analytic_distribution`, to be able to search based
on the keys of the json.
closesodoo/odoo#121223
X-original-commit: 3d3e6847230d5cc9cd61a9bf83bef403a5b4b3ec
Signed-off-by: William André (wan) <wan@odoo.com>
How to reproduce:
- Activate l10n_be and go on a Belgian Company
- Activate Quick Encoding on Bills
- Setup account 600000 with taxes 12% (Sales) and 12% M (Purchase)
- Create a Bill
- Put 112 as the amount Tax Incl.
=> Both taxes are put on the line, which makes no sense, resulting
a sale tax on a purchase document.
It was forgotten in https://github.com/odoo/odoo/commit/85d89a986b6adcf9d0ac0ce57599d4b2678b59a3closesodoo/odoo#120486
X-original-commit: 04287db0045eefed1b03e04d745874caf206731f
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
If there are no default taxes on product or account, or
predictive guess, there should be no default taxes on a new aml.
So the `account_sale_tax_id` (and `account_purchase_tax_id`)
field only concern new products (as specified in the tooltip
of the field).
In Argentina, there is a constraint so all lines should have
a tax. So, we need to add default tax on their demo products.
We also add it to the products in account demo to have taxes
by default on demo invoices for all localizations.
task-3045026
Part-of: odoo/odoo#115222
- Create an account of type current asset
- Add him a Sales Tax and a Purchase Tax
- Create invoice
- Add a line
- Remove the taxes from this line
- Change the account to the one you created
=> A purchase tax is applied to the line.
It should not happen, so we prevent it.
closesodoo/odoo#117539
X-original-commit: 85d89a986b6adcf9d0ac0ce57599d4b2678b59a3
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
When creating analytic lines from bills or invoices, the category is not put on them.
opw-3214062
closesodoo/odoo#117056
X-original-commit: 7729b5bf006d0a988ce84e2f953749866fae7b16
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
- Activate analytic accounting
- Create a Sale Order, with an analytic account for the whole order
- Add a line with a distribution containing the same account (100%)
- Create Invoice From this Order
=> The distribution on the account for the invoice is of 100% and
not 200% (the sum of the order's account and distribution).
The problem is that on the dict that we're returning, the key is a string
closesodoo/odoo#116617
X-original-commit: 9ecf263d4124b186b55e50ab025acb7541043d3a
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
We created an index in the mixin, but the `init` was never called
as there was a missing `super` in `account_move_line`.
We also remove the index in `sales_project`, as it now is done in
the mixin (and we don't want different names for it).
closesodoo/odoo#115948
X-original-commit: 98a556031180cf72680b4f082a5c5d7b491742b7
Signed-off-by: William André (wan) <wan@odoo.com>
To compute the analytic amounts, we used the user company currency
to know the precision to use to round, for the comparison.
We should instead use the line's currency for the amounts, and the
decimal precision for the distribution.
closesodoo/odoo#114997
X-original-commit: a94517702c47aa9259c0cbea9b4763ab7501176f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
When duplicating an analytic account, we want to make more explicit
which account is the duplicate and which one existed before.
task-3202027
closesodoo/odoo#114931
X-original-commit: d499b9da8ba1b46db0671f14658a55095c68921d
Signed-off-by: William André (wan) <wan@odoo.com>
We need German states when formatting the 'SteurNummer'.
So we provide it so the user can select his, instead of having to
create them by hand.
task-3056694
opw-2974560
closesodoo/odoo#111932
X-original-commit: 6c8f3dc4fdffa167680f3a234a13b028c2f54a3b
Related: odoo/enterprise#36703
Signed-off-by: William André (wan) <wan@odoo.com>
Following the DateV SKR04 standard, we should not use the
automatically created codes for these accounts.
So we have to create them by hand to specify the code.
closesodoo/odoo#111801
X-original-commit: 59ac0ef1b67387a8400226bf9f9382ea804dce3f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
We should allow distribution models to be to be editable top.
Then we need a new button to be able to see the form view.
t-3029083
closesodoo/odoo#111413
X-original-commit: e6b0315dc4886c40014a9d46128e841ea171b20c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Translated in English and added .po for Polish translation.
Cleaned tax names to make them more in line with new taxonomy.
Tax tag names have been changed to avoid long sentences as names.
closesodoo/odoo#109611
Related: odoo/enterprise#35651
Signed-off-by: Laurent Smet <las@odoo.com>
An analytic account was searchable in an invoice with the Ref field.
Before this commit, it is not possible, while it should.
So we add it to the search domain.
opw-3119740
closesodoo/odoo#110135
X-original-commit: f5e24b8f7ba4291b0e5ea970da948215b83e6184
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
How to reproduce:
- Have a report line with a custom creation with a 'balance' label
- Replace the expression by an `account_code_formula` in the xml
=> The 'balance' expression does not exist anymore in the xml,
so the ORM removes it, and a new one is not created.
We changed the update so only 'balance' label expressions are changed:
- if we have an expression with an xml_id, we remove the expression and
recreate a new one.
- if we don't (custom created or coming already from a formula shortcut),
we just update its values.
We also created a way to remove a formula shortcut (making it falsy will
unlink the expression that was linked to it)
closesodoo/odoo#110119
X-original-commit: d01a7b76bee4471444eeedacc05bd52fe9c0399c
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The fiscal positions for the new taxes should also be
provided, when we create the taxes, so the clients
don't have to manually input them.
Only fiscal positions that exist in the db and with new
taxes are created.
Related: https://github.com/odoo/odoo/pull/108571
task-3116246
closesodoo/odoo#109637
X-original-commit: 362b152cee6252ee6531c15a3e07b5917b36bc45
Signed-off-by: William André (wan) <wan@odoo.com>
CoA: account types, tags for Cash Flow, account groups, define better default accounts, ...
Tax Report: changed the order, created some lines,... based on the infos to be given for the JPK export
Taxes: some tax scope
task-2713260
closesodoo/odoo#109409
X-original-commit: cd799a6bdf7ac6897ca9561342f6e39bea1dba25
Related: odoo/enterprise#35564
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
When filling a Sales Order applicability rule line, the financial
account prefix is useless, as it will not be used.
Thus we can make it invisible in the case of business_domain corresponding to sales and purchases.
task-3040927
closesodoo/odoo#105014
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
* = {account, sale, purchase, hr_expense}
When a plan is mandatory for SOL, POL or expenses, the flow should still be blocked when pressing the button, and not only when creating analytic lines.
We add the info in the context of the button, so automatic flows are still not blocked.
When the applicability rule requires a mandatory analytic distribution, raise an error upon :
- confirming PO,
- sending or confirming SO
- approving Expense Report by manager.
t-3040929
closesodoo/odoo#107166
X-original-commit: 8623a7850288828759db125b1054b0fed6b6b135
Signed-off-by: William André (wan) <wan@odoo.com>
If an aml has no product, it should not trigger a model that has a product.
So, we now define the fields that have to be checked on the model, instead of just being the ones given as parameters.
The way the field `company_id` impacts the model has also been changed.
The idea is that a model with a company specified should be better than a model without one.
But we also want that a model with 1 valid rule and no company is better than one with only a good selected company.
closesodoo/odoo#107165
X-original-commit: feff1a8a056f1fbbc852f7cf164e73abf83c4cc9
Signed-off-by: William André (wan) <wan@odoo.com>
There are specific accounts that should be used for tax groups for
each version of the CoA
t-3059059
closesodoo/odoo#105770
X-original-commit: 453cf0b6d659d01ba2370a08f8259a0a46f80634
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Steps to reproduce the issue:
- Have the modules `hr_expense` and `account` installed (not `account_accountant`)
- Create a new expense
- Change the category
- Click on analytic distribution field
=> Traceback
The issue comes from the fact that the account field is present but empty (we don't have accounting).
For the old and new account field, we have 2 undefined values.
We then do a shallowEqual of these, where it will compare length attributes, so traceback.
To solve it, we just give it a value false to the field instead of being undefined for the comparison.
closesodoo/odoo#105593
X-original-commit: face5b8f9134fc052ea09742667a610b508a4886
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Before this fix, the constraint did not prevent changing the company to a bad one on an existing field.
We also remove the GROUP BY clause as it is useless.
X-original-commit: 2d5879cd8d84edcc16c55622b86c724f70055b03
Part-of: odoo/odoo#105259
The accounts shown in the widget could be shown while being in the wrong company.
Previously, only the plans were limited by the company.
closesodoo/odoo#105241
X-original-commit: 97d1afb9ff0ca88dfb0b6a8ed152e39d3db77279
Signed-off-by: William André (wan) <wan@odoo.com>
We could do the Group By directly with sql instead of doing the computations by hand afterwards.
As we're already doing a sql query, we can include it here.
closesodoo/odoo#104933
X-original-commit: 3cec95d0a18f3c343db36bb0700936833e98f7fc
Related: odoo/enterprise#33594
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The smart buttons were computing the number of aml instead of the number
of invoices/bills with the account.
We now compute back the number of moves.
We also changed it so it is consistent with the view,
so it computes the number of moves with move lines that have the distribution
instead of the analytic lines with the account.
X-original-commit: 84f3ee28156721cea0b530b92ede36fad58c5db8
Part-of: odoo/odoo#104933
In `_compute_analytic_distribution`, we're dealing with recordset and so, should iterate on it.
Also, the distribution expects an id, not the record.
closesodoo/odoo#104458
X-original-commit: d41d5ef7aebc9f65066ecf86939e3f60aa515539
Related: odoo/enterprise#33378
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Also correct mistake in name of RDC in manifest.
Modification in the COA (clearer name) + change made on some account about reconciliation, before this commit there was way to much reconcilable account, it's now corrected
Demo company modified
Menu item added
closesodoo/odoo#104440
Task-id: 2350061
X-original-commit: 0caa35df57061576ffb14252b08379a382e39ef9
Related: odoo/enterprise#33372
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Clicking on a smart button on the project button to access invoice/bill returned a traceback.
It was because the fields in the ORDER of the query don't appear in the SELECT with the DISTINCT.
We just remove the order of the query, as it serves no purposes here.
opw-3040389
closesodoo/odoo#104303
X-original-commit: 71a2b06b9b4205c34a3869ddc67dd6d840a5eccf
Signed-off-by: William André (wan) <wan@odoo.com>
Before this fix, user could include accounts in the widget from another company than the object's one when in multi-company mode.
It could cause problems with validation too.
Now we take the company of the object when getting the plans (or the current company if no object's company).
t-3040926
closesodoo/odoo#104150
X-original-commit: 21d754ddafee653d9958443accda2de747caed53
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
We had an index with the same name as would be generated by the ORM.
Instead of putting index=True as it is a bit of an hack, we just change the name of the index.
closesodoo/odoo#103945
Issue: https://github.com/odoo/odoo/issues/103473
X-original-commit: 819fa66546fbb53b808711b38c3296406c45c717
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The `analytic_distribution` field is a Json.
It was stored temporarily as a char.
Search is not available yet, so we do queries by hand when we need to search on keys.
Also added a constraint on account_analytic_distribution_model,
so we don't have models with accounts specific to a company when the model has no company or another company.
It would cause an issue when looking at the models from another company.
X-original-commit: 7064c95aa04e5138bb12ae97acfee04ebb67cc0e
Part-of: odoo/odoo#103097
Add choices for the business domain on applicability rules, so rules are more precise
Also put 'general' as domain from the view when it's what should have been.
Make analytic field visible since owl migration (for sale and purchase)
closesodoo/odoo#102461
X-original-commit: c5867d5009a7fb448fff1be487b9e9c3e7945d4b
Related: odoo/enterprise#32421
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
On the smart button where you can see the accounts of the plan,
we want to be able to see all accounts of subplans too.
We also change the order of the analytic accounts, by plan's complete name then name.
closesodoo/odoo#102717
X-original-commit: a1f886e7babd6283e01eed686e043aabe72d7dd9
Signed-off-by: William André (wan) <wan@odoo.com>
Before the fix, the payable/receivable line would also receive the distribution.
The compute function will only add it to the lines of display_type 'product' (as before 7e34030).
We now also add it to taxes that don't have `use_in_closing`.
closesodoo/odoo#102486
X-original-commit: 5551f336b61a6d441f3ec5416f987d8a98c221ca
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
The goal of this commit is to get rid of the analytic tags as they were confusing, serving tag purposes as well as distribution on analytic accounts.
Everywhere analytic tags were used as a distribution have been replaced with a new widget that will dispatch distribution on analytic accounts. If there was an analytic account field next to the tags, it has been included in the distribution.
Analytic tags that were used simply as information tags have been removed.
To fill the new widget, there are now 2 kind of rules that will help fill and prefill it.
The first are applicability: previous groups have been removed, and have by replaced by plans. Each account is required to have a plan. These plans define when they are available in the widget: a default applicability per plan and applicability lines that can specify rules following the context of the widget.
The second one are distribution models, that will replace previous default rules but follow the same principles. The accounts (and so the plans) that will be given by the distribution model can override the applicability rules from before.
closesodoo/odoo#98914
Related: odoo/upgrade#3885
Related: odoo/enterprise#30743
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Habib (ayh) <ayh@odoo.com>
Added CoA and account groups for Kenya.
Added taxes for Kenya
task-2809108
closesodoo/odoo#91396
X-original-commit: ac95f9f961405ed6f6b24f08a8aab05a6561e410
Related: odoo/enterprise#27344
Signed-off-by: Florian Gilbert <flg@odoo.com>
Instead of doing the difference between output tax and input tax, the tax report was doing the sum.
This commit fixes this computation without revamping the rest of the report
closesodoo/odoo#88774
X-original-commit: df0372a168db184c03fd901359fec6abd08f5bdd
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Added a CoA that provides accounts needed for legal reports
Added taxes (sales taxes and service sales tax, even provincial)
Reports are in enterprise
closesodoo/odoo#81775
X-original-commit: a89e0f84f534ebafd0f13dbee7a65ed5551dafb1
Related: odoo/enterprise#23054
Signed-off-by: Olivier Colson <oco@odoo.com>