Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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č

Registering a payment "trying to delete or mandatory field not set - account_id" error

Naroči se

Get notified when there's activity on this post

This question has been flagged
1 Odgovori
4702 Prikazi
Avatar
Ernesto Fabian Rodriguez Coimbra

Hello,

I've updated my chart of account an now I get this error when trying to register a payment:

The operation cannot be completed, probably due to the following:

- deletion: you may be trying to delete a record while other records still reference it

- creation/update: a mandatory field is not correctly set

[object with reference: account_id - account.id]

0
Avatar
Opusti
Avatar
fisher
Best Answer

The same error still in odoo 10 community and enterprise when register a customer payment, while no problem when registering vendor payment.

the workaround is as following

  1. click radio button "send money"  as new payment type

  2. select a valid vendor from the parnter dropdown list

  3. click radio button "receive money" - restore the oginal option

  4. select a valid customer fromthe partner dropdown list

  5. fill in other mandatory fields, then you can Validate the payment without any error

this bug is caused by 2 duplicate partner_id field used in the form view definion,

<field name="partner_id" nolabel="1" attrs="{'required': [('partner_type', '=', 'customer')], 
'invisible': [('partner_type', '!=', 'customer')],
'readonly': [('state', '!=', 'draft')]}"
context="{'default_is_company': True, 'default_customer': True}"
domain = "[('customer', '=', True)]"/>
                                   
<field name="partner_id" nolabel="1" attrs="{'required': [('partner_type', '=', 'supplier')],
'invisible': [('partner_type', '!=', 'supplier')],
'readonly': [('state', '!=', 'draft')]}"
context="{'default_is_company': True, 'default_supplier': True}"
domain = "[('supplier', '=', True)]"/>

the first partner_id field in the form did not trigger onchange event as expected, which resulted in the missing of required field destination_account_id ( the accounts receivable from product form )  in generated account move line object, this account_id should be derived via compute method "_compute_destination_account_id" based on partner_id, payment type and partner type.


seems that the current web client can not properly handle the case of same field defined more than 1 time in the same form view, there is no easier way to find the final solution.


my suggested solution is to split the two register payment forms, one for vendor payment, and the other for customer payment, in each form only one partner_id to be used.

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

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

Prijavi
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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