/*
 * Axelor Business Solutions
 *
 * Copyright (C) 2018 Axelor (<http://axelor.com>).
 *
 * This program is free software: you can redistribute it and/or  modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.axelor.apps.sale.service.saleorder;

import java.time.LocalDate;
import java.util.List;

import com.axelor.apps.base.db.Company;
import com.axelor.apps.base.db.Currency;
import com.axelor.apps.base.db.Partner;
import com.axelor.apps.base.db.PriceList;
import com.axelor.apps.sale.db.SaleOrder;
import com.axelor.auth.db.User;
import com.axelor.exception.AxelorException;
import com.axelor.team.db.Team;
import com.google.inject.persist.Transactional;

public interface SaleOrderCreateService {


	public SaleOrder createSaleOrder(User buyerUser, Company company, Partner contactPartner, Currency currency,
			LocalDate deliveryDate, String internalReference, String externalReference, LocalDate orderDate,
			PriceList priceList, Partner clientPartner, Team team) throws AxelorException;

	public SaleOrder createSaleOrder(Company company) throws AxelorException;

	public SaleOrder mergeSaleOrders(List<SaleOrder> saleOrderList, Currency currency, Partner clientPartner, Company company, Partner contactPartner, PriceList priceList, Team team) throws AxelorException;

	@Transactional
	public SaleOrder createTemplate(SaleOrder context);

	@Transactional
	public SaleOrder createSaleOrder(SaleOrder context);


}

@@ -1198,17 +1198,1094 @@
 rvice %7B%0A
-%0A
+%09/**%0A%09 * Initialize a new sale order%0A%09 * @param salemanUser User recorded as salesman on order, if%0A%09 * %3Ccode%3Enull%3C/code%3E, will be set to current user.%0A%09 * @param company Company bound to the order, if %3Ccode%3Enull%3C/code%3E, will%0A%09 * be bound to salesman active company.%0A%09 * @param contactPartner Customer contact to assign to the user,%0A%09 * might be %3Ccode%3Enull%3C/code%3E.%0A%09 * @param currency Order's currency, should not be %3Ccode%3Enull%3C/code%3E.%0A%09 * @param deliveryDate Expected delivery date for order (might be %3Ccode%3Enull%3C/code%3E).%0A%09 * @param internalReference Unused (%E2%80%A6)%0A%09 * @param externalReference Client reference for order, if any%0A%09 * @param orderDate Date of order (if %3Ccode%3Enull%3C/code%3E, will be set to today's date).%0A%09 * @param priceList Pricelist to use, if %3Ccode%3Enull%3C/code%3E, will default to partner's%0A%09 * default price list.%0A%09 * @param clientPartner Customer bound to the order, should not be %3Ccode%3Enull%3C/code%3E%0A%09 * @param team Team managing the order, if %3Ccode%3Enull%3C/code%3E, will default to salesman%0A%09 * active team.%0A%09 * @return The created order%0A%09 * @throws AxelorException%0A%09 */
 %0A%09public
@@ -2320,13 +2320,15 @@
 ser 
-buyer
+saleman
 User

add documentation on createSaleOrder service method