Commit Graph
147 Commits
Author SHA1 Message Date
Martin Trigaux 39da150ac2 [FIX] *: add sudo when accessing ir.model.data 2021-08-10 13:49:04 +02:00
wan 9b3c19b41e [FIX] account: fix standalone test with demo data creation
The test is running in sudo mode, so we need to specify the company in
the search.

Also do not load the demo data when installing as we would do the work
twice for most localization.

closes odoo/odoo#67235

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-03-04 14:11:50 +00:00
wan d31c5c70e0 [IMP] account: make demo data for all localization
Task 2124952

Extract all the demo data from `l10n_generic_coa` to a new way of
generating the demo data for accounting modules.
Because the data needs to be created multiple times, and right after the
chart template instanciation, it cannot be done the usual way. Instead,
we use python generators to declare the data. It allows us to reference
data that was not created yet at the start of the creation of the demo.
An xml_id is given, prefixed with the id of the company it is created
for (just like the instanciation of the chart template)

To find the correct accounts, a helper method has been added to
`account.account`. It will look for an account with the correct xml_id
(which is the one of the l10n_generic_coa, that we have to put on the
other l10n modules too, in the future). If it didn't find the xml_id, it
will look for an account with the correct type. If it still didn't find
one, just take any account.
2021-02-17 08:39:28 +00:00
mcm-odoo d4710d92dd [IMP] account: add payment terms to data
- This commit moves the Payment Term "End of Following Month" from
  demo data to data and adds two new Payment Terms: "21 Days" and
  "30% Now, Balance 60 Days".
  It allows the customer to define less Payment Terms

task-2032586
2019-08-29 11:49:17 +00:00
Prakash Prajapati 30128860da [IMP] sale,purchase,...: Improve description of demo data product
Purpose of the task is some demo data values are not matching with the products
mentioned so update the demo data values with matching product.

Task: 1892754

closes odoo/odoo#28573
2019-02-13 09:20:25 +00:00
Olivier Colson cd5ce3c7dc [IMP] account: payment terms usability
* Replace payment term lines options 'last_day_following_month' and 'last_day_current_month' by two new less specific ones allowing choosing the day directly, and thus not limited to the last one anymore (semantically different).
* Rename payment term line option value 'fix_day_following_month' into 'after_invoice_month' for more clarity (no semantic change).

Was task 24239. Was PR #15487
2017-11-30 16:08:30 +01:00
Yannick Tivisse 83d5aee748 [IMP] account: Convert yml demo files to xml
NB: the account.move and the account.move.lines creation have been dropped as they were not created in yml due to the if condition.
2017-11-16 14:49:06 +01:00
Christophe Monniez f5bf961258 [IMP] account: Remove unused yml files 2017-11-07 16:26:15 +01:00
Yannick Tivisse 8cc216b659 [IMP] account: Split clearly the accounting & invoicing applications
PURPOSE
=======

1) Have a clear split between the invoicing and the accounting apps
2) Have a clear split between the community and the enterprise version (no accounting in community)

SPECIFICATION
=============

(1) When only invoicing installed, we shouldn't see accounts (for community and enterprise)
(a) Perpetual Inventory Valuation:
     - Hide the field inventory valuation from the product category
(b) Taxes
- No accounts
- No cash basis option
- No tax adjustment

(2) Remove from Community, modules:
- Accounting
- Budgets
- Assets

(3) No account_report in community, keep PDF reports for
- sale/purchase journal
- Aged partner balance
- Partner Ledger

(4) Clean split between invoicing and accounting in enterprise
(a) When installing invoicing, I shouldn't have access to accounting just by changing my access right to adviser
(b) Menus (when only invoicing installed)
- Sales
    - Customer Invoices
    - Customer Credit Notes
    - Payments
    - Customer Statements
    - Customers
    - Sellable Products
- Purchases
    - Vendor Bills
    - Vendor Credit Notes
    - Payments
    - Vendors
    - Purchasable Products
- Reporting
    - Partner Reports
        - Partner Ledger
        - Aged Receivable
        - Aged Payable
    - Audit Reports
        - Tax report
    - Management
        - Invoices
        - Product Margins
- Configuration
    - Settings
    - Products
        - Products
    - Accounting
        - Taxes
        - Fiscal Positions
        - Bank Accounts
        - Journals
    - Management
        - Payment Terms
        - Follow-up levels
    - Payments
        - Payment Acquirers
(c) Settings (when only invoicing installed)
- Fiscal Localization
- Taxes
    - Default Taxes
    - Rounding Method
    - TaxCloud connection
    - TaxCloud Categories
    - EU Digital Goods VAT
    - VIES VAT CHECK
- Currencies
    - Main currency
    - Multi-currencies
- Invoicing
    - Warnings
    - Docsaway
- Customer Payments
    - Follow-up levels
    - Payment Followup
- Bills Payment
- Bank & Cash
- Analytics
    - Margin
- Automated Entries

Remarks
- Test with the different access rights
2017-08-11 13:57:30 +02:00
Thibault Delavallée 37bb253166 [FIX] account: allow to reinitialize module
Account demo data try to add lines to payment terms. However when
reinitializing the module similar lines are added and a constraint
raises as there should not have duplicates. This commit voids
payment terms before refilling them.
2017-06-13 10:59:22 +02:00
Olivier Colson ad811b19a0 [FIX] account
With multiple companies defined, ensure consistency in demo data in case a localization reusing the ones defined in account module is installed. Before that, the demo data used several hardcoded values to reference the company, but some models relied on the default company, which lead to crash when the active company was not the one hardcoded in demo data and such a new localization got installed.
2017-03-27 15:41:32 +02:00
Cédric Snauwaert 064be5b9e5 [IMP] account: add demo data for overdue invoice.
This is required for testing the customer statement report
2017-02-07 11:24:05 +01:00
Kinjal Mehta b0185e15cc [FIX] all: fix some common typos
Sale Order --> Sales Order
Sale Report --> Sales Report
Sale Team -> Sales Team
Payment Term --> Payment Terms
2016-12-22 13:29:38 +01:00
Denis Vermylen (dve) bc8d5dbf2c [REF] account: replace workflow by python code 2016-09-02 10:16:49 +02:00
Jainik Patel 531ed05a43 [IMP] account: add bank statement operation presets as template in l10n modules.
In details:
* account.operation.template object renamed into account.reconcile.model
* account.reconcile.model.template object created
* added some records for l10n_be

Was PR 11230
2016-08-30 09:55:24 +02:00
qdp-odoo b17e4a0f6b [IMP] account: revamp statements and payments numbering.
Numbering of statements is not anymore automated, sequence of the journal is now only used for the numbering of account.move (for consistancy with payments). Name of statements now appears as 'reference'.
Cancelling of a statement line keeps in memory the old move's name to reuse it in the same fashion as for account.invoice (avoiding gaps in numbering).
Cancelling of a payment now keeps in memory the old move's name to reuse it in the same fashion as for account.invoice (avoiding gaps in numbering)
2016-08-19 17:41:36 +02:00
Yannick Tivisse 9c377d37d2 [FIX] account: type mismatch in account_invoice_demo.yml 2016-08-09 10:29:06 +02:00
Yannick Tivisse d6e1d41128 [MIG] account: Migrate remaining old API chuncks of code 2016-08-08 12:24:40 +02:00
Yannick Tivisse 68c6f0deeb [account*, mrp*, sale*, stock*,...] Convert remaining .yml files to new API
Only purchase still has old api yml files, but they will be converted in
the module migration
2016-08-04 11:55:50 +02:00
Fabien Pinckaers 4b2091e8c9 [FIX] account: demo data invoice line without required name
[IMP] account: d'ont create journal items for invoice lines with quantity 0 (not amount because of tax)
[IMP] crm: usability kanban view and schedule an activity
[FIX] crm: schedule an activity bug when no activity yet
[IMP] website: app for website (not a menu in website admin)
2016-04-20 00:17:17 -07:00
Yannick Tivisse e03943a8df [IMP] Remove and clean product demo data
Remaining products :
- product_product_0 becomes service_order_01
- product_product_1b becomes service_cost_01
- product_product_43 becomes product_order_01
- product_product_47 becomes product_delivery_01
- prodcut_product becomes product_delivery_02
- Replace product_product_56 by service_delivery
- Replace product_product_59 by consu_delivery_01
- Replace product_product_58 by consu_delivery_02
- Replace product_product_57 by consu_delivery_03

Removed products :
- product_product_53, product_product_57, product_product_55, product_product_54, product_product_52,
  product_product_51, product_product_50, product_product_48, product_product_46, product_product_32,
  product_product_33, product_product_28, product_product_38, product_product_39, product_product_40,
  product_product_41, product_product_34, product_product_29, product_product_30, product_product_44,
  product_product_31, product_product_35, product_product_36, product_product_37, product_product_42,
  product_product_45, product_product_49, product_product_26, product_product_14, product_product_15,
  product_product_18, product_product_19, product_product_21, product_product_23

Removed corresponding binaries.

Removed all Bill of Materials demo data, that were ridiculous and replace them by 2 bom: A complete
computer, and a kit computer. Rewritten the tests accordingly.

Fixed tests :
- sale_mrp/test/cancellation_propagated.yml : The yaml ref function return a id, not a dictionnary
- sale_stock/tests/test_sale_stock.py : The service product invoiced on the delivered quantity was
  in fact not invoiced on delivery on the test. As we are in sale_stock, Without timesheet, we
  manually set the delivered qty for the product serv_del. If we don't do this, the invoice will
  never be fully invoiced.
- The pricelist rules choice is not based on the sequence anymore (Seems to be a bug, reported to
  online). By the way, I changed the product to avoid the overlap.
- sale_mrp/test/sale_mrp.yml: The yaml ref function return a id, not a dictionnary
- mrp : Rewritten the tests to be coherent with the new bom data
2016-01-07 16:07:28 +01:00
Cedric Snauwaert 120f6a7ea5 [FIX] account: fix incorrect value for company_residual_signed on invoice + set invoice in the journal currency and not in euro 2015-12-02 17:24:50 +01:00
Nicolas Martinelli e700badfa5 [FIX] account: invoice date of demo data
The invoice date of demo data is changed to match the current
month/year. The original issue is the following:
- install accounting, keep default configuration (company currency: USD)
- add a payment for Agrolait in USD (e.g. $10,000)
- go to customer invoice demo_invoice_2 (which is in EUR)
- the system proposes you to add a outstanding payment to pay the
  invoice -> do it

The invoice is not shown as fully paid, but on the other hand if you
click again to add an outstanding payment, nothing happens.

The reason of this bug is because for this specific bill, the currency
rate has changed between the invoice date and the payment date. The
amount used to pay the bill: this is the price in USD, at the rate
corresponding to the date of the invoice (i.e., what you were supposed
to pay at the time of invoicing). The fact that is does not mark your
bill as paid is also correct: the payment is written with the rate at
the date of the payment, and in this case, the invoice is not fully
paid. You should therefore reconcile the invoice and create a write-off
afterwards to register the exchange rate difference.

This unusual situation (pay an invoice in a different currency, and
moreover the rate has changed) has not been taken into account for v9,
and there is no clean solution which can be foreseen for a stable
version.

However, since this situation arises right away with the demo data, this
can be very misleading for a new user. The fix simply changes the date
of the invoices, so that there will be no rate change between the
invoice date and the payment date with the demo data.

opw-657151
2015-11-27 12:48:38 +01:00
qdp-odoo 64a6a84073 [FIX] purchase: stock valuation with taxes has to use the quantity 1 for computation of unit price 2015-10-14 13:36:15 +02:00
Nicolas Martinelli 5cb2943cca [IMP] account*: adaptation due to the new Sale module
Major changes:
- No use of UoS anymore
- No analytic journal (journal_id) on account move lines

Reason: complete rewrite of the Sale module.

Responsible: fp, dbo, nim
2015-08-27 18:10:18 +02:00
Divyesh Makwana 6e5db46626 [IMP] account: payment terms usability improvement 2015-08-26 15:08:48 +02:00
Yannick Tivisse c3a24af6a0 [REM] Remove res_partner_9, replace him by res_partner_12 2015-08-25 19:27:24 +02:00
Yannick Tivisse 706255eec1 [REM] Remove res_partner_17, replace him by res_partner_12 2015-08-25 19:27:22 +02:00
Yannick Tivisse 8b4a3e9ca4 [REM] Remove res_partner_6, replace him by res_partner_1 2015-08-25 19:27:21 +02:00
Yannick Tivisse ed97a70b10 [REM] Remove res_partner_5, replace him by res_partner_3 2015-08-25 19:27:21 +02:00
qdp-odoo 0b3e01c13f [IMP] account*: various usability improvements. While most of them are simple renaming, it also includes the following field removals:
- [REM] account_budget: removal of field 'validating _user_id' on account.crossovered.budget, which is now replaced by inheritance with mail.thread
   - [REM] account_budget: removal of field 'code' of account.crossovered.budget, which was not used and redondant with its name
   - [REM] account_asset: removal of field 'note' of account.asset.category, which was not used and redondant with its name
   - [REM] account: removal of field 'to_check' of account.move, which was redondant with state == 'draft'
   - [REM] account_voucher: removal of field 'audit' of account.voucher, which was a fields.related on move_id.to_check
2015-07-14 21:48:23 +02:00
Mahendra barad 75d7bbb46e [REF]Account: Refactoring the account, Change some fields name according to new api guidelines
code improvement

code improvement

payment_method to payment_method_id

writeoff_account to writeoff_account_id

property_account_receivable to property_account_receivable_id

property_account_payable to property_account_payable_id

property_account_expense_categ to property_account_expense_categ_id

property_account_income_categ to property_account_income_categ_id

property_account_expense to property_account_expense_id

property_account_income to property_account_income_id

property_account_expense_categ fix

sale_tax to sale_tax_id and default_sale_tax to default_sale_tax_id

purchase_tax to purchase_tax_id and default_purchase_tax to default_purchase_tax_id

ref_companies to ref_companies_ids

property_account_position to property_account_position_id

property_payment_term to property_payment_term_id

property_supplier_payment_term to property_supplier_payment_term_id

bank_accounts_id to bank_accounts_ids

payment_method fix after rebase

user_type after rebase

payment_method fix after rebase

after rebase

invoice to invoice_id

fix payment_method_id after rebase

code improvement

[IMP]user_type to user_type_id

[IMP]property_stock_account_input_categ, property_stock_account_output_categ to _id

[IMP]improve after rebase

[IMP]fix type

[IMP]Account: code improvement
2015-06-23 14:00:43 +02:00
qdp-odoo 57d5ef41ba [IMP] account, account_asset: demo data were wrongly assuming that any CoA would have at least a fixed asset account 2015-06-19 14:02:09 +02:00
Josse Colpaert baca220bb7 [FIX] invoice onchange: onchange_invoice_line_ids continued 2015-05-18 17:41:58 +02:00
Christophe Simonis 5aee318f16 [FIX] account: use new api in demo yml 2015-05-18 17:07:09 +02:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
Jamin Shah a25d06815f [IMP] account: add product to invoice demo data
This will avoid "undefined" data in "Invoice Analysis" reporting view.
2015-03-10 15:40:59 +01:00
qdp-odoo 327cb95867 [MERGE] merged the feature branch that improves the import of bank statements. PR 3718 2015-01-14 18:32:28 +01:00
Dikshit Prajapati 19c7bfb635 [IMP] account: value_amount field 0-1 -> 0-100% 2014-10-14 10:52:49 +02:00
Christophe Simonis 31bf30d2d0 [MERGE] forward port of branch 8.0 up to ed1c173 2014-09-05 15:28:22 +02:00
qdp-odoo f4e350ca36 [FIX] account: several fixes on the new bank statement reconciliation widget 2014-09-04 11:32:16 +02:00
qdp-odoo cbc52f80eb [FIX] account: fixes of bank statement reconciliation widget. Add of a partner_name field to hold the name of the counterparty in case it is not detected instead of merging it to the communication. Structured communication goes in the same communication field, while reference field holds the reference of the transaction (for whatever that means)" 2014-08-29 19:13:41 +02:00
cod-odoo a301b4c7fc [MOVE] account: moved account/project files to analytic or account, depending on which module the moved code belongs to. This allows to remove references to project in account module. Also added some improvements in project when deleting a project (delete account if void) or when deleting an account (delete project if void). 2014-08-04 13:23:46 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
qdp-odoo 3ac8b531f5 [IMP] account: improved demo data for bank statement reconciliation 2014-06-20 10:01:44 +02:00
Thibault Delavallée 59e98f1e2b [IMP] account: removed demo data about unexisting field, causing a warning. 2014-06-11 08:44:41 +02:00
qdp-odoo e3491ccb71 [IMP] account: bank statement reconciliation widget (part 2) 2014-05-30 18:47:50 +02:00
qdp-odoo 7580b6510b [IMP] account: bank statement reconciliation widget 2014-05-30 18:34:13 +02:00
Martin Trigaux 1f163f5a78 [FIX] account: demo opening period, add x in the name
bzr revid: mat@openerp.com-20140113122917-zszm18ywrel1ie68
2014-01-13 13:29:17 +01:00
Martin Trigaux e0f4c59f11 [FIX] account: accounting periods in demo data are no longer opening periods, create a new period_0 as opening period
bzr revid: mat@openerp.com-20140113105555-nuefln1bajgwexpd
2014-01-13 11:55:55 +01:00