A one-to-many relationship in a database occurs when each record in Table A may have many linked records in Table B, but each record in Table B may have only one corresponding record in Table A. A one-to-many relationship in a database is the most common relational database design and is at the heart of good design.
Questions tagged [one2many]
75 questions
0
votes
1 answer
one2many field get row number
I have a module contain one2many filed.
while I create data line in this o2m field, I'd like to append a row number to it.
I have try some method that I found in forum, like this link.
but since I have no function called _onchange_partner_id() , I…

Terrence Poe
- 634
- 4
- 17
0
votes
1 answer
How to group by One2many field records according to batch number Odoo10?
I am using Odoo10 and want to group_by/filter One2many field records according to batch number. I tried difference solution but didn't get expected result. So, Anyone can suggest me solution for this problem?
This is same problem like if we want to…

Pawan Kumar Sharma
- 1,168
- 8
- 30
0
votes
1 answer
Odoo add records to one2many field using onchange event twice
As code below , I could add record to the one2many field 'f_12m' when the other field 'onte' was changed .
But the problem is that when I change the 'note' value again , it delete all the records of 'f_12m' field , then add a new record .
How…

Adrian
- 39
- 2
- 7
0
votes
3 answers
Name in one2many field form does not same with name in input field
I have created a related field on the custom payroll form and I use odoo 10. I can not get the same name in one2many form field with input field.
I have attached picture in below. Hope in here, I want to make the name in black pen same with the name…

Ffs
- 43
- 1
- 7
0
votes
0 answers
Odoo 8 strange behavious using new api to inherit old api model
I added two fields to stock.picking using new api:
class StockPicking(models.Model):
_inherit = "stock.picking"
address = fields.Char(related='partner_id.street', string="Address")
sector = fields.Char(related="partner_id.sector",…

Kenly
- 24,317
- 7
- 44
- 60
0
votes
1 answer
how to raise exception if same product selects in on2many in odoo8
Haii frds...
I am not getting how to raise exception when same product is selected in one2many.
In sale order line--> Order_line when i selected one product for example Book&pen
In other time when i select the same product(Book&pen) its raise an…

Maddela Tejaswini4029
- 41
- 1
- 8
0
votes
2 answers
Select twice for check any check-box in one2many field odoo10
I Have added check-box in one2many field. But for marking check this check-box, it takes twice click on this check-box. So, how to active this check-box in single click?
Thanks in advance.

Pawan Kumar Sharma
- 1,168
- 8
- 30
0
votes
1 answer
Odoo 10 unexpected delete all relation records after filter
I'm in trouble when delete a record after filter.
I have record A loaded in form view (actually in my custom form view).
Record A have field B (one2many). When A's form view is loaded, B contains 3 records: B(1), B(2), B(3). Then by some way, I…

Cuu Nguyen
- 11
- 1
- 2
- 5
0
votes
1 answer
created data in One2many field also serve as data on other module
I want to in every time I created a data on One2many field, at the same time I want it to save as data on my maintenance.equipment. I try to find the solution on other module in addons but i didn't yet find the answer.
The scenario is, before…

law rence
- 169
- 1
- 18
0
votes
1 answer
How to autofill child produts in treeview, when parent product (BOM) is selected in odoo?
I'm writing a module in odoo. I hve defined some parent products and their child products. I want to do, when I'm selecting a parent product from many2one field, this parent product's childs will open in Treeview lines automatically. This tree view…

Büşra Çam
- 3
- 2
0
votes
2 answers
How to use "Enter" key insted of "Tab" key in openerp 7 for one2many field
I am working in sale order line and currently by pressing "Enter" key in one2many field it is creating new line, but I want to do some changes so Enter key work as TAB key ,It means if I pressed Enter key then insted of creating new line it should…

Keval Mehta
- 689
- 3
- 28
0
votes
1 answer
how to override the delete button in one2many from sale order
in one2many line delete button is there when a boolean field is true in that line the line will not delete and raise an exception. i do like the below code
but i will not effected in code. there is no any response the line deleted. please.... tell…

mani shankar
- 3
- 1
- 7
0
votes
1 answer
can someone suggest how to remove delete button in one2many lines whenone field is True
can someone suggest how to remove delete button in one2many lines whenone field is True
i have tried using
def unlink(self):
and overridding this method
Note: i am working in odoo 10

mani shankar
- 3
- 1
- 7
0
votes
1 answer
access values of one2many fields on kanban view odoo
Why i can't access values of one2many field on kanabn view . i need to loop over them to access them but it only return the number of records that's it.
I have tried this code but it is'nt working

Naresh Dawer
- 29
- 8
-1
votes
1 answer
How to count One2many field in report template odoo 15
Can some one tell me how to count One2many field in report template please?
I've a One2many field called calendar_jobs_ids
I want to count it and print to my report template, but i don't know how to do it.
Can some one help me please.
Thanks.

fudu
- 617
- 1
- 10
- 19