Skip to content
Snippets Groups Projects
  1. Mar 30, 2020
    • Adrian Torres's avatar
      [FIX] *: set ondelete policy of required Selection fields · 1daf8eb1
      Adrian Torres authored
      
      With this commit, Selection fields with `required=True` which are
      extended via `selection_add` are given proper ondelete policies to
      ensure the cleanup of records containing these extended options during
      uninstall of the extending module.
      
      This commit also cleans up leftover uninstall hooks that were being used
      to handle the same set of problems prior to the ondelete mechanism being
      implemented for Selection fields.
      
      closes odoo/odoo#46325
      
      Related: odoo/enterprise#9117
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      1daf8eb1
  2. Jan 30, 2020
  3. Jan 16, 2020
    • oco-odoo's avatar
      [IMP] account: add 'partial' and 'reversed' payment states to invoices · 8e4158af
      oco-odoo authored
      
      - 'partial' payment state corresponds to invoices whose payable/receivable move line has been partially reconciled with some other line.
      
      - 'reversed' payment state corresponds to entries that have been cancelled by the creation of a single reverse entry (using the dedicated button on the form view). This state can be set on invoice as well as on regular entries.
      
      => To stay consistent with the naming conventions, this commit also renames invoice_payment_state field to payment_state, since it's no longer only applicable on invoices.
      
      closes odoo/odoo#41723
      
      Related: odoo/enterprise#7202
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      8e4158af
  4. Sep 25, 2019
  5. Aug 13, 2019
  6. Aug 01, 2019
    • wan's avatar
      [IMP] account: misc improvement post accountappocalypse · 81905658
      wan authored
      * remove _onchange_invoice_date_due as it is superseeded by _onchange_recompute_dynamic_lines
      * change invoice_date_due only if not set and if there is no payment term, it was erased and set to invoice_date_due if we did not set invoice_date_due before posting
      * raise a warning if we validate an empty move/invoice
      * correct the renaming of user_id -> invoice_user_id in invoice template
      * correct the renaming of date_invoice -> invoice_date
      * the data on purchase journals was not displayed correctly as the sign
      of the amount in the graphs was not signed correctly
      * the methods for computed invoice reference were not correctly renamed in l10n_be for (account.move)._get_invoice_computed_reference
      * the default reconciliation model was only installed in the first company, we make it now install along with the chart of account
      * the partner of invoices and the label of invoice lines should be required
      * the widget one2many_list doesn't exist
      
      closes odoo/odoo#34786
      
      Signed-off-by: default avatarCedric Snauwaert (csn) <csn@openerp.com>
      81905658
  7. Jun 28, 2019
    • Laurent Smet's avatar
      [IMP/REF] accounting-pocalypse yeaaahh · beaa30a3
      Laurent Smet authored
      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
      beaa30a3
  8. Jul 17, 2019
    • Adrian Torres's avatar
      [REM] *: calls to @api.multi · 4b38cc65
      Adrian Torres authored
      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'`
      4b38cc65
  9. May 10, 2019
  10. Jul 01, 2019
    • Laurent Smet's avatar
      [MERGE] manual forward port of accounting-pocalypse (beaa30a3) · bc131c0c
      Laurent Smet authored
      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
      bc131c0c
  11. Jun 10, 2019
  12. Feb 28, 2019
  13. Apr 02, 2019
  14. Jan 15, 2019
    • Nans Lefebvre's avatar
      [FIX] l10n_be_invoice_bba: fix mail template · 1e966452
      Nans Lefebvre authored
      The field reference_type has been renamed invoice_reference_type in v11.
      The selection value 'bba' for that field has been renamed 'structured'.
      We update the template to reflect these changes.
      
      Discovered thanks to a forward port of that field up to v12.
      
      closes odoo/odoo#30224
      1e966452
  15. Nov 14, 2018
  16. Oct 17, 2018
  17. Sep 27, 2018
    • Adrian Torres's avatar
      [REF] *: adapt code to new related default behaviour · 3f4f77fd
      Adrian Torres authored
      This commit adapts the business code to changes introduced by
      the parent commit in order to keep the same behaviour as before.
      
      All readonly=False fields will have to be checked afterwards to confirm
      that the business case requires write access to the source field.
      3f4f77fd
  18. Sep 18, 2018
  19. Oct 01, 2018
  20. Sep 11, 2018
  21. Sep 01, 2018
  22. Aug 20, 2018
  23. Aug 18, 2018
  24. Aug 16, 2018
  25. Aug 06, 2018
  26. Aug 03, 2018
  27. Jul 26, 2018
    • Laurent Smet's avatar
      [IMP] account: automatic communication management on out_invoices · b5bb5bd4
      Laurent Smet authored
      On the accounting config, you can select an automatic way to compute the
      reference on invoice and then, improve the reconciliation in a later task:
      - free communication: set what you want as reference (default)
      - based on partner: find the partner more easily
      - based on number: retrieve the invoice directly
      
      Was task: 1847703
      Was part of PR #25921
      b5bb5bd4
  28. Jul 24, 2018
    • Pratima Gupta's avatar
      [IMP] account, l10n_be_invoice: make templates more modern and updated with Odoo guidelines · 0d83edc9
      Pratima Gupta authored
      
      In this commit we improve templates used in account and l10n_be. Purpose of this
      commit is to have templates that embed or use standard Odoo email layouts to
      make them look modern and have a common style across all emails.
      
      Main guidelines
      
       * better use of div / p / br to try to lessen layout issues, especially
         when updating templates using the editor;
       * correctly sequence the templates fields definition;
       * correctly set templates values notably auto_delete and user_signature
         fields to avoid confusion;
       * correctly layout the email content using light notification email. It
         can either propagate the layout choice through various send mail methods
         or directly embed the styling in the templates for more technical or
         complex templates;
       * use email_formatted computed field when possible to avoid having hand-made
         from / to addresses;
       * fix various typos and improve subjects when necessary;
      
      Content of emails is not necessarily updated as the purpose of this task is
      about styling, not content itself.
      
      This commit is linked to task ID 1843395 and 1843376 (and 1868112) and to
      PR #25294 and #25349 (and #25889).
      
      Co-Authored-By: default avatarMitali Patel <mpa@odoo.com>
      0d83edc9
    • Martin Trigaux's avatar
      [I18N] remove es_AR translations · a425695e
      Martin Trigaux authored
      Courtesy of Juan José Scarafía, ADHOC
      The quality of the Spanish (Argentina) translations is very poor.
      Remove them all and will start from scratch, translating only when needed.
      a425695e
  29. Jul 18, 2018
  30. Jul 11, 2018
  31. Jul 01, 2018
  32. May 28, 2018
  33. Feb 28, 2018
  34. Feb 14, 2018
  35. Feb 09, 2018
  36. Jan 25, 2018
  37. Jan 01, 2018
  38. Dec 19, 2017
    • Martin Trigaux's avatar
      [I18N] es_ cleaning translations · 4af12acc
      Martin Trigaux authored
      The regional variations are not published on Transifex and hsould be translated
      manually.
      
      The translations are mainly from previous versions or contains buggy fuzzy
      translations (not matching the real source string).
      
      Clean based on the .pot and delete the empty files
      
      Fixes #21733
      4af12acc
Loading