Populate Data From One DocType To Another Using frappe.new_doc | Frappe | ERPNext

Поделиться
HTML-код
  • Опубликовано: 9 ноя 2024

Комментарии • 10

  • @mhmedRjb
    @mhmedRjb 2 месяца назад

    I love you ,God save and bless you, you are the best

  • @addisuhaile6891
    @addisuhaile6891 2 месяца назад

    This is awesome, Keep up!

  • @rkroy39
    @rkroy39 4 месяца назад +1

    Hi, I am Gaurav . I am working on frappe and ERP. There is no Channel to do this in programatical way. Thanks and make more videos from coding point of view also

  • @technomindglobal9612
    @technomindglobal9612 5 месяцев назад +1

    Good 💯

  • @asksonu
    @asksonu 2 месяца назад

    How do I insert rows everytime based on some condition in server side script ? It is always overriding existing values ?

    • @ERPNextWithNihantra
      @ERPNextWithNihantra  2 месяца назад

      To insert rows into a child table, without overwriting existing ones, use the `append` method. This adds new rows without affecting what's already there. Here's a simple example:
      def before_save(doc, method):
      if doc.some_field == "some_value":
      new_row = doc.append('items', {})
      new_row.item_code = 'ITEM001'
      new_row.qty = 10
      if doc.other_field == "other_value":
      new_row = doc.append('items', {})
      new_row.item_code = 'ITEM002'
      new_row.qty = 5
      This way, new rows are added only if the condition is met, and existing rows stay untouched.

  • @Nitrate011
    @Nitrate011 5 месяцев назад +1

    how you can check the field names from here?

    • @TheNewSuly
      @TheNewSuly 5 месяцев назад +1

      Just press "alt" button