Questions tagged [odoo-14]

Use this tag for version specific questions about Odoo 14 - the suite of open-source business applications written in Python. When using this tag also include the more generic [odoo] tag where possible.

591 questions
1
vote
0 answers

How to add click event and handler to Kanban card

I am trying to learn how to use Javascript framework in Odoo 14. I am trying to add click event with class selector and event handler for Kanban card. My problem: I am using .include() on KanbanRecord to add desired event and handler (which might…
xixo222
  • 157
  • 2
  • 9
1
vote
2 answers

Odoo Add Multiple Group With Different Condition For the Same Field

Hope all is well for you guys, gday. So I inherited a field called date_done from stock.picking model, which has readonly:true attribute by default. I revoked it to readonly but not in 'assigned' status for all Odoo user in the code below :
altela
  • 306
  • 2
  • 13
1
vote
1 answer

Odoo Create Model Programmatically and Add/Append to One2many Field

So I have a Sale model and SaleLine model. Sale model have a field sale_line_ids as One2many from SaleLine model. Sale class Sale(models.Model): _name = 'store.sale' _description = 'Store Sale' ... sale_line_ids =…
NM Naufaldo
  • 1,032
  • 1
  • 12
  • 30
1
vote
0 answers

[Odoo 14]: Trigger recomputation of all account.moves

I want to trigger a recomputation of all account.move entries (because I changed a setting in the taxes). I have created a cron job that gets all invoices and calls _compute_amount() on them but to no avail. Calling similiar onchanges and compute…
Josip Domazet
  • 2,246
  • 2
  • 14
  • 37
1
vote
1 answer

How to format and round down in QWEB report?

In Odoo, I set decimal precision to be 4 for a field. Let's call it price. The field price now has a value with 4 decimal places in the database. It is displayed in a QWEB report, as expected, with 4 decimal places. However, I need to display it…
holydragon
  • 6,158
  • 6
  • 39
  • 62
1
vote
1 answer

Odoo Decrease Product Quantity Programmatically

I have created a custom module where there is a field related to product. When the user checkout the product in the custom module, I want to decrease the quantity of product in the override create method. How to achieve this?
NM Naufaldo
  • 1,032
  • 1
  • 12
  • 30
1
vote
3 answers

Select Sequence to generate name for Invoice

In Accounting -> Invoices When creating a new invoice and confirming it, the system will generate the next running sequence from Journal's sequence. However, I need to change it so that I have a Many2One field (already created into the model) named…
holydragon
  • 6,158
  • 6
  • 39
  • 62
1
vote
1 answer

How to show confirmation dialog when deleting records in Odoo One2many tree list?

In odoo, when you show a One2many field as a tree view, there is always a trash icon at the right side, that is used to delete the selected One2Many record. When you click that icon it deletes the record without confirmation. I was wondering if it…
Ernesto Ruiz
  • 736
  • 9
  • 31
1
vote
2 answers

conditions for a field to appear in odoo 14

I'd like field A to appear only if field B has a given value field B doesn't belong to the same model, it belongs to a model connected through a many2one relationship How do I write the contents of the attrs attribute for field A in the form ? Until…
user1632812
  • 431
  • 3
  • 16
1
vote
0 answers

Odoo 14 - Override method associated with "Discard" button

I need to run additional commands after the Discard button has been pressed. I know how to do this with Save button: @api.model def create(self, vals): # my code before create result = super(MODEL_NAME, self).create(vals) # my code…
AnJ
  • 581
  • 1
  • 6
  • 29
1
vote
0 answers

Cannot access Preferences(My Profile) in odoo 14

I am trying to access the Preferences(My Profile) in Odoo 14 to be able to change the user's country. when I try to access the Preferences the following error appears: ValueError: Invalid field 'totp_enabled' on model 'res.users'
1
vote
1 answer

How to create custom char ID field in Odoo model?

In odoo id special field is allways an auto incremental integer. But for my Odoo app I want that field (id) to be a Char for an specific model. That id will also be use for Many2One relations. How can I do that? I am working with Odoo 14
Ernesto Ruiz
  • 736
  • 9
  • 31
1
vote
1 answer

How to change account.move sequence & prefix in odoo 14 and later?

I have to modify account.move sequence prefix and number and I try it like other odoo versions (10,12 and 13). With developer mode activated, Settings --> Technical --> Sequences. I have tried to search Sequence Code for account.move and does not…
1
vote
0 answers

Render a component in a button click Odoo 14

I am trying to render a component in a button click. I created a template and a component. But I don't know how to link the button action and the component. Here is the code: *component.js /** @odoo-module **/ const { Component } = owl; const…
KbiR
  • 4,047
  • 6
  • 37
  • 103
1
vote
1 answer