Let employees buy products via POS - odoo

I would like to use the odoo POS also for internal use. Employees should be able to buy products for themselves. All of the costs should be charged via the payslip of every employee.
Example: A is an employee of my company X. A buys a coke (2$) from the POS. B is chief of HR at X and wants to generate the payslip of A to send him his loan (100$) for the month. Odoo should now calculate and sum up all POS expenses and then show B that A gets a loan of 98$.
I would probably do some adjustments with custom modules, however would it even be possible to set an employee as the customer in odoo?

Related

Odoo 10 how to calculate the total debt of partner

I would like to calculate the total debt of partner_id, with all his debit on every his invoice
as an example:
In Accounting\Customer Invoices I have a
when I click on bbb opens
when I click on the report, in my case Automatski racun
I want to enter in the field Vaš ukupan dug the total debt of all accounts that bbb has
And can you tell me how to iterate over all partner_id eg. in the Journal Items
Because I tried this way to get a total of bbb debt, but I did not know how to iterate
If I'm not clear enough or you need more information, please let me know
Here it is the code.
#api.onchange('partner_id')
def set_customer_credit(self):
self.custom_field = self.partner_id.credit

How to build a recommender system with sales data using python?

I have a last year retail sales data. Now I'm interested to build a recommender system based on the last year sales data.
Customer A bought product Ids 1,2,3,4
Customer B bought products ids 2,3,5
Customer C bought product ids 6,2,7,3
In the above data set all the customers bought product Id 3 when they purchase product id 2
So which Machine learning method I have to use create a recommender system.
Note : I'm gonna build tensorflow lite model by using python and keras
Look for the apriori algorithm or any other which can generate association rules.

Perpetual Inventory Valuation- odoo 10

I created 3 chart of accounts as follow with type current asset:
23600 Stock Interim Account (Received)
14600 Stock Interim Account (Delivered)
14000 Stock Valuation Account
And assigned to product category.
Set costing method as Average and inventory valuation as Perpetual.
Created a purchase order and received products
Then system created journal entries as follow.
When i create an vendor invoice from same purchase order, in product lines it automatically choose 501100 Cost of Goods Sold in Trading instead of 23600 Stock Interim Account (Received).
Did i configure anything wrong?
How can i resolve this?

Sell numbered seats in Prestashop

Im looking for a way to sell numbered Tickets on Prestashop. For example I have a ticket for a Hockey Game. Seats are numbered, so when I sell a ticket for seat A8, this seat is gone and can not be sold again. The seats are all the same price for a given Game or Season. A customer should be able to choose his seat from a dropdown list.
You will need to add product quantities and enable out of stock feature.
Then set the product quantity to 1.
And not allowing orders when the product quantity is less than 1.
You need to make Attribute "Seats" with value of all seat numbers and allow add one quantity for each of Seats values

Best way to store differing tax rates for countries in SQL (then how to use it in a basket situation)

I have raw data that I'm trying to sort; I have the tables (I think) decided on with a basket including a basket_id, customer_id, basket_date, total_price, tax and payment_type.
Tax is a set portion of the total price, so if the total price were 512.99 and the seller came from the UK (which would denote a tax percentage of 10%, different for each country and a total of 6 countries) then the tax would be 51.299. I need to store that tax figure, NOT the percentage, in this basket table by somehow referencing the tax percentage in another tax table so that SQL can automatically calculate the figure from the percentage*total_price. Is this possible?
I don't need anything unnecessary in examples, JUST what I need to do, no need to overcomplicate it!