Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to configure Invoice due date as 30 days from the date of creating the Invoice?

Naroči se

Get notified when there's activity on this post

This question has been flagged
configurationaccountinginvoces
2 Odgovori
7029 Prikazi
Avatar
Vikas Maharana

Hi,

I want to configure the Invoice due date as 30 days from the date of creating the Invoice.

Suppose I create an invoice today then the due date should be 30 days from today's date automatically.

How can I achieve this?


0
Avatar
Opusti
Avatar
Bram Van Gaal (brvg)
Best Answer

You can do this manually by changing the Due Date or Payment Terms on the invoice itself. 

Now in order to do this automatically you can set Payment Terms per customer.


0
Avatar
Opusti
Vikas Maharana
Avtor

I want to do it automatically. so that, whenever an invoice is created the due date will be 30 days

Bram Van Gaal (brvg)

When you create an invoice and select a customer, the payment term will be set to whatever you defined for that customer. So if you set it to 30 days for a customer then this will be automatically applied to all new invoices for that customer.

Vikas Maharana
Avtor

I want the due date to be 30 days not a payment term. so that I can follow the invoices as per due date.

Bram Van Gaal (brvg)

If you set the payment term to 30 days then this will also set the due date to 30 days from today. Is there any specific reason you don't want to set the payment term?

Vikas Maharana
Avtor

Yes, I don't want to use payment terms and It requires code customization.
so whenever a user wants to modify he can go to configuration and change the no. of days there in the setting itself.
As we have for the sales quotation.

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

Change the _compute_invoice_date_due function
 Try this code:

class AccountMove (models.Model):
    _inherit = 'account.move'

    invoice_date_due = fields.Date(
        string='Due Date',
        compute='_compute_invoice_date_due', store=True, readonly=False,
        index=True,
        copy=False,
    )

    @api.depends('needed_terms')
    def _compute_invoice_date_due(self):
        due_date = fields.Date.context_today(self)+ timedelta(days=30)
        for move in self:
            move.invoice_date_due = move.needed_terms and max(
                (k['date_maturity'] for k in move.needed_terms.keys() if k),
                default=False,
            ) or move.invoice_date_due or due_date


Hope it helps

0
Avatar
Opusti
Vikas Maharana
Avtor

I need help on this

I created a field in the configuration.

from odoo import api, fields, models, _

class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'

invoice_validity_days = fields.Integer(
related='invoice_date_due.invoice_validity_days',
readonly=False)

@api.onchange('invoice_validity_days')
def _onchange_invoice_validity_days(self):
if self.invoice_validity_days < 0:
self.quotation_validity_days = self.env['res.company'].default_get(
['invoice_validity_days']
)['invoice_validity_days']
return {
'warning': {
'title': _("Warning"),
'message': _("Invoice Validity is required and must be greater or equal to 0."),
},
}

In Views

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="res_config_settings_view_form_inherit" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.account</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="40"/>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<field name="country_code" invisible="1" groups="account.group_account_manager"/>
<app data-string="Invoicing" string="Invoicing" name="account" groups="account.group_account_manager">
<field name="has_chart_of_accounts" invisible="1"/>
<field name="has_accounting_entries" invisible="1"/>
<block title="Customer Invoices" id="invoicing_settings">
<setting id="invoice_validity_days" help="Invoice validity in days">
<field name="invoice_validity_days"/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</data>
</odoo>

on change in settings, it should appear in invoice.

Please help on this

Vikas Maharana
Avtor

??

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Error: "res.config.settings"."property_account_income_categ_id" field is undefined
configuration accounting
Avatar
Avatar
1
dec. 25
1058
US company selling to EU – OSS VAT automation not working
configuration accounting
Avatar
Avatar
1
okt. 25
574
Filtering Listed Journals in Accounting Dashboard Odoo 18 Solved
configuration accounting
Avatar
Avatar
1
okt. 25
2182
Account Groups Functionality
configuration accounting
Avatar
Avatar
Avatar
2
okt. 25
1647
Trying to setup Amazon Payment Services Solved
configuration accounting
Avatar
Avatar
2
okt. 25
1019
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now