Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
2129 Переглядів

I want the ability to create a customer invoice directly from a project task and link the task to the customer invoice. 

Аватар
Відмінити
Автор Найкраща відповідь
  1. Activate Studio and Create a new many2one field on the account.move model in the invoice form view. 


2) Next create a smart button on the task model that points to the field "Related Task" which we just created on the Journal Entry Model (account.move)


3) Next activate developer mode by going into Settings > activate the developer mode.


4) Come back to the task and click back on the smart button created. 

5) Next click on the bug icon (visible only in developer mode) on the view, and then click on "Edit Action". This will open a Window action for that view. 

6) In such cases, by default Odoo will let you only create a manual journal entry when such smart buttons are used. But this can be changed by updating the context and the domain on this window action. Below is the default context and domain:


So here are the following updates required: 

Before Domain: [('x_studio_related_task', '=', active_id)]

Updated Domain: [('x_studio_related_task', '=', active_id),('move_type', '=', 'out_invoice')]


Before Context: {'search_default_x_studio_related_task': active_id,'default_x_studio_related_task': active_id}

Updated Context: {'search_default_x_studio_related_task': active_id,'default_x_studio_related_task': active_id,'default_move_type': 'out_invoice'}

Note: The studio fields can vary from database to database, so make sure that the field names are correct. In this case, we are keeping the existing domain and context created by studio as it is and only adding more conditions to it. 

7) Now that the context and domain has been set, when you click "New" Odoo would create a customer invoice for you and link the task to the customer invoice.

Аватар
Відмінити
Найкраща відповідь

Creating a customer invoice right from a project task in Odoo isn't the simplest thing around, but you can do it if you get the Project and Accounting modules working together. So first, make sure you've got both modules active. In the task you're dealing with, you should be able to reference sales orders or log timesheets to feed into invoicing.


You'll wanna make your task types billable. This means any time someone records hours on that task, it gets captured for billing purposes. Odoo's got this feature called "Timesheet on Tasks" that really helps. Make sure you enable it. Once that's set, you can go to the task you're focusing on. Under the "Timesheets" tab, look for an option like "Create Invoice." It'll let you link to a customer.


If you ain't seeing these options, you might need to adjust permissions or settings. Sometimes it's about having the right roles to create financial transactions from tasks. It's kinda tricky, honestly, if you're not familiar. If you're stuck, check out the Odoo community forums or docs. They're lifesavers.


Figuring out Odoo's logic can be weird sometimes, but understanding how components connect in your Odoo setup is key. If you got more questions, lemme know!

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
серп. 24
1513
1
серп. 24
2173
1
серп. 24
1703
1
бер. 25
3619
1
квіт. 24
2435