Odoo invoice items that need to be associated to different analytic accounts - odoo

We need to invoice donations that are linked to an analytics account.
We have about 400 projects for which a user can make a donation.
A project is linked to a analytic account and only 1 donation per invoice.
As I understand it correctly, OpenERP/Odoo uses an invoice based on the analytic account to which it is associated at item level.
This would mean that we need to add for every new project/analytic account a new product item to invoice that is linked to the analytic account.
I find this not a good maintainable approach.
So what would be a other approach to invoice projects and make sure that the invoice item is linked to the analytic account?

you are right in odoo you need to select analytic account manually for each associated item.
what you need to do is if you want to set auto analytic account when product will be selected on invoice line.
Create custom module add m2o field inside product and override the on change method of invoice line which will automatically set the analytic account.

Related

Need help on implementing this Use-Case Scenario in NetSuite Oracle

I am very new to E-Commerce World.
I have a use case scenario that I want to Implement in Oracle NetSuite.
But I am not sure how to move forward with it.
Use-Case Scenario:
A Sales Order has a few Line Items & Among them, a few are out of stock.
The 3PL currently I am dealing with accepts only one Unique Sales Order ID as an Identifier.
I want to fulfill the items that are currently in stock and Later on, when the Inventory gets updated I want to fulfill the remaining Items back-ordered in the Sales Order.
But the fulfillment should happen only after the customer has paid for the Items.
Can anyone let me know? How can I achieve this?
Thank you.
You will probably need some customisation to achieve this. I don't know the full set of processes you're working with, but as a general approach, I would suggest the following:
Set up a payment term that says the customer must prepay.
Set up a script to run on your fulfilments, handle "prepay" customers.
You'll also want to check your settings in Setup > Accounting > Accounting Preferences > Order Management. Look for the option on sales orders and fulfilment. You'll probably want to default your fulfilment to available quantity only. You may want to prevent overage on your fulfilments.
When the script executes on your fulfilment, it should execute "before load". The script will need to check the sales order it's fulfilling. If the term is "prepay", the script should then check if a payment has been made against the sales order. You'll potentially need to consider deposits and paid invoices. If the script finds no payments, then it should block the fulfilment.
I'm working on the assumption that you will create a fulfilment with a "Picked" status to send to your warehouse. When they confirm the "goods-out", you will want some sort of feedback loop from your 3PL to set the fulfilment to "Shipped" and update your tracking numbers.
I hope this helps.
Mark

Is there a way to set min/max order quantity for all products based on a customer type?

I have different customer groups and I want to set a min/max order quantity for all my products based on a customer group, Is this possible?
This is not a native feature in BigCommerce. The native functionality is to allow a min/max purchase quantity at the product level, regardless of customer.
There are, however, a few potential workarounds.
You could create separate products that each customer group has access to. You could then set the min/max on these products.
If you were to create custom fields on the product for min/max purchase quantities for each customer group, you could use these values based on the current customer. You would need to modify the following lines in add-to-cart.html, switching them for the custom field values:
value="{{#if product.min_purchase_quantity}}{{product.min_purchase_quantity}}{{else}}1{{/if}}"
data-quantity-min="{{product.min_purchase_quantity}}"
data-quantity-max="{{product.max_purchase_quantity}}"

Retrieve customer related to payment

Anyone know if it's possible to retrieve the customer name related to a transaction from the API?
I see it under "Paid by" if I follow the "payment_url" in the connect v1 https://connect.squareup.com/v1/{{location_id}}/payments/{{payment_id}} endpoint but can't see to find it anywhere else
Background: I'm working on a ticketing system that breaks out items by item_category so a kitchen gets only food items and the bar gets only drink items.
I have queues and itemized tickets by category BUT I can't seem to find the customer's name anywhere
You'll need to utilize the V2 Transactions API. When you call ListTransactions or RetrieveTransaction (ListTransactions), the Transaction object will have an array of Tenders, tenders, which has a field called customer_id. With this id, you will be able to pass it to RetrieveCustomer (RetrieveCustomer) to find out their name. Note that if you're not explicitly filling out their name, the name might not be available (an "instant profile" (Instant Profiles) will be created with whatever information can be retrieve from the card used to pay).
Update: Alternatively, as suggested by #Dan, would be to strip the payment_url from a V1 RetrievePayment (RetrievePayment) which includes the transaction_id at the end of the URL: https://squareup.com/dashboard/sales/transactions/TRANSACTION_ID. This is more efficient as you won't need to loop through transactions, and allow you to send it straight to RetrieveTransaction.

How to make a payment for each product in an invoice in Odoo

I have an invoice with 2 products (product A and B), I need to do a payment only for the product A, is there any way to do that ?, and after see the product A with the correct moves in the accounting.
I know how to do the change in code but will be better if Odoo has this functionality
Thanks a lot
That can be done if you shipped all products separately and keep
invoice policy based on shipment. Then you can create separate invoice
for each products.
While you click on Create Invoice button in sales order then it will create invoice for eligible shipments with it's all delivered products.
So your purpose will be resolved by just change the configuration other there is no more option in odoo you have to write code to achieve it.

Retrieval of all the invoices of particular contact id in xero

In xero, if we create a contact. Using that contact we perform couple of sales invoice and purchase bills and few of them get paid. Now I want to obtain the list of the invoices groupedBy ContactID in php
Xero have recently released functionality that allows this in an easy way.
You can use the ContactIDs query parameter on the invoices endpoint like the following:
GET ../Invoices?ContactIDs=623e392d-7402-40e4-a54c-fdf29783e9a4
You can also do this for more than one ContactID by supplying a comma separated list of ContactIDs.
You can find more information about this in this handy blog post